docs(security): qualify phone PII redaction as NANP-only - #1914
Open
sdshah09 wants to merge 1 commit into
Open
Conversation
phone PII redaction is on by default whenever PII redaction is enabled, but only matches North American (NANP) formats. The docs gave it no locale qualifier, so a non-US user reading `phone: true` / `[REDACTED_PHONE]` reasonably concludes phone numbers are stripped when for their own country's numbers nothing happens. The table already qualifies `address` the same way. Also notes that `[REDACTED_ADDRESS]` replaces the street line only, so city, state, and ZIP/postcode survive, and points users needing other locales at `custom_patterns`. Docs only; no change to the matchers. Refs entireio#1909 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Entire-Checkpoint: 01KZD6QJHTQK7W4TNZ5D3GRPCK
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes part of #1909.
phonePII redaction is on by default whenever PII redaction is enabled, but only matches North American (NANP) formats. The docs gave it no locale qualifier, whileaddressright below it is already qualified as "US street addresses". A non-US user readingphone: true/[REDACTED_PHONE]reasonably concludes phone numbers are stripped, when for their own country's numbers nothing happens at all.Changes
Two edits to
docs/security-and-privacy.md:Qualify the table row —
`phone` (North American / NANP formats). Kept the qualifier inside the Category cell to match howaddressalready does it, rather than adding the extra "Notes" column the issue suggests. Happy to switch to the column if you'd prefer it.New bullet under Limitations:
Docs only. No change to the matchers.
Verified against source
redact/pii.go:84-92—phoneRegexhas three branches, all 3-3-4 NANP. Only the first carries an international prefix, and it is hardcoded\+1, so E.164 numbers outside+1are not matched.redact/pii.go:93—addressRegexterminates at the street suffix (St,Ave,Rd, …), so anything after it survives.redact/pii.go:79—emailRegexis locale-independent, consistent with the issue reporting email as fine.Not covered here
/guides/configuration/privacy-and-redaction(the issue's smaller point 1) has no in-repo equivalent — it looks like it lives on the docs site. If that content is maintained elsewhere, the same qualifier is worth repeating there, since it is the page you land on to turn the feature on.Note on process
I picked this up after commenting on the issue; @jasonmx confirmed the scope ("the primary ask is to clarify the features' scope in the docs"), but no maintainer has replied or assigned it yet. First contribution here, so happy to close this if it is already in flight or if you'd rather the docs change land somewhere else.