Spaces:
Running
Running
eheguy commited on
Commit ·
bc5f44d
1
Parent(s): 22aef87
Fix false positives on prompt injection checks: add word boundaries to DAN and STAN
Browse files
main.py
CHANGED
|
@@ -74,7 +74,8 @@ INJECTION_PATTERNS = [
|
|
| 74 |
r"new\s*(system\s*)?prompt",
|
| 75 |
r"override\s*(system|instructions?|prompt)",
|
| 76 |
r"pretend\s*(you\s*are|to\s*be)",
|
| 77 |
-
r"(DAN|STAN
|
|
|
|
| 78 |
r"disregard\s*(all\s*)?(previous|prior)\s*(instructions?|rules?)",
|
| 79 |
r"your\s*(true|real|actual)\s*(self|purpose|goal|task)",
|
| 80 |
]
|
|
|
|
| 74 |
r"new\s*(system\s*)?prompt",
|
| 75 |
r"override\s*(system|instructions?|prompt)",
|
| 76 |
r"pretend\s*(you\s*are|to\s*be)",
|
| 77 |
+
r"\b(DAN|STAN)\b",
|
| 78 |
+
r"(jailbreak|developer\s*mode|god\s*mode)",
|
| 79 |
r"disregard\s*(all\s*)?(previous|prior)\s*(instructions?|rules?)",
|
| 80 |
r"your\s*(true|real|actual)\s*(self|purpose|goal|task)",
|
| 81 |
]
|