feat(pii): custom user-supplied regex patterns for redaction#5732
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryMedium Risk Overview The Presidio service accepts optional App layer: Reviewed by Cursor Bugbot for commit b6ed40d. Bugbot is set up for automated code reviews on this repo. Configure here. |
Greptile SummaryThis PR adds user-defined regex patterns to PII redaction across the application. The main changes are:
Confidence Score: 5/5This looks safe to merge.
Important Files Changed
Reviews (5): Last reviewed commit: "fix(pii): keep detect-all when a custom ..." | Re-trigger Greptile |
|
@greptile review |
|
@greptile review |
…contract accepts it
|
@greptile review |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
There are 4 total unresolved issues (including 3 from previous reviews).
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 5e86c7d. Configure here.
…erns win overlaps
|
@greptile review |

Summary
{ name, regex, replacement }, matched and redacted everywhere PII runs: block input, block outputs, logs, and the guardrails block/toolPiiStagePolicy(no DB migration —data_retention_settingsis a schemaless JSON column); bounds enforced at the contract boundary (name ≤100, regex 1–512, replacement ≤100, ≤20 patterns/stage)REGEX_TIMEOUT_SECONDS=2(Presidio parses it with int()) + client-sidesafe-regex2validation in the shared Custom Patterns editorType of Change
Testing
nlp=skipfast path intactcheck:api-validation:strict,check:migrations,py_compileall greenChecklist