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
fix(guardrails): screen tool output for injection, widen secret and PHI redaction
PromptInjectionGuardrail only screened the first user turn, so an instruction
embedded in a tool's return value (a scraped page, a ticket body, a RAG passage)
reached the model unfiltered. The strict and phi presets now also screen
TOOL_OUTPUT; standard/minimal stay input-only. The identity-override pattern
now requires an explicit restriction-lifting cue before firing, so ordinary
roleplay passes, and a blocked-input message no longer names the internal
guardrail class or pattern label.
The secret detector recognized only sk-<alnum>/gsk_<alnum> keys; the current
OpenAI (sk-proj-), Anthropic (sk-ant-api03-), HuggingFace (hf_), Replicate
(r8_), and Cerebras (csk-) formats now redact too.
Also: international phone redaction matches space/dot/dash-grouped numbers
(+44 20 7946 0958), not only an ungrouped digit run; and the bare "Record #"
medical-record-number label now redacts like "MRN#" (a shared trailing word-
boundary check could never match right after "#").
0 commit comments