Why this matters
PII redaction in logs is essential for SOC 2 confidentiality.
Configure Monolog to add a processor that redacts emails, tokens, and SSNs before writing logs; include request_id.
PII redaction in logs is essential for SOC 2 confidentiality.
Side-by-side examples engineers can pattern-match during review.
logger.info('login', ['email'=>$email])$logger->pushProcessor(fn ($rec) => redact($rec) + ['request_id'=>uuid()]);$logger->pushProcessor('redact')$logger->info($email)From the same buckets as this rule.
Public services must require TLSv1.2 or higher and set HSTS (max-age ≥ 15552000, includeSubDomains). Reject plaintext HTTP and weak ciphers; cookies must be Secure and HttpOnly with SameSite set.