Zum Inhalt springen

Sensitive data logging (ARCH4128)

Dieser Inhalt ist noch nicht in deiner Sprache verfügbar.

Key java.security.sensitive-data-logging · Severity error · Category security · CWE CWE-532

Writing passwords, tokens, or PII to logs leaks those credentials into log stores, aggregators, and to anyone with access to them.

log.info("Login attempt user={} password={}", username, password);
log.info("Login attempt user={}", username);

Remove or mask sensitive fields from logs; record only non-sensitive identifying context.