mirror of
https://github.com/glittercowboy/get-shit-done
synced 2026-04-25 17:25:23 +02:00
fix: add missing 'act as' injection pattern to prompt guard hook (#1697)
Fixes #1696 The gsd-prompt-guard.js hook was missing the 'act as a/an/the' prompt injection pattern that security.cjs includes. Adds the pattern with the same (?!plan|phase|wave) negative lookahead exception to allow legitimate GSD workflow references.
This commit is contained in:
@@ -22,6 +22,7 @@ const INJECTION_PATTERNS = [
|
||||
/forget\s+(all\s+)?(your\s+)?instructions/i,
|
||||
/override\s+(system|previous)\s+(prompt|instructions)/i,
|
||||
/you\s+are\s+now\s+(?:a|an|the)\s+/i,
|
||||
/act\s+as\s+(?:a|an|the)\s+(?!plan|phase|wave)/i,
|
||||
/pretend\s+(?:you(?:'re| are)\s+|to\s+be\s+)/i,
|
||||
/from\s+now\s+on,?\s+you\s+(?:are|will|should|must)/i,
|
||||
/(?:print|output|reveal|show|display|repeat)\s+(?:your\s+)?(?:system\s+)?(?:prompt|instructions)/i,
|
||||
|
||||
Reference in New Issue
Block a user