Aller au contenu

Sensitive Data In Logs (ARCH9160)

Ce contenu n’est pas encore disponible dans votre langue.

Key swift.logging.sensitive-data-in-logs · Severity error · Category logging · CWE CWE-532

Flags log/print calls whose message references passwords, tokens, secrets or keys.

logger.debug("auth with token=\(token)")
logger.debug("auth with token=\(token, privacy: .private)")

Mark credentials private or omit them.