# PII (Personally Identifiable Information) in Logs

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

- Skill: `zakirkun/pii-personally-identifiable-information-in-logs` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add zakirkun/pii-personally-identifiable-information-in-logs`
- Raw SKILL.md: https://api.skillmd.com/api/skills/zakirkun/pii-personally-identifiable-information-in-logs/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Productivity
- Author: zakirkun (https://skillmd.com/u/zakirkun)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/zakirkun/pii-personally-identifiable-information-in-logs

---


# 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

