Add an ip category to PII redaction

main

Commit

peyton-alt2w ago

PII redaction covered email, phone and street addresses, so internal network addresses in transcripts (ssh targets, database hosts, dial errors) were stored as written.

The new ip category redacts IPv4 and IPv6 addresses as [REDACTED_IP], on by default when redaction.pii.enabled is true. A dotted quad is ambiguous in coding transcripts (version numbers, user agents), so a match is redacted only when it is private/link-local/CGNAT, has network syntax around it (://, @, :port, /cidr, ->), or a network word nearby. Loopback, unspecified, 0.0.0.0/8 and broadcast are never redacted, nor is an address that continues a longer token (v1.2.3.4, u64::from).

Measured on real agent transcripts, about 3% of redactions are false positives, against 30% for plain shape matching. Byte-scan prefilters keep the overhead to about 2% on a 1.1 MB transcript.

Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com Entire-Checkpoint: 01M5GZY2ES7MQ6PPKWM05ZZJ0Q