You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Improvement: enabling PII protection does nothing until patterns are hand-checked — seed the universal detection patterns on enable #2656
Turning on Governance → Guardrails → PII protection ships with zero detection patterns enabled, so the feature is a silent no-op until the admin manually checks boxes. An admin who flips the switch expecting "PII is now protected" gets nothing — the live preview even says "No detection patterns are enabled. Turn at least one on above to see detections."
Unlike the sibling guardrail layers, PII patterns are universal and safe to preconfigure: email, phone, credit card, SSN, IBAN, etc. are the same for every org. (Content-safety word lists and the moderation endpoint genuinely can't be guessed — those shipping empty is defensible; PII is the one clear preconfigure win.) This is exactly the "preconfigure sensible defaults to make life easier" pattern.
Current behaviour
Repro (2026-07-11, main @ 94ef84e): Settings → Governance → Guardrails → toggle Enable PII protection on. The revealed config shows 12 detection patterns (Email, Phone, Credit card, Card CVC, IBAN, IP, MAC, JWT, SSN, DOB, Address, National ID) all unchecked; mode defaults to Tokenize; autosaves. Verified the persisted config:
app/features/settings/.../guardrails PII section (the enable handler that writes the config)
Proposed change
On first enable (empty enabledPatterns), seed the common set — email, phone, credit_card, card_cvc, iban, ssn, national_id — so the toggle protects something immediately; the admin can prune. Reconcile the enable-time mode default with the builtin (mask).
Acceptance criteria
Enabling PII protection activates a sensible default pattern set (not empty)
Enable-time mode matches the documented default
Admin can still deselect any pattern; existing configured orgs are untouched
Related: the content-safety and moderation layers also enable inert, but those are org-specific / need an endpoint — out of scope here.
Activity