PII (Personally Identifiable Information) in Logs

Detects Personally Identifiable Information (PII) such as email addresses, phone numbers, and SSNs being written to log files.

zakirkun Updated

File contents

PII in Logs

Overview

Logging PII (email addresses, phone numbers, names, SSNs, credit card numbers) creates compliance risks under GDPR, CCPA, HIPAA, and PCI-DSS. Log files:

  • May be stored indefinitely beyond data retention requirements
  • Are often shipped to third-party aggregators (Datadog, Splunk, ELK)
  • May have broader access than production databases
  • Can be subpoenaed in legal proceedings

Remediation

  • Implement a log sanitizer/redactor for all PII fields
  • Use structured logging and explicitly list safe fields
  • Mask PII in logs: user@ex*****.com, +1-xxx-xxx-1234
  • Audit log destinations for GDPR data transfer compliance

zakirkun/ice-tea/tree/main/skills/privacy/pii-logging commit a773eb989c

Frequently asked questions

npx skillmds@latest add zakirkun/pii-personally-identifiable-information-in-logs