fix: guard unsupported Presidio entities#3085
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Prompt-injection risk reportCorpus: 933 cases (384 malicious / 549 benign) No main baseline artifact found yet; this comment shows the current run only. Operational Modes
L1 opt-in was not evaluated in this run: classifier URL is not set. Generated by |
🚀 Preview Environment (PR #3085)Preview URL: https://pr-3085.dev.getgram.ai
Gram Preview Bot |
da8dd4b to
6c174c2
Compare
There was a problem hiding this comment.
Claude Code Review
This repository is configured for manual code reviews. Comment @claude review to trigger a review and subscribe this PR to future pushes, or @claude review once for a one-time review.
Tip: disable this comment in your organization's Code Review settings.
| {name: "uk nhs", entity: "UK_NHS", text: "NHS number 943 476 5919"}, | ||
| {name: "url", entity: "URL", text: "Visit https://example.com/path"}, | ||
| {name: "us bank", entity: "US_BANK_NUMBER", text: "Bank account 123456789012"}, | ||
| {name: "us driver license", entity: "US_DRIVER_LICENSE", text: "Driver license D1234567"}, |
There was a problem hiding this comment.
From what I gather you are trying to verify that presidio is able to handle the various detection rules/entities that you put here and detect stuff. However if I'm not mistaken the test runs against a mock so we never actually verify that?
There was a problem hiding this comment.
Sorry yeah. This test is stupid.
| if _, blocked := presidioEntityBlacklist[e]; blocked { | ||
| continue | ||
| } | ||
| if _, supported := presidioSupportedEntities[e]; !supported { |
There was a problem hiding this comment.
If I'm not mistaken, this will not break presidio sending unknown entities will simply be ignored. Now if we add detection for a new entity we'll have to update several places
- Add to UI
- Remove from UI blacklist
- Remove from request blacklist
- Add to presidio
There was a problem hiding this comment.
Correct. Is it a concern needing to update multiple places?
Summary
2.2.362containeravailableflags and special-case UI logicpresidiotestsample churn so tests stay focused on client behavior rather than mirroring runtime probesValidation
http://127.0.0.1:5050Notes
DOMAIN_NAME,SG_NRIC_FIN, andMEDICAL_LICENSEremain removed from the supported production setcd client/dashboard && pnpm buildstill fails on a pre-existing unresolved import fromclient/dashboard/src/contexts/Sdk.tsx