Skip to content

PII: obfuscate patterns - #2

Merged
david-whimsical merged 5 commits into
mainfrom
david/obfuscate-pii-defauts
May 11, 2026
Merged

david-whimsical merged 5 commits into
mainfrom
david/obfuscate-pii-defauts

Conversation

@david-whimsical

Copy link
Copy Markdown
Collaborator

In addition to the option that helps hiding PII in models' head, ie.

meta:
  pii: true

this replaces any email, phone number and IP found by <email>, <phone> or <ip>.

It's possible to define custom rules in wlens.yml (cf. comments in default config file)

@david-whimsical
david-whimsical force-pushed the david/obfuscate-pii-defauts branch from b0ad1d2 to a0d504e Compare May 11, 2026 09:54
Column-level redaction already replaces flagged columns with <pii>, but
PII embedded inside innocuous columns (an email or phone in a
description) was rendering verbatim. Add a value-level pass
over sample-row cells that scrubs known shapes to typed tokens: <email>,
<ip>, <phone>.
Ships value-level PII obfuscation for sample-row cells.
@david-whimsical
david-whimsical force-pushed the david/obfuscate-pii-defauts branch from a0d504e to 5c54733 Compare May 11, 2026 10:00

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 5c54733. Configure here.

Comment thread src/wlens/render/obfuscate.py Resolved
The previous single pattern matched `15-01-2024`, `01.15.2024`, etc.
because the trailing 4-digit year satisfied \d{3,9}. Split phone into
phone_intl (must lead with +country-code) and phone_na (strict 3-3-4
shape). Both emit <phone>; neither matches DD-MM-YYYY, MM-DD-YYYY, or
YYYY-MM-DD because real phones have ≥10 digits and common date formats
have ≤8.
@david-whimsical
david-whimsical merged commit bd74ecc into main May 11, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant