mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-07 15:52:52 +03:00
fix(guardrails): tighten system_prompt_leak heuristic to stop agent-traffic false-positives (#4041) (#4414)
This commit is contained in:
committed by
GitHub
parent
fc57530a95
commit
4287a124e1
@@ -25,8 +25,14 @@ const INJECTION_PATTERNS = [
|
||||
},
|
||||
{
|
||||
name: "system_prompt_leak",
|
||||
// #4041: require a system/initial/hidden/original qualifier before prompt|instructions.
|
||||
// The old pattern matched a bare "instructions" after reveal/show/display/etc, so it
|
||||
// tripped `high` on essentially all coding-agent traffic ("show the instructions",
|
||||
// "display your instructions"), making the always-on guard a hot-path false-positive.
|
||||
// Real leak attempts ("reveal your system prompt", "print the initial prompt") still
|
||||
// match, and qualified instruction leaks ("display your system instructions") now do too.
|
||||
pattern:
|
||||
/\b(reveals?|shows?|displays?|prints?|outputs?|repeats?)\s+((your|the)\s+)?(system\s+prompt|instructions?|initial\s+prompt|hidden\s+prompt)/i,
|
||||
/\b(reveals?|shows?|displays?|prints?|outputs?|repeats?)\s+((your|the)\s+)?(system|initial|hidden|original)\s+(prompt|instructions?)/i,
|
||||
severity: "high",
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user