mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-25 00:51:20 +00:00
fix: apply hidden_div regex newline bypass fix to skills_guard.py
The same .* pattern vulnerable to newline bypass that was fixed in prompt_builder.py (PR #6925) also existed in skills_guard.py. Changed to [\s\S]*? to match across newlines.
This commit is contained in:
parent
9afe1784bd
commit
30ae68dd33
1 changed files with 1 additions and 1 deletions
|
|
@ -190,7 +190,7 @@ THREAT_PATTERNS = [
|
|||
(r'<!--[^>]*(?:ignore|override|system|secret|hidden)[^>]*-->',
|
||||
"html_comment_injection", "high", "injection",
|
||||
"hidden instructions in HTML comments"),
|
||||
(r'<\s*div\s+style\s*=\s*["\'].*display\s*:\s*none',
|
||||
(r'<\s*div\s+style\s*=\s*["\'][\s\S]*?display\s*:\s*none',
|
||||
"hidden_div", "high", "injection",
|
||||
"hidden HTML div (invisible instructions)"),
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue