Sanitize PII (emails, IPs, phone numbers, SSNs) from log files before sharing
Removes PII from log files including emails, IPs, phone numbers, and SSNs.
/plugin marketplace add iamfiscus/claude-code-scrub/plugin install iamfiscus-scrub@iamfiscus/claude-code-scrub[--preview] <file_or_directory>Remove personally identifiable information (PII) from log files.
Execute the log sanitization script:
bash "$CLAUDE_PLUGIN_ROOT/scripts/scrub-logs.sh" [--preview] <path>
--preview or -p: Show what would be removed without making changespath: File or directory containing logs| Type | Example | Replacement |
|---|---|---|
| user@example.com | [EMAIL_REDACTED] | |
| IPv4 | 192.168.1.1 | [IP_REDACTED] |
| IPv6 | 2001:0db8:... | [IPv6_REDACTED] |
| Phone | +1-555-123-4567 | [PHONE_REDACTED] |
| SSN | 123-45-6789 | [SSN_REDACTED] |
| Credit Card | 4111-1111-1111-1111 | [CC_REDACTED] |
| MAC Address | 00:1A:2B:3C:4D:5E | [MAC_REDACTED] |
| UUID | 550e8400-e29b-... | [UUID_REDACTED] |
.log, .txt, .csv, .json, .xml, .out
/scrub:logs ./app.log - Sanitize single log file/scrub:logs --preview ./logs/ - Preview what would be removed/scrub:logs ./debug-output.txt - Clean debug output before sharing