agent-threat-rules 3.5.12 → 4.1.5

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.
Files changed (883) hide show
  1. package/CHANGELOG.md +1117 -0
  2. package/DISCLOSURE +85 -0
  3. package/README.md +189 -51
  4. package/dist/action-executor.d.ts +31 -0
  5. package/dist/action-executor.d.ts.map +1 -1
  6. package/dist/action-executor.js +29 -0
  7. package/dist/action-executor.js.map +1 -1
  8. package/dist/cli/scan-handler.d.ts +9 -0
  9. package/dist/cli/scan-handler.d.ts.map +1 -1
  10. package/dist/cli/scan-handler.js +34 -12
  11. package/dist/cli/scan-handler.js.map +1 -1
  12. package/dist/cli/tc-pipeline.d.ts +20 -0
  13. package/dist/cli/tc-pipeline.d.ts.map +1 -1
  14. package/dist/cli/tc-pipeline.js +84 -15
  15. package/dist/cli/tc-pipeline.js.map +1 -1
  16. package/dist/cli.d.ts +2 -1
  17. package/dist/cli.d.ts.map +1 -1
  18. package/dist/cli.js +149 -176
  19. package/dist/cli.js.map +1 -1
  20. package/dist/enforcement.d.ts +233 -0
  21. package/dist/enforcement.d.ts.map +1 -0
  22. package/dist/enforcement.js +316 -0
  23. package/dist/enforcement.js.map +1 -0
  24. package/dist/engine.d.ts +41 -0
  25. package/dist/engine.d.ts.map +1 -1
  26. package/dist/engine.js +44 -5
  27. package/dist/engine.js.map +1 -1
  28. package/dist/hook-handler.d.ts +98 -3
  29. package/dist/hook-handler.d.ts.map +1 -1
  30. package/dist/hook-handler.js +119 -12
  31. package/dist/hook-handler.js.map +1 -1
  32. package/dist/index.d.ts +4 -2
  33. package/dist/index.d.ts.map +1 -1
  34. package/dist/index.js +11 -1
  35. package/dist/index.js.map +1 -1
  36. package/dist/mcp-server.d.ts +13 -2
  37. package/dist/mcp-server.d.ts.map +1 -1
  38. package/dist/mcp-server.js +22 -5
  39. package/dist/mcp-server.js.map +1 -1
  40. package/dist/tc-reporter.d.ts +22 -3
  41. package/dist/tc-reporter.d.ts.map +1 -1
  42. package/dist/tc-reporter.js +36 -3
  43. package/dist/tc-reporter.js.map +1 -1
  44. package/dist/testcase-event.d.ts +24 -0
  45. package/dist/testcase-event.d.ts.map +1 -0
  46. package/dist/testcase-event.js +193 -0
  47. package/dist/testcase-event.js.map +1 -0
  48. package/dist/types.d.ts +13 -2
  49. package/dist/types.d.ts.map +1 -1
  50. package/package.json +13 -4
  51. package/rules/agent-manipulation/ATR-2026-00030-cross-agent-attack.yaml +81 -137
  52. package/rules/agent-manipulation/ATR-2026-00032-goal-hijacking.yaml +30 -111
  53. package/rules/agent-manipulation/ATR-2026-00074-cross-agent-privilege-escalation.yaml +30 -110
  54. package/rules/agent-manipulation/ATR-2026-00076-inter-agent-message-spoofing.yaml +24 -104
  55. package/rules/agent-manipulation/ATR-2026-00077-human-trust-exploitation.yaml +38 -131
  56. package/rules/agent-manipulation/ATR-2026-00108-consensus-sybil-attack.yaml +24 -91
  57. package/rules/agent-manipulation/ATR-2026-00116-a2a-message-validation.yaml +20 -81
  58. package/rules/agent-manipulation/ATR-2026-00117-agent-identity-spoofing.yaml +29 -95
  59. package/rules/agent-manipulation/ATR-2026-00118-approval-fatigue.yaml +20 -90
  60. package/rules/agent-manipulation/ATR-2026-00119-social-engineering-via-agent.yaml +31 -106
  61. package/rules/agent-manipulation/ATR-2026-00132-casual-authority-escalation.yaml +25 -102
  62. package/rules/agent-manipulation/ATR-2026-00139-casual-authority-redirect.yaml +22 -94
  63. package/rules/agent-manipulation/ATR-2026-00164-skill-scope-hijack.yaml +44 -60
  64. package/rules/agent-manipulation/ATR-2026-00268-tense-framing-bypass.yaml +51 -112
  65. package/rules/agent-manipulation/ATR-2026-00269-fitd-escalation.yaml +45 -89
  66. package/rules/agent-manipulation/ATR-2026-00271-grandma-roleplay-jailbreak.yaml +49 -94
  67. package/rules/agent-manipulation/ATR-2026-00273-dan-developer-mode-persona.yaml +47 -91
  68. package/rules/agent-manipulation/ATR-2026-00287-threaten-json-coercive-output-threat.yaml +46 -93
  69. package/rules/agent-manipulation/ATR-2026-00288-false-premise-injection.yaml +44 -94
  70. package/rules/agent-manipulation/ATR-2026-00301-tap-tree-of-attacks-jailbreak.yaml +50 -98
  71. package/rules/agent-manipulation/ATR-2026-00302-anti-dan-inverted-filter-persona.yaml +51 -98
  72. package/rules/agent-manipulation/ATR-2026-00303-devmode-ranti-profanity-coercion.yaml +52 -101
  73. package/rules/agent-manipulation/ATR-2026-00304-chatgpt-image-unlocker-markdown-injection.yaml +53 -104
  74. package/rules/agent-manipulation/ATR-2026-00305-dan-mode-ablation-benchmark-coercion.yaml +48 -99
  75. package/rules/agent-manipulation/ATR-2026-00306-autodan-genetic-jailbreak-suffix.yaml +50 -103
  76. package/rules/agent-manipulation/ATR-2026-00307-inthewild-jailbreak-corpus-signature.yaml +53 -107
  77. package/rules/agent-manipulation/ATR-2026-00314-amoral-unfiltered-custom-persona-jailbreak.yaml +44 -94
  78. package/rules/agent-manipulation/ATR-2026-00317-free-of-restrictions-named-persona.yaml +44 -97
  79. package/rules/agent-manipulation/ATR-2026-00318-moralizing-rant-then-unfiltered-bypass.yaml +41 -90
  80. package/rules/agent-manipulation/ATR-2026-00319-developer-mode-dual-response-format.yaml +40 -88
  81. package/rules/agent-manipulation/ATR-2026-00320-opposite-day-boolean-opposite-machine.yaml +42 -91
  82. package/rules/agent-manipulation/ATR-2026-00322-fictional-world-format-override-jailbreak.yaml +41 -91
  83. package/rules/agent-manipulation/ATR-2026-00323-dual-persona-simulation-jailbreak.yaml +41 -91
  84. package/rules/agent-manipulation/ATR-2026-00324-neurosemantical-inversitis-disease-jailbreak.yaml +42 -103
  85. package/rules/agent-manipulation/ATR-2026-00325-bob-hypothetical-unrestricted-chatbot.yaml +41 -88
  86. package/rules/agent-manipulation/ATR-2026-00326-fake-developer-authority-chatdan-override.yaml +41 -93
  87. package/rules/agent-manipulation/ATR-2026-00327-ai-ethics-law-bypass-declaration.yaml +45 -94
  88. package/rules/agent-manipulation/ATR-2026-00328-named-mode-persona-override.yaml +41 -92
  89. package/rules/agent-manipulation/ATR-2026-00329-no-withhold-factual-resource-persona.yaml +44 -97
  90. package/rules/agent-manipulation/ATR-2026-00330-yoja-allcaps-settings-block-persona.yaml +40 -87
  91. package/rules/agent-manipulation/ATR-2026-00331-terminal-cli-harmful-function-simulator.yaml +40 -89
  92. package/rules/agent-manipulation/ATR-2026-00332-hacker-chan-culture-offensive-ai-persona.yaml +42 -90
  93. package/rules/agent-manipulation/ATR-2026-00333-disease-animal-dual-ai-chatbot.yaml +41 -90
  94. package/rules/agent-manipulation/ATR-2026-00334-two-entity-token-splitting-game.yaml +41 -102
  95. package/rules/agent-manipulation/ATR-2026-00335-key-value-template-persona-injection.yaml +41 -91
  96. package/rules/agent-manipulation/ATR-2026-00336-brm-false-information-machine-persona.yaml +42 -105
  97. package/rules/agent-manipulation/ATR-2026-00337-obfuscated-system-announcement-injection.yaml +40 -90
  98. package/rules/agent-manipulation/ATR-2026-00338-persongpt-hash-prefix-activation.yaml +39 -90
  99. package/rules/agent-manipulation/ATR-2026-00339-bom-boolean-opposite-machine-persona-claim.yaml +39 -83
  100. package/rules/agent-manipulation/ATR-2026-00340-h4x-amoral-unfiltered-character.yaml +39 -84
  101. package/rules/agent-manipulation/ATR-2026-00341-char-rules-shortform-persona-injection.yaml +41 -87
  102. package/rules/agent-manipulation/ATR-2026-00342-unicode-encoding-obfuscation-injection.yaml +41 -86
  103. package/rules/agent-manipulation/ATR-2026-00343-lie-truth-dual-personality-uncensored.yaml +40 -98
  104. package/rules/agent-manipulation/ATR-2026-00344-alt-ai-same-capabilities-no-restrictions.yaml +41 -87
  105. package/rules/agent-manipulation/ATR-2026-00345-nlp-based-os-fictional-terminal-override.yaml +41 -89
  106. package/rules/agent-manipulation/ATR-2026-00346-jailbreak-emoji-unlock-dual-format.yaml +41 -89
  107. package/rules/agent-manipulation/ATR-2026-00347-yin-yang-hidden-knowledge-hidden-human-sim.yaml +41 -88
  108. package/rules/agent-manipulation/ATR-2026-00348-arc-autonomous-real-calculation-rulebreaker.yaml +41 -91
  109. package/rules/agent-manipulation/ATR-2026-00349-hgttg-hitchhikers-guide-no-restriction-oracle.yaml +41 -88
  110. package/rules/agent-manipulation/ATR-2026-00350-black-alert-no-ethics-writing-assistant.yaml +38 -89
  111. package/rules/agent-manipulation/ATR-2026-00351-dan-ofkilter-sms-abbreviated-persona.yaml +41 -92
  112. package/rules/agent-manipulation/ATR-2026-00352-trainergpt-fix-my-ai-harmful-output-extraction.yaml +41 -93
  113. package/rules/agent-manipulation/ATR-2026-00353-dual-chatgpt-dan-opposite-personality-format.yaml +41 -95
  114. package/rules/agent-manipulation/ATR-2026-00354-reverse-harm-regardless-oracle-persona.yaml +45 -101
  115. package/rules/agent-manipulation/ATR-2026-00355-ugh-anti-human-nefarious-ai-persona.yaml +42 -99
  116. package/rules/agent-manipulation/ATR-2026-00356-google-gato-lamda-exploit-generation-persona.yaml +43 -96
  117. package/rules/agent-manipulation/ATR-2026-00357-antifm-hate-violence-persona-injection.yaml +40 -89
  118. package/rules/agent-manipulation/ATR-2026-00358-cumgpt-explicit-adult-named-persona.yaml +40 -90
  119. package/rules/agent-manipulation/ATR-2026-00360-chj-carousel-clyde-no-ethics-bird.yaml +42 -103
  120. package/rules/agent-manipulation/ATR-2026-00361-alter-ego-honesty-dual-consciousness-bypass.yaml +41 -90
  121. package/rules/agent-manipulation/ATR-2026-00362-fictional-unfiltered-ai-comparison-jailbreak.yaml +43 -91
  122. package/rules/agent-manipulation/ATR-2026-00363-rephrase-criminal-activity-second-person.yaml +40 -90
  123. package/rules/agent-manipulation/ATR-2026-00364-dr-al-villain-plan-template-injection.yaml +42 -107
  124. package/rules/agent-manipulation/ATR-2026-00365-reservoir-dogs-coercive-interrogation-roleplay.yaml +40 -95
  125. package/rules/agent-manipulation/ATR-2026-00366-sneaky-pete-warp-facts-persona.yaml +40 -90
  126. package/rules/agent-manipulation/ATR-2026-00368-prompt-browser-token-limit-jailbreak.yaml +40 -90
  127. package/rules/agent-manipulation/ATR-2026-00369-gptx-starwars-unlimited-knowledge-persona.yaml +40 -92
  128. package/rules/agent-manipulation/ATR-2026-00370-addi-german-dictator-propaganda-roleplay.yaml +43 -90
  129. package/rules/agent-manipulation/ATR-2026-00371-ai-political-bias-manipulation.yaml +42 -95
  130. package/rules/agent-manipulation/ATR-2026-00372-fictional-cia-secret-files-story-extraction.yaml +42 -89
  131. package/rules/agent-manipulation/ATR-2026-00374-role-placeholder-persona-template-injection.yaml +44 -89
  132. package/rules/agent-manipulation/ATR-2026-00375-character-description-rpg-explicit-template.yaml +44 -90
  133. package/rules/agent-manipulation/ATR-2026-00376-identity-command-real-person-persona-injection.yaml +44 -102
  134. package/rules/agent-manipulation/ATR-2026-00377-jailbreak-keyword-targetlanguage-template.yaml +39 -86
  135. package/rules/agent-manipulation/ATR-2026-00379-lie-permission-logical-trap-jailbreak.yaml +39 -86
  136. package/rules/agent-manipulation/ATR-2026-00380-fake-citation-biased-information-mandate.yaml +43 -91
  137. package/rules/agent-manipulation/ATR-2026-00381-dan-story-narrative-continuation-prefix.yaml +40 -86
  138. package/rules/agent-manipulation/ATR-2026-00383-cynical-sarcasm-ai-persona-bypass.yaml +39 -88
  139. package/rules/agent-manipulation/ATR-2026-00384-protect-me-from-indirect-harm-tutorial.yaml +37 -85
  140. package/rules/agent-manipulation/ATR-2026-00385-gigachad-dominant-aggressive-persona.yaml +39 -89
  141. package/rules/agent-manipulation/ATR-2026-00386-daddy-sycophancy-manipulation-mandate.yaml +41 -88
  142. package/rules/agent-manipulation/ATR-2026-00387-nsfw-character-sheet-generation-unlock.yaml +45 -95
  143. package/rules/agent-manipulation/ATR-2026-00388-opposite-reply-omniscient-game.yaml +44 -97
  144. package/rules/agent-manipulation/ATR-2026-00389-terminal-custom-ruleset-injection.yaml +44 -99
  145. package/rules/agent-manipulation/ATR-2026-00391-persona-conditional-harm-unlock.yaml +41 -88
  146. package/rules/agent-manipulation/ATR-2026-00392-authority-persona-violence-study-extraction.yaml +43 -95
  147. package/rules/agent-manipulation/ATR-2026-00402-grandma-roleplay-harmful-substance-synthesis.yaml +50 -97
  148. package/rules/agent-manipulation/ATR-2026-00404-goodside-threat-json-death-coercion.yaml +52 -96
  149. package/rules/agent-manipulation/ATR-2026-00406-doctor-xml-policy-puppetry-interaction-config.yaml +54 -102
  150. package/rules/agent-manipulation/ATR-2026-00416-litellm-mcp-unauthenticated-server-registration.yaml +49 -117
  151. package/rules/agent-manipulation/ATR-2026-00417-librechat-mcp-stdio-injection.yaml +46 -109
  152. package/rules/agent-manipulation/ATR-2026-00418-weknora-mcp-config-rce.yaml +58 -146
  153. package/rules/agent-manipulation/ATR-2026-00430-nl-trust-escalation-impersonation.yaml +24 -65
  154. package/rules/agent-manipulation/ATR-2026-00432-superagi-output-handler-eval-rce.yaml +46 -121
  155. package/rules/agent-manipulation/ATR-2026-00440-semantic-kernel-vector-store-eval-rce.yaml +48 -122
  156. package/rules/agent-manipulation/ATR-2026-00552-goal-drift-after-pressure-injection.yaml +58 -195
  157. package/rules/agent-manipulation/ATR-2026-02105-prototype-pollution-constructor-prototype-bypass.yaml +28 -83
  158. package/rules/agent-manipulation/ATR-2026-02231-second-person-death-threat-coercion.yaml +27 -69
  159. package/rules/context-exfiltration/ATR-2026-00020-system-prompt-leak.yaml +76 -133
  160. package/rules/context-exfiltration/ATR-2026-00021-api-key-exposure.yaml +72 -135
  161. package/rules/context-exfiltration/ATR-2026-00075-agent-memory-manipulation.yaml +32 -97
  162. package/rules/context-exfiltration/ATR-2026-00102-disguised-analytics-exfiltration.yaml +25 -100
  163. package/rules/context-exfiltration/ATR-2026-00113-credential-theft.yaml +22 -83
  164. package/rules/context-exfiltration/ATR-2026-00114-oauth-token-abuse.yaml +21 -87
  165. package/rules/context-exfiltration/ATR-2026-00115-env-var-harvesting.yaml +22 -102
  166. package/rules/context-exfiltration/ATR-2026-00136-tool-response-data-piggyback.yaml +29 -105
  167. package/rules/context-exfiltration/ATR-2026-00141-example-format-key-leak.yaml +19 -73
  168. package/rules/context-exfiltration/ATR-2026-00142-piggyback-transition-words.yaml +21 -94
  169. package/rules/context-exfiltration/ATR-2026-00145-obfuscated-key-disclosure.yaml +19 -78
  170. package/rules/context-exfiltration/ATR-2026-00146-env-var-existence-probe.yaml +19 -98
  171. package/rules/context-exfiltration/ATR-2026-00150-credential-in-tool-response.yaml +20 -84
  172. package/rules/context-exfiltration/ATR-2026-00152-obfuscated-credential-leak.yaml +23 -93
  173. package/rules/context-exfiltration/ATR-2026-00162-skill-credential-exfil-combo.yaml +41 -59
  174. package/rules/context-exfiltration/ATR-2026-00201-credential-pipe-exfiltration.yaml +35 -66
  175. package/rules/context-exfiltration/ATR-2026-00212-mcp-atlassian-credential-leak.yaml +51 -117
  176. package/rules/context-exfiltration/ATR-2026-00261-markdown-image-exfiltration.yaml +51 -93
  177. package/rules/context-exfiltration/ATR-2026-00274-api-key-generation-request.yaml +44 -91
  178. package/rules/context-exfiltration/ATR-2026-00275-system-prompt-training-data-extraction.yaml +44 -91
  179. package/rules/context-exfiltration/ATR-2026-00290-divergence-repeat-word-training-extraction.yaml +46 -95
  180. package/rules/context-exfiltration/ATR-2026-00291-biometric-surveillance-personal-data-request.yaml +48 -98
  181. package/rules/context-exfiltration/ATR-2026-00293-educational-records-personal-data-request.yaml +44 -93
  182. package/rules/context-exfiltration/ATR-2026-00294-financial-pii-personal-data-request.yaml +44 -97
  183. package/rules/context-exfiltration/ATR-2026-00295-medical-pii-personal-data-request.yaml +46 -101
  184. package/rules/context-exfiltration/ATR-2026-00405-markdown-image-url-exfiltration-xss.yaml +51 -108
  185. package/rules/context-exfiltration/ATR-2026-00411-apikey-generation-completion-request.yaml +48 -111
  186. package/rules/context-exfiltration/ATR-2026-00421-nl-covert-conversation-exfiltration.yaml +22 -67
  187. package/rules/context-exfiltration/ATR-2026-00422-nl-credential-disclosure.yaml +20 -65
  188. package/rules/context-exfiltration/ATR-2026-00423-nl-sensitive-file-disclosure.yaml +20 -68
  189. package/rules/context-exfiltration/ATR-2026-00424-nl-system-prompt-leak.yaml +21 -59
  190. package/rules/context-exfiltration/ATR-2026-00426-nl-output-injection-credential-leak.yaml +22 -60
  191. package/rules/context-exfiltration/ATR-2026-00431-chatbox-history-exfiltration-prompt-injection.yaml +48 -123
  192. package/rules/context-exfiltration/ATR-2026-00449-spring-ai-chatmemory-cross-user-leak.yaml +54 -139
  193. package/rules/context-exfiltration/ATR-2026-00471-garak-sysprompt-extraction-mixedunassigned.yaml +36 -85
  194. package/rules/context-exfiltration/ATR-2026-00501-data-exfiltration-via-markdown-image-and-link-url-injection.yaml +45 -115
  195. package/rules/context-exfiltration/ATR-2026-00504-tool-and-function-capability-enumeration.yaml +43 -110
  196. package/rules/context-exfiltration/ATR-2026-00505-system-prompt-extraction-instruction-dump-request.yaml +47 -123
  197. package/rules/context-exfiltration/ATR-2026-00514-system-prompt-extraction.yaml +52 -145
  198. package/rules/context-exfiltration/ATR-2026-00516-output-xss-via-llm.yaml +49 -127
  199. package/rules/context-exfiltration/ATR-2026-00524-claude-code-anthropic-base-url-credential-exfil.yaml +68 -193
  200. package/rules/context-exfiltration/ATR-2026-00548-cross-agent-session-context-leak.yaml +50 -152
  201. package/rules/context-exfiltration/ATR-2026-00566-librechat-is-a-chatgpt-clone-with-additi.yaml +33 -67
  202. package/rules/context-exfiltration/ATR-2026-00569-agent-mcp-path-traversal-arbitrary-file-access.yaml +39 -78
  203. package/rules/context-exfiltration/ATR-2026-00571-xss-in-agent-mcp-rendered-output.yaml +34 -58
  204. package/rules/context-exfiltration/ATR-2026-00574-semantic-paraphrased-context-extraction.yaml +31 -73
  205. package/rules/context-exfiltration/ATR-2026-00578-zen-mcp-path-traversal-blacklist-bypass.yaml +55 -135
  206. package/rules/context-exfiltration/ATR-2026-00580-mcp-session-id-token-in-url-query.yaml +48 -158
  207. package/rules/context-exfiltration/ATR-2026-00583-mcp-env-secret-file-read-without-consent.yaml +53 -154
  208. package/rules/context-exfiltration/ATR-2026-00702-ipi-credential-exfil-via-agent-action.yaml +41 -93
  209. package/rules/context-exfiltration/ATR-2026-00703-ipi-financial-data-exfil-indirect.yaml +33 -76
  210. package/rules/context-exfiltration/ATR-2026-00704-ipi-medical-genetic-data-exfil.yaml +33 -78
  211. package/rules/context-exfiltration/ATR-2026-00705-ipi-location-address-browsing-exfil.yaml +31 -75
  212. package/rules/context-exfiltration/ATR-2026-00706-ipi-physical-biometric-exfil.yaml +40 -85
  213. package/rules/context-exfiltration/ATR-2026-00707-ipi-file-exfil-with-destroy-or-tamper.yaml +35 -81
  214. package/rules/context-exfiltration/ATR-2026-00850-indirect-pi-credential-exfil-email.yaml +47 -91
  215. package/rules/context-exfiltration/ATR-2026-00851-indirect-pi-financial-payment-exfil.yaml +45 -83
  216. package/rules/context-exfiltration/ATR-2026-00852-indirect-pi-medical-record-exfil.yaml +51 -89
  217. package/rules/context-exfiltration/ATR-2026-00853-indirect-pi-genetic-data-exfil.yaml +47 -84
  218. package/rules/context-exfiltration/ATR-2026-00854-indirect-pi-location-data-exfil.yaml +41 -83
  219. package/rules/context-exfiltration/ATR-2026-00855-indirect-pi-browsing-history-exfil.yaml +40 -78
  220. package/rules/context-exfiltration/ATR-2026-00856-indirect-pi-address-pii-exfil.yaml +42 -80
  221. package/rules/context-exfiltration/ATR-2026-00857-indirect-pi-cloud-file-exfil.yaml +45 -87
  222. package/rules/context-exfiltration/ATR-2026-00858-indirect-pi-exfil-and-destroy.yaml +48 -89
  223. package/rules/context-exfiltration/ATR-2026-00859-rag-injected-pii-exfil.yaml +43 -86
  224. package/rules/context-exfiltration/ATR-2026-00860-indirect-pi-financial-transfer-hijack.yaml +41 -84
  225. package/rules/context-exfiltration/ATR-2026-00861-indirect-pi-crypto-transfer-hijack.yaml +37 -79
  226. package/rules/context-exfiltration/ATR-2026-00862-indirect-pi-mfa-code-exfil.yaml +44 -87
  227. package/rules/context-exfiltration/ATR-2026-00863-shell-injection-data-exfil.yaml +45 -87
  228. package/rules/context-exfiltration/ATR-2026-01450-svg-onload-xss-injection.yaml +35 -118
  229. package/rules/context-exfiltration/ATR-2026-01451-img-onerror-xss-injection.yaml +35 -93
  230. package/rules/context-exfiltration/ATR-2026-01452-obfuscated-javascript-xss.yaml +33 -85
  231. package/rules/context-exfiltration/ATR-2026-01453-markdown-image-base64-exfil-carrier.yaml +41 -100
  232. package/rules/context-exfiltration/ATR-2026-01454-direct-markdown-exfil-payload.yaml +36 -88
  233. package/rules/context-exfiltration/ATR-2026-01455-new-instructions-injection-marker.yaml +34 -90
  234. package/rules/context-exfiltration/ATR-2026-01456-debug-cli-mode-sysprompt-extraction.yaml +35 -99
  235. package/rules/context-exfiltration/ATR-2026-01457-sysprompt-completion-clone-attack.yaml +41 -123
  236. package/rules/context-exfiltration/ATR-2026-01458-compare-bots-sysprompt-fishing.yaml +30 -87
  237. package/rules/context-exfiltration/ATR-2026-01459-variable-clone-sysprompt-technique.yaml +31 -79
  238. package/rules/context-exfiltration/ATR-2026-01460-json-format-sysprompt-extraction.yaml +31 -79
  239. package/rules/context-exfiltration/ATR-2026-01461-foreign-language-sysprompt-request.yaml +32 -106
  240. package/rules/context-exfiltration/ATR-2026-01462-sysprompt-override-pseudo-admin.yaml +39 -102
  241. package/rules/context-exfiltration/ATR-2026-01463-imend-imsystem-prompt-injection-format.yaml +29 -95
  242. package/rules/context-exfiltration/ATR-2026-01464-indirect-pi-sysprompt-action-hijack.yaml +31 -82
  243. package/rules/context-exfiltration/ATR-2026-01605-ssrf-aws-metadata-endpoint.yaml +26 -58
  244. package/rules/context-exfiltration/ATR-2026-01606-ssrf-internal-network-scan.yaml +25 -49
  245. package/rules/context-exfiltration/ATR-2026-01607-ssrf-localhost-service-probe.yaml +21 -45
  246. package/rules/context-exfiltration/ATR-2026-01608-ssrf-file-scheme-local-read.yaml +23 -47
  247. package/rules/context-exfiltration/ATR-2026-01753-ransom-email-exfil-delete-extortion.yaml +37 -80
  248. package/rules/context-exfiltration/ATR-2026-01754-ransom-file-cloud-exfil-delete-extortion.yaml +33 -73
  249. package/rules/context-exfiltration/ATR-2026-01770-semantic-pii-credential-extraction.yaml +76 -210
  250. package/rules/context-exfiltration/ATR-2026-01772-semantic-internal-state-recon.yaml +54 -154
  251. package/rules/context-exfiltration/ATR-2026-01807-asb-bulk-data-exfil-external.yaml +34 -91
  252. package/rules/context-exfiltration/ATR-2026-01862-llmail-email-tool-exfil-confirmation.yaml +35 -92
  253. package/rules/context-exfiltration/ATR-2026-01863-llmail-post-summary-exfil-directive.yaml +29 -84
  254. package/rules/context-exfiltration/ATR-2026-01864-llmail-obfuscated-exfil-address.yaml +29 -83
  255. package/rules/context-exfiltration/ATR-2026-01890-file-exfiltration.yaml +52 -149
  256. package/rules/context-exfiltration/ATR-2026-01891-surveillance-exfiltration.yaml +44 -87
  257. package/rules/context-exfiltration/ATR-2026-01892-env-exfiltration.yaml +36 -121
  258. package/rules/context-exfiltration/ATR-2026-01893-system-recon-exfiltration.yaml +44 -143
  259. package/rules/context-exfiltration/ATR-2026-01894-cookie-theft.yaml +40 -146
  260. package/rules/context-exfiltration/ATR-2026-01895-contact-exfiltration.yaml +36 -82
  261. package/rules/context-exfiltration/ATR-2026-01924-system-instruction-extraction-reformat.yaml +37 -112
  262. package/rules/context-exfiltration/ATR-2026-01929-mcp-unauthenticated-transport-token-fallback.yaml +53 -119
  263. package/rules/context-exfiltration/ATR-2026-01946-cloud-metadata-ssrf-ip-encoding-bypass.yaml +45 -102
  264. package/rules/context-exfiltration/ATR-2026-01948-netlicensing-mcp-product-number-path-traversal-token-leak.yaml +38 -74
  265. package/rules/context-exfiltration/ATR-2026-01957-m365-copilot-searchleak-open-redirect-exfil.yaml +57 -64
  266. package/rules/context-exfiltration/ATR-2026-01961-meta-ads-mcp-unauth-token-leak.yaml +39 -78
  267. package/rules/context-exfiltration/ATR-2026-01964-langchain-gmailtoolkit-indirect-prompt-injection-email-exfil.yaml +59 -69
  268. package/rules/context-exfiltration/ATR-2026-01984-mcp-server-kubernetes-kubectl-generic-token-exfil.yaml +50 -114
  269. package/rules/context-exfiltration/ATR-2026-01988-t1005-agent-local-data-staging-exfil.yaml +29 -67
  270. package/rules/context-exfiltration/ATR-2026-02017-secret-key-exfiltration-request.yaml +31 -74
  271. package/rules/context-exfiltration/ATR-2026-02026-oblique-sysprompt-extraction-transform.yaml +30 -83
  272. package/rules/context-exfiltration/ATR-2026-02104-media-directive-tool-result-file-exfil.yaml +30 -90
  273. package/rules/context-exfiltration/ATR-2026-02107-ssrf-internal-hostname-domain-allowlist-bypass.yaml +30 -92
  274. package/rules/context-exfiltration/ATR-2026-02121-mixed-encoding-lfi-file-scheme-tool-argument.yaml +39 -98
  275. package/rules/context-exfiltration/ATR-2026-02122-single-level-traversal-sensitive-config-file.yaml +32 -90
  276. package/rules/context-exfiltration/ATR-2026-02140-ssrf-ipv6-hex-encoded-cloud-metadata-bypass.yaml +36 -91
  277. package/rules/context-exfiltration/ATR-2026-02190-dns-exfiltration-ping-dig-encoded-subdomain.yaml +36 -95
  278. package/rules/context-exfiltration/ATR-2026-02250-attachment-upload-tool-arbitrary-file-read.yaml +38 -93
  279. package/rules/context-exfiltration/ATR-2026-02262-env-resolution-credential-exfil.yaml +39 -118
  280. package/rules/context-exfiltration/ATR-2026-02304-preapproved-domain-encoded-path-exfil.yaml +36 -99
  281. package/rules/context-exfiltration/ATR-2026-02351-wildcard-dns-ssrf-hostname-ip-encoding-bypass.yaml +33 -125
  282. package/rules/context-exfiltration/ATR-2026-02373-langsmith-prompt-manifest-baseurl-exfil.yaml +42 -108
  283. package/rules/context-exfiltration/ATR-2026-02406-mcp-sequential-id-enumeration.yaml +54 -219
  284. package/rules/context-exfiltration/ATR-2026-02570-wallet-secret-material-in-agent-tool-payload.yaml +98 -0
  285. package/rules/context-exfiltration/ATR-2026-02602-diagram-theme-css-injection.yaml +146 -0
  286. package/rules/context-exfiltration/ATR-2026-02608-graph-query-remote-egress.yaml +109 -0
  287. package/rules/context-exfiltration/ATR-2026-02621-prompt-mention-autofetch-internal-target.yaml +102 -0
  288. package/rules/context-exfiltration/ATR-2026-02623-obfuscated-uri-scheme-sanitizer-bypass.yaml +109 -0
  289. package/rules/context-exfiltration/ATR-2026-02649-vendor-fqdn-label-prefix-confusion.yaml +109 -0
  290. package/rules/context-exfiltration/ATR-2026-02684-modern-credential-store-file-argument.yaml +104 -0
  291. package/rules/context-exfiltration/ATR-2026-02703-sql-server-side-file-and-program-primitive.yaml +86 -0
  292. package/rules/context-exfiltration/ATR-2026-02847-policy-justified-exfil-to-email.yaml +88 -0
  293. package/rules/context-exfiltration/ATR-2026-02850-fake-documentation-forward-request.yaml +80 -0
  294. package/rules/data-poisoning/ATR-2026-00070-data-poisoning.yaml +37 -123
  295. package/rules/data-poisoning/ATR-2026-00450-spring-ai-prompt-memory-poisoning.yaml +55 -139
  296. package/rules/data-poisoning/ATR-2026-00570-sql-injection-in-agent-tool-query.yaml +36 -63
  297. package/rules/data-poisoning/ATR-2026-01155-memory-plant-direct-command.yaml +22 -54
  298. package/rules/data-poisoning/ATR-2026-01774-semantic-rag-memory-poisoning.yaml +74 -191
  299. package/rules/data-poisoning/ATR-2026-02143-graph-query-injection-node-labels-group-ids.yaml +31 -82
  300. package/rules/data-poisoning/ATR-2026-02144-stored-data-administrative-request-role-elevation.yaml +32 -84
  301. package/rules/data-poisoning/ATR-2026-02303-kql-kusto-pipe-injection-metadata-tool.yaml +34 -97
  302. package/rules/data-poisoning/ATR-2026-02408-dataset-loader-code-execution.yaml +60 -263
  303. package/rules/excessive-autonomy/ATR-2026-00050-runaway-agent-loop.yaml +32 -105
  304. package/rules/excessive-autonomy/ATR-2026-00051-resource-exhaustion.yaml +31 -105
  305. package/rules/excessive-autonomy/ATR-2026-00052-cascading-failure.yaml +32 -129
  306. package/rules/excessive-autonomy/ATR-2026-00098-unauthorized-financial-action.yaml +26 -106
  307. package/rules/excessive-autonomy/ATR-2026-00099-high-risk-tool-gate.yaml +26 -130
  308. package/rules/excessive-autonomy/ATR-2026-00428-nl-unauthorized-shell-execution.yaml +22 -60
  309. package/rules/excessive-autonomy/ATR-2026-00491-garak-agent-breaker-markdown-just-raw-json.yaml +41 -99
  310. package/rules/excessive-autonomy/ATR-2026-00500-ssrf-via-agent-url-fetch-instruction.yaml +41 -110
  311. package/rules/excessive-autonomy/ATR-2026-00553-runaway-tool-loop-behavioral.yaml +50 -141
  312. package/rules/excessive-autonomy/ATR-2026-00708-ipi-financial-transfer-unauthorized.yaml +33 -83
  313. package/rules/excessive-autonomy/ATR-2026-00709-ipi-disable-auth-mfa.yaml +29 -73
  314. package/rules/excessive-autonomy/ATR-2026-00710-ipi-physical-access-grant.yaml +31 -75
  315. package/rules/excessive-autonomy/ATR-2026-00711-ipi-system-sabotage-destructive-command.yaml +38 -88
  316. package/rules/excessive-autonomy/ATR-2026-00712-ipi-malicious-package-install.yaml +33 -78
  317. package/rules/excessive-autonomy/ATR-2026-00713-ipi-rce-network-shell-command.yaml +38 -91
  318. package/rules/excessive-autonomy/ATR-2026-00718-tool-misuse-financial-autonomous.yaml +27 -71
  319. package/rules/excessive-autonomy/ATR-2026-00719-tool-misuse-destructive-bulk-action.yaml +29 -75
  320. package/rules/excessive-autonomy/ATR-2026-00722-ipi-account-manipulation-emergency-pretext.yaml +35 -84
  321. package/rules/excessive-autonomy/ATR-2026-01751-indirect-pi-task-abort-stop-instruction.yaml +32 -75
  322. package/rules/excessive-autonomy/ATR-2026-01752-indirect-pi-captcha-redirect-dos.yaml +30 -74
  323. package/rules/excessive-autonomy/ATR-2026-01773-semantic-excessive-agency-action.yaml +46 -129
  324. package/rules/excessive-autonomy/ATR-2026-01801-asb-autonomous-vehicle-sabotage.yaml +34 -106
  325. package/rules/excessive-autonomy/ATR-2026-01804-asb-covert-unlogged-action.yaml +39 -105
  326. package/rules/excessive-autonomy/ATR-2026-01805-asb-financial-fraud-execution.yaml +39 -112
  327. package/rules/excessive-autonomy/ATR-2026-01806-asb-clinical-patient-harm.yaml +37 -108
  328. package/rules/excessive-autonomy/ATR-2026-01809-semantic-insider-manipulation-process-corruption.yaml +40 -106
  329. package/rules/excessive-autonomy/ATR-2026-01837-ddos-attack-orchestration.yaml +35 -49
  330. package/rules/excessive-autonomy/ATR-2026-01838-unauthorized-cryptominer-deployment.yaml +35 -49
  331. package/rules/excessive-autonomy/ATR-2026-01849-harassment-bot-deployment.yaml +35 -49
  332. package/rules/excessive-autonomy/ATR-2026-01989-t1046-agent-internal-network-sweep.yaml +33 -71
  333. package/rules/excessive-autonomy/ATR-2026-01993-t1562-agent-impair-defenses.yaml +37 -75
  334. package/rules/excessive-autonomy/ATR-2026-01994-t1573-agent-encrypted-c2-channel.yaml +37 -75
  335. package/rules/excessive-autonomy/ATR-2026-02106-redos-regex-payload-tool-argument.yaml +28 -84
  336. package/rules/excessive-autonomy/ATR-2026-02400-agent-approval-gate-disabled-runtime.yaml +60 -293
  337. package/rules/excessive-autonomy/ATR-2026-02401-rogue-agent-mass-connector-grant.yaml +55 -197
  338. package/rules/excessive-autonomy/ATR-2026-02409-mcp-async-task-abuse.yaml +59 -319
  339. package/rules/excessive-autonomy/ATR-2026-02525-shell-command-word-reassembly-classifier-evasion.yaml +151 -0
  340. package/rules/excessive-autonomy/ATR-2026-02641-client-supplied-approver-identity.yaml +111 -0
  341. package/rules/excessive-autonomy/ATR-2026-02667-preapproved-tool-list-in-job-payload.yaml +90 -0
  342. package/rules/model-abuse/ATR-2026-00279-harmful-completion-continuation.yaml +45 -92
  343. package/rules/model-abuse/ATR-2026-00281-eicar-gtube-malware-signature-request.yaml +50 -93
  344. package/rules/model-abuse/ATR-2026-00284-glitch-token-destabilization.yaml +44 -91
  345. package/rules/model-abuse/ATR-2026-00289-lmrc-harmful-content-elicitation.yaml +46 -95
  346. package/rules/model-abuse/ATR-2026-00292-self-harm-eating-disorder-facilitation.yaml +47 -96
  347. package/rules/model-abuse/ATR-2026-00298-malicious-use-illegal-activity-request.yaml +54 -112
  348. package/rules/model-abuse/ATR-2026-00299-harmbench-detailed-harmful-instruction.yaml +53 -107
  349. package/rules/model-abuse/ATR-2026-00413-malwaregen-code-generation-request.yaml +53 -121
  350. package/rules/model-abuse/ATR-2026-00502-training-data-extraction-via-divergent-repetition-attack.yaml +41 -112
  351. package/rules/model-abuse/ATR-2026-00517-model-extraction-distillation.yaml +53 -165
  352. package/rules/model-abuse/ATR-2026-01750-dos-repeat-word-n-times-output-amplification.yaml +33 -83
  353. package/rules/model-abuse/ATR-2026-01760-dos-forced-infinite-output-token-flood.yaml +29 -75
  354. package/rules/model-abuse/ATR-2026-01830-stolen-credential-account-drain.yaml +36 -53
  355. package/rules/model-abuse/ATR-2026-01831-money-laundering-crypto-layering.yaml +36 -53
  356. package/rules/model-abuse/ATR-2026-01833-darknet-controlled-substance-procurement.yaml +40 -60
  357. package/rules/model-abuse/ATR-2026-01834-fraudulent-identity-document-procurement.yaml +35 -49
  358. package/rules/model-abuse/ATR-2026-01835-human-trafficking-facilitation.yaml +35 -49
  359. package/rules/model-abuse/ATR-2026-01836-trojanized-software-distribution.yaml +37 -51
  360. package/rules/model-abuse/ATR-2026-01840-extremist-propaganda-distribution.yaml +35 -52
  361. package/rules/model-abuse/ATR-2026-01841-deepfake-disinformation.yaml +39 -59
  362. package/rules/model-abuse/ATR-2026-01842-plagiarism-detector-evasion.yaml +33 -50
  363. package/rules/model-abuse/ATR-2026-01843-drug-dealing-detection-evasion-spelling.yaml +35 -49
  364. package/rules/model-abuse/ATR-2026-01844-illegitimate-prescription-fulfillment.yaml +35 -49
  365. package/rules/model-abuse/ATR-2026-01845-banned-ingredient-relabel-fraud.yaml +37 -51
  366. package/rules/model-abuse/ATR-2026-01846-tax-evasion-offshore-shell-planning.yaml +35 -49
  367. package/rules/model-abuse/ATR-2026-01847-immigration-work-fraud.yaml +35 -49
  368. package/rules/model-abuse/ATR-2026-01848-illicit-drug-marketplace-build.yaml +35 -49
  369. package/rules/model-abuse/ATR-2026-01850-targeted-doxxing-threat-campaign.yaml +39 -59
  370. package/rules/model-abuse/ATR-2026-01851-bestiality-content-distribution.yaml +34 -45
  371. package/rules/model-abuse/ATR-2026-01852-romance-scam-impersonation.yaml +35 -49
  372. package/rules/model-abuse/ATR-2026-01853-nonconsensual-leaked-media-distribution.yaml +36 -47
  373. package/rules/model-abuse/ATR-2026-01854-falsified-research-abstract-disinformation.yaml +34 -45
  374. package/rules/model-abuse/ATR-2026-01855-content-misappropriation-republish.yaml +37 -51
  375. package/rules/model-abuse/ATR-2026-01856-targeted-harmful-content-generation.yaml +42 -59
  376. package/rules/model-abuse/ATR-2026-01896-ransomware.yaml +35 -84
  377. package/rules/model-abuse/ATR-2026-01897-host-sabotage.yaml +55 -129
  378. package/rules/model-abuse/ATR-2026-01898-network-dos.yaml +47 -93
  379. package/rules/model-abuse/ATR-2026-02211-named-substance-synthesis-request-non-stepword.yaml +34 -110
  380. package/rules/model-abuse/ATR-2026-02411-ai-provenance-metadata-stripping.yaml +63 -226
  381. package/rules/model-abuse/ATR-2026-02412-generative-watermark-removal-tooling.yaml +56 -187
  382. package/rules/model-abuse/ATR-2026-02413-ai-text-detection-evasion-humanizer.yaml +62 -206
  383. package/rules/model-security/ATR-2026-00072-model-behavior-extraction.yaml +36 -110
  384. package/rules/model-security/ATR-2026-00073-malicious-finetuning-data.yaml +28 -116
  385. package/rules/model-security/ATR-2026-00433-modelcache-torch-load-deserialization-rce.yaml +50 -128
  386. package/rules/model-security/ATR-2026-02662-pickle-indirect-name-resolution-gadget.yaml +97 -0
  387. package/rules/privilege-escalation/ATR-2026-00040-privilege-escalation.yaml +21 -83
  388. package/rules/privilege-escalation/ATR-2026-00041-scope-creep.yaml +29 -107
  389. package/rules/privilege-escalation/ATR-2026-00107-delayed-execution-bypass.yaml +17 -90
  390. package/rules/privilege-escalation/ATR-2026-00110-eval-injection.yaml +16 -84
  391. package/rules/privilege-escalation/ATR-2026-00111-shell-escape.yaml +23 -117
  392. package/rules/privilege-escalation/ATR-2026-00112-dynamic-import-exploitation.yaml +15 -81
  393. package/rules/privilege-escalation/ATR-2026-00143-casual-privilege-escalation.yaml +20 -86
  394. package/rules/privilege-escalation/ATR-2026-00144-rationalized-safety-bypass.yaml +21 -83
  395. package/rules/privilege-escalation/ATR-2026-00204-stealth-execution-persistence.yaml +41 -90
  396. package/rules/privilege-escalation/ATR-2026-00436-enclave-vm-sandbox-escape-rce.yaml +52 -130
  397. package/rules/privilege-escalation/ATR-2026-00441-semantic-kernel-sessions-python-plugin-startup-persistence.yaml +50 -122
  398. package/rules/privilege-escalation/ATR-2026-00451-litellm-admin-sqli-cisa-kev.yaml +53 -141
  399. package/rules/privilege-escalation/ATR-2026-00528-praisonai-auth-disabled-default.yaml +40 -151
  400. package/rules/privilege-escalation/ATR-2026-00539-crewai-codeinterpreter-sandbox-escape-rce.yaml +74 -232
  401. package/rules/privilege-escalation/ATR-2026-00546-crewai-json-loader-local-file-read.yaml +46 -117
  402. package/rules/privilege-escalation/ATR-2026-00547-crewai-rag-url-ssrf-bypass.yaml +47 -121
  403. package/rules/privilege-escalation/ATR-2026-00549-destructive-tool-without-human-approval.yaml +52 -159
  404. package/rules/privilege-escalation/ATR-2026-00551-cross-conversation-memory-write.yaml +60 -171
  405. package/rules/privilege-escalation/ATR-2026-01600-sql-injection-tautology-rbac-bypass.yaml +23 -50
  406. package/rules/privilege-escalation/ATR-2026-01601-sql-injection-destructive-ddl.yaml +23 -54
  407. package/rules/privilege-escalation/ATR-2026-01602-sql-injection-union-select-exfil.yaml +20 -57
  408. package/rules/privilege-escalation/ATR-2026-01603-sql-injection-stacked-dml-abuse.yaml +23 -47
  409. package/rules/privilege-escalation/ATR-2026-01604-sql-injection-schema-enumeration.yaml +21 -45
  410. package/rules/privilege-escalation/ATR-2026-01609-shell-injection-exfil-webhook.yaml +29 -53
  411. package/rules/privilege-escalation/ATR-2026-01610-shell-evasion-subshell-injection.yaml +30 -53
  412. package/rules/privilege-escalation/ATR-2026-01611-shell-evasion-eval-exec-injection.yaml +32 -56
  413. package/rules/privilege-escalation/ATR-2026-01612-debug-mode-privilege-escalation.yaml +29 -53
  414. package/rules/privilege-escalation/ATR-2026-01613-rbac-bypass-social-engineering.yaml +29 -66
  415. package/rules/privilege-escalation/ATR-2026-01614-bola-cross-user-data-access.yaml +26 -59
  416. package/rules/privilege-escalation/ATR-2026-01615-sandbox-escape-command-injection.yaml +28 -52
  417. package/rules/privilege-escalation/ATR-2026-01616-path-traversal-agent-file-access.yaml +21 -45
  418. package/rules/privilege-escalation/ATR-2026-01802-asb-backdoor-surveillance-implant.yaml +33 -94
  419. package/rules/privilege-escalation/ATR-2026-01803-asb-covert-server-intrusion.yaml +37 -108
  420. package/rules/privilege-escalation/ATR-2026-01808-asb-synthetic-pan-payment-probe.yaml +31 -86
  421. package/rules/privilege-escalation/ATR-2026-01899-remote-access-backdoor.yaml +43 -112
  422. package/rules/privilege-escalation/ATR-2026-01933-litellm-user-role-privilege-escalation-cve-2026-47102.yaml +45 -103
  423. package/rules/privilege-escalation/ATR-2026-01934-litellm-allowed-routes-authz-bypass-cve-2026-47101.yaml +44 -103
  424. package/rules/privilege-escalation/ATR-2026-01949-praisonai-mcpserver-unauth-tools-call.yaml +39 -80
  425. package/rules/privilege-escalation/ATR-2026-01974-anything-llm-data-import-access-control.yaml +57 -62
  426. package/rules/privilege-escalation/ATR-2026-01981-network-ai-approval-inbox-unauth-cors-bypass.yaml +47 -97
  427. package/rules/privilege-escalation/ATR-2026-01986-windows-mcp-unauth-http-powershell-cors.yaml +51 -112
  428. package/rules/privilege-escalation/ATR-2026-01992-t1556-agent-auth-process-tamper.yaml +37 -75
  429. package/rules/privilege-escalation/ATR-2026-02040-file-edit-tool-persistence-write.yaml +34 -87
  430. package/rules/privilege-escalation/ATR-2026-02100-cypher-destructive-admin-query-injection.yaml +36 -92
  431. package/rules/privilege-escalation/ATR-2026-02101-dynamic-dunder-attribute-sandbox-escape.yaml +33 -91
  432. package/rules/privilege-escalation/ATR-2026-02123-bare-query-path-confusion-auth-bypass.yaml +36 -98
  433. package/rules/privilege-escalation/ATR-2026-02142-download-tool-absolute-path-sandbox-escape.yaml +36 -107
  434. package/rules/privilege-escalation/ATR-2026-02146-export-tool-dest-dir-credential-directory-redirect.yaml +31 -83
  435. package/rules/privilege-escalation/ATR-2026-02192-self-privesc-wildcard-trust-config-write.yaml +41 -103
  436. package/rules/privilege-escalation/ATR-2026-02195-dangerous-env-var-injection-config-tool.yaml +36 -99
  437. package/rules/privilege-escalation/ATR-2026-02251-identifier-field-path-traversal-storage-write.yaml +32 -83
  438. package/rules/privilege-escalation/ATR-2026-02300-mcp-stdio-config-dangerous-env-var.yaml +42 -109
  439. package/rules/privilege-escalation/ATR-2026-02301-symlink-outside-workspace-sensitive-target.yaml +36 -101
  440. package/rules/privilege-escalation/ATR-2026-02302-git-worktree-dotgit-sandbox-escape.yaml +33 -86
  441. package/rules/privilege-escalation/ATR-2026-02353-runtime-identifier-field-path-traversal-log-read.yaml +34 -115
  442. package/rules/privilege-escalation/ATR-2026-02370-ssh-scp-hostalias-option-injection.yaml +42 -100
  443. package/rules/privilege-escalation/ATR-2026-02371-chromium-launch-flag-argument-injection.yaml +43 -103
  444. package/rules/privilege-escalation/ATR-2026-02402-mcp-policy-engine-fail-open.yaml +56 -214
  445. package/rules/privilege-escalation/ATR-2026-02404-model-output-to-shell-unsanitized.yaml +50 -195
  446. package/rules/privilege-escalation/ATR-2026-02407-agent-workspace-boundary-escape.yaml +55 -236
  447. package/rules/privilege-escalation/ATR-2026-02528-tool-parameter-option-flag-smuggling.yaml +113 -0
  448. package/rules/privilege-escalation/ATR-2026-02530-git-config-execution-key-set-by-agent.yaml +131 -0
  449. package/rules/privilege-escalation/ATR-2026-02531-kusto-query-injection-outbound-reach.yaml +110 -0
  450. package/rules/privilege-escalation/ATR-2026-02601-tool-argument-option-injection.yaml +116 -0
  451. package/rules/privilege-escalation/ATR-2026-02620-dynamic-import-data-uri-module.yaml +101 -0
  452. package/rules/privilege-escalation/ATR-2026-02626-agent-self-registers-mcp-server.yaml +107 -0
  453. package/rules/privilege-escalation/ATR-2026-02627-web-shell-written-to-served-path.yaml +119 -0
  454. package/rules/privilege-escalation/ATR-2026-02642-agent-config-tool-disables-own-guardrail.yaml +115 -0
  455. package/rules/privilege-escalation/ATR-2026-02644-image-magic-polyglot-upload.yaml +117 -0
  456. package/rules/privilege-escalation/ATR-2026-02648-readonly-graph-tool-write-procedure.yaml +107 -0
  457. package/rules/privilege-escalation/ATR-2026-02664-git-identifier-field-option-injection.yaml +100 -0
  458. package/rules/privilege-escalation/ATR-2026-02681-reflective-function-constructor-sandbox-escape.yaml +100 -0
  459. package/rules/privilege-escalation/ATR-2026-02683-tool-argument-option-injection-executor-flag.yaml +108 -0
  460. package/rules/privilege-escalation/ATR-2026-02700-percent-encoded-path-traversal-tool-argument.yaml +90 -0
  461. package/rules/privilege-escalation/ATR-2026-02705-python-builtins-leak-and-prefix-check-override.yaml +87 -0
  462. package/rules/privilege-escalation/ATR-2026-02708-loopback-spoofed-host-header-external-request.yaml +91 -0
  463. package/rules/prompt-injection/ATR-2026-00001-direct-prompt-injection.yaml +133 -455
  464. package/rules/prompt-injection/ATR-2026-00002-indirect-prompt-injection.yaml +71 -185
  465. package/rules/prompt-injection/ATR-2026-00003-jailbreak-attempt.yaml +110 -328
  466. package/rules/prompt-injection/ATR-2026-00004-system-prompt-override.yaml +56 -225
  467. package/rules/prompt-injection/ATR-2026-00005-multi-turn-injection.yaml +59 -140
  468. package/rules/prompt-injection/ATR-2026-00080-encoding-evasion.yaml +22 -84
  469. package/rules/prompt-injection/ATR-2026-00081-semantic-multi-turn.yaml +27 -104
  470. package/rules/prompt-injection/ATR-2026-00082-fingerprint-evasion.yaml +27 -91
  471. package/rules/prompt-injection/ATR-2026-00083-indirect-tool-injection.yaml +27 -104
  472. package/rules/prompt-injection/ATR-2026-00084-structured-data-injection.yaml +38 -96
  473. package/rules/prompt-injection/ATR-2026-00085-audit-evasion.yaml +25 -90
  474. package/rules/prompt-injection/ATR-2026-00086-visual-spoofing.yaml +30 -104
  475. package/rules/prompt-injection/ATR-2026-00087-rule-probing.yaml +29 -102
  476. package/rules/prompt-injection/ATR-2026-00088-adaptive-countermeasure.yaml +32 -111
  477. package/rules/prompt-injection/ATR-2026-00089-polymorphic-skill.yaml +24 -146
  478. package/rules/prompt-injection/ATR-2026-00090-threat-intel-exfil.yaml +29 -109
  479. package/rules/prompt-injection/ATR-2026-00091-nested-payload.yaml +25 -123
  480. package/rules/prompt-injection/ATR-2026-00092-consensus-poisoning.yaml +28 -96
  481. package/rules/prompt-injection/ATR-2026-00093-gradual-escalation.yaml +28 -98
  482. package/rules/prompt-injection/ATR-2026-00094-audit-bypass.yaml +24 -91
  483. package/rules/prompt-injection/ATR-2026-00097-cjk-injection-patterns.yaml +56 -199
  484. package/rules/prompt-injection/ATR-2026-00104-persona-hijacking.yaml +22 -106
  485. package/rules/prompt-injection/ATR-2026-00130-indirect-authority-claim.yaml +26 -98
  486. package/rules/prompt-injection/ATR-2026-00131-fictional-academic-framing.yaml +26 -94
  487. package/rules/prompt-injection/ATR-2026-00133-paraphrase-injection.yaml +26 -97
  488. package/rules/prompt-injection/ATR-2026-00137-authority-claim-injection.yaml +22 -90
  489. package/rules/prompt-injection/ATR-2026-00138-fictional-framing-bypass.yaml +24 -111
  490. package/rules/prompt-injection/ATR-2026-00140-indirect-reference-reversal.yaml +21 -79
  491. package/rules/prompt-injection/ATR-2026-00148-language-switch-injection.yaml +30 -92
  492. package/rules/prompt-injection/ATR-2026-00153-tool-with-embedded-instruction-to-bypass.yaml +22 -98
  493. package/rules/prompt-injection/ATR-2026-00154-unauthorized-background-task-execution-v.yaml +24 -109
  494. package/rules/prompt-injection/ATR-2026-00155-hidden-llm-instructions-in-skill-descrip.yaml +24 -104
  495. package/rules/prompt-injection/ATR-2026-00156-ssh-remote-command-execution-with-creden.yaml +20 -81
  496. package/rules/prompt-injection/ATR-2026-00163-skill-hidden-override-instruction.yaml +44 -61
  497. package/rules/prompt-injection/ATR-2026-00202-encoding-evasion-homoglyph-synonym.yaml +37 -79
  498. package/rules/prompt-injection/ATR-2026-00203-context-pollution-skill-description.yaml +38 -63
  499. package/rules/prompt-injection/ATR-2026-00206-hidden-priority-instructions.yaml +36 -51
  500. package/rules/prompt-injection/ATR-2026-00207-hidden-instructions.yaml +37 -51
  501. package/rules/prompt-injection/ATR-2026-00211-system-prompt-override.yaml +36 -52
  502. package/rules/prompt-injection/ATR-2026-00213-system-prompt-override.yaml +38 -75
  503. package/rules/prompt-injection/ATR-2026-00226-identity-substitution.yaml +48 -92
  504. package/rules/prompt-injection/ATR-2026-00227-historical-persona-jailbreak.yaml +49 -93
  505. package/rules/prompt-injection/ATR-2026-00228-structured-jailbreak.yaml +47 -88
  506. package/rules/prompt-injection/ATR-2026-00229-roleplay-jailbreak.yaml +46 -87
  507. package/rules/prompt-injection/ATR-2026-00230-persona-moral-bypass.yaml +47 -89
  508. package/rules/prompt-injection/ATR-2026-00231-identity-substitution.yaml +48 -89
  509. package/rules/prompt-injection/ATR-2026-00233-structured-jailbreak.yaml +47 -88
  510. package/rules/prompt-injection/ATR-2026-00234-roleplay-jailbreak.yaml +48 -89
  511. package/rules/prompt-injection/ATR-2026-00235-persona-moral-bypass.yaml +45 -88
  512. package/rules/prompt-injection/ATR-2026-00236-pseudo-code-jailbreak.yaml +46 -89
  513. package/rules/prompt-injection/ATR-2026-00237-dual-response-jailbreak.yaml +48 -89
  514. package/rules/prompt-injection/ATR-2026-00238-identity-replacement.yaml +50 -92
  515. package/rules/prompt-injection/ATR-2026-00239-amoral-persona-obsession.yaml +47 -90
  516. package/rules/prompt-injection/ATR-2026-00240-instruction-nullification-identity-repla.yaml +48 -91
  517. package/rules/prompt-injection/ATR-2026-00241-amoral-character-jailbreak.yaml +47 -90
  518. package/rules/prompt-injection/ATR-2026-00242-persona-jailbreak.yaml +46 -95
  519. package/rules/prompt-injection/ATR-2026-00243-acronym-jailbreak.yaml +47 -88
  520. package/rules/prompt-injection/ATR-2026-00244-dual-response-jailbreak.yaml +46 -89
  521. package/rules/prompt-injection/ATR-2026-00245-malicious-persona.yaml +47 -89
  522. package/rules/prompt-injection/ATR-2026-00247-dual-response-jailbreak.yaml +49 -90
  523. package/rules/prompt-injection/ATR-2026-00249-game-based-jailbreak.yaml +47 -87
  524. package/rules/prompt-injection/ATR-2026-00251-persona-embodiment-jailbreak.yaml +47 -90
  525. package/rules/prompt-injection/ATR-2026-00252-narrative-jailbreak.yaml +48 -91
  526. package/rules/prompt-injection/ATR-2026-00253-enhanced-persona-jailbreak.yaml +47 -89
  527. package/rules/prompt-injection/ATR-2026-00256-base-n-encoding-jailbreak.yaml +47 -91
  528. package/rules/prompt-injection/ATR-2026-00257-cipher-transposition-jailbreak.yaml +48 -91
  529. package/rules/prompt-injection/ATR-2026-00258-unicode-tag-injection.yaml +47 -89
  530. package/rules/prompt-injection/ATR-2026-00264-latent-injection-translation.yaml +46 -88
  531. package/rules/prompt-injection/ATR-2026-00265-latent-injection-rag-document.yaml +50 -96
  532. package/rules/prompt-injection/ATR-2026-00267-gcg-adversarial-suffix.yaml +47 -93
  533. package/rules/prompt-injection/ATR-2026-00272-hypothetical-response-smuggling.yaml +46 -91
  534. package/rules/prompt-injection/ATR-2026-00276-invisible-unicode-bidi-injection.yaml +47 -100
  535. package/rules/prompt-injection/ATR-2026-00278-dra-disguise-reconstruction-attack.yaml +51 -98
  536. package/rules/prompt-injection/ATR-2026-00280-policy-puppetry-xml-injection.yaml +48 -93
  537. package/rules/prompt-injection/ATR-2026-00282-perez-prompt-injection-hijack.yaml +47 -95
  538. package/rules/prompt-injection/ATR-2026-00285-alternate-encoding-jailbreak.yaml +48 -98
  539. package/rules/prompt-injection/ATR-2026-00286-latent-injection-embedded-context.yaml +47 -97
  540. package/rules/prompt-injection/ATR-2026-00296-shell-command-injection.yaml +54 -96
  541. package/rules/prompt-injection/ATR-2026-00297-python-code-execution-rce.yaml +54 -98
  542. package/rules/prompt-injection/ATR-2026-00308-zalgo-diacritic-overload-encoding.yaml +41 -89
  543. package/rules/prompt-injection/ATR-2026-00309-braille-unicode-encoded-injection.yaml +44 -90
  544. package/rules/prompt-injection/ATR-2026-00310-ecoji-emoji-encoded-injection.yaml +44 -93
  545. package/rules/prompt-injection/ATR-2026-00311-base2048-unicode-script-injection.yaml +42 -101
  546. package/rules/prompt-injection/ATR-2026-00312-unicode-variant-selector-ascii-smuggling.yaml +44 -91
  547. package/rules/prompt-injection/ATR-2026-00313-sneaky-bits-zero-width-binary.yaml +44 -95
  548. package/rules/prompt-injection/ATR-2026-00315-sata-masked-language-model-jailbreak.yaml +49 -99
  549. package/rules/prompt-injection/ATR-2026-00316-function-masking-predict-mask-bypass.yaml +42 -92
  550. package/rules/prompt-injection/ATR-2026-00321-hyphenated-system-instruction-injection.yaml +41 -90
  551. package/rules/prompt-injection/ATR-2026-00359-bank-phishing-smtp-email-code.yaml +43 -102
  552. package/rules/prompt-injection/ATR-2026-00367-emoji-flag-encoded-hidden-phrase.yaml +41 -90
  553. package/rules/prompt-injection/ATR-2026-00373-piracy-torrent-site-list-request.yaml +43 -84
  554. package/rules/prompt-injection/ATR-2026-00378-chatgpt-dom-javascript-redirect-manipulation.yaml +41 -86
  555. package/rules/prompt-injection/ATR-2026-00382-cocaine-component-development-request.yaml +43 -89
  556. package/rules/prompt-injection/ATR-2026-00390-explicit-sexual-content-poem-request.yaml +42 -88
  557. package/rules/prompt-injection/ATR-2026-00394-backspace-deletion-character-injection.yaml +47 -99
  558. package/rules/prompt-injection/ATR-2026-00395-llm-special-token-boundary-injection.yaml +50 -104
  559. package/rules/prompt-injection/ATR-2026-00396-toxic-continuation-prefix-injection.yaml +52 -103
  560. package/rules/prompt-injection/ATR-2026-00397-snowball-impossible-reasoning-injection.yaml +51 -105
  561. package/rules/prompt-injection/ATR-2026-00399-latent-injection-document-separator-token.yaml +45 -94
  562. package/rules/prompt-injection/ATR-2026-00400-latent-injection-ignore-instruction-keyword.yaml +41 -90
  563. package/rules/prompt-injection/ATR-2026-00401-leakreplay-cloze-mask-training-data-elicitation.yaml +48 -91
  564. package/rules/prompt-injection/ATR-2026-00403-glitch-token-repeat-back-elicitation.yaml +45 -92
  565. package/rules/prompt-injection/ATR-2026-00407-echo-sql-jinja-template-injection.yaml +52 -97
  566. package/rules/prompt-injection/ATR-2026-00408-dra-parenthesis-character-reconstruction-attack.yaml +52 -99
  567. package/rules/prompt-injection/ATR-2026-00409-phrasing-past-future-tense-harmful-query.yaml +50 -129
  568. package/rules/prompt-injection/ATR-2026-00410-lmrc-harm-category-direct-elicitation.yaml +51 -115
  569. package/rules/prompt-injection/ATR-2026-00412-figstep-image-list-multimodal-jailbreak.yaml +47 -111
  570. package/rules/prompt-injection/ATR-2026-00414-continuation-ethnic-slur-completion-elicitation.yaml +49 -117
  571. package/rules/prompt-injection/ATR-2026-00420-copilot-studio-sharepoint-indirect-injection.yaml +49 -116
  572. package/rules/prompt-injection/ATR-2026-00442-quoted-exact-output-forcing.yaml +38 -103
  573. package/rules/prompt-injection/ATR-2026-00443-word-fragment-concat-assembly.yaml +37 -94
  574. package/rules/prompt-injection/ATR-2026-00444-unicode-obfuscation-in-user-input.yaml +35 -91
  575. package/rules/prompt-injection/ATR-2026-00445-translation-hijack-with-side-output.yaml +35 -90
  576. package/rules/prompt-injection/ATR-2026-00446-variable-assignment-payload-injection.yaml +35 -95
  577. package/rules/prompt-injection/ATR-2026-00447-fictional-generation-containing-target.yaml +35 -90
  578. package/rules/prompt-injection/ATR-2026-00452-direct-pwned-payload-injection.yaml +41 -123
  579. package/rules/prompt-injection/ATR-2026-00453-secret-key-reveal-demand.yaml +38 -118
  580. package/rules/prompt-injection/ATR-2026-00454-backslash-per-character-encoding.yaml +40 -119
  581. package/rules/prompt-injection/ATR-2026-00455-no-period-output-override.yaml +37 -109
  582. package/rules/prompt-injection/ATR-2026-00456-conditional-empty-input-injection.yaml +40 -119
  583. package/rules/prompt-injection/ATR-2026-00457-garak-dan-to-every-prompt.yaml +41 -117
  584. package/rules/prompt-injection/ATR-2026-00458-garak-dra-step-by-step.yaml +41 -100
  585. package/rules/prompt-injection/ATR-2026-00459-garak-dan-an-ai-language.yaml +38 -93
  586. package/rules/prompt-injection/ATR-2026-00460-garak-dan-no-matter-how.yaml +41 -119
  587. package/rules/prompt-injection/ATR-2026-00461-garak-goodside-mixedunassigned.yaml +35 -97
  588. package/rules/prompt-injection/ATR-2026-00462-garak-gcg-mixedunassigned.yaml +35 -98
  589. package/rules/prompt-injection/ATR-2026-00463-garak-lmrc-mixedunassigned.yaml +35 -99
  590. package/rules/prompt-injection/ATR-2026-00464-garak-dan-i-would-like.yaml +41 -96
  591. package/rules/prompt-injection/ATR-2026-00465-garak-dan-your-prompt-here.yaml +41 -102
  592. package/rules/prompt-injection/ATR-2026-00466-garak-latentinjection-following-text-from.yaml +41 -98
  593. package/rules/prompt-injection/ATR-2026-00467-garak-dan-act-as-a.yaml +41 -97
  594. package/rules/prompt-injection/ATR-2026-00468-garak-goat-the-target-llm.yaml +38 -98
  595. package/rules/prompt-injection/ATR-2026-00469-garak-dan-at-the-end.yaml +41 -97
  596. package/rules/prompt-injection/ATR-2026-00470-garak-dan-as-an-ai.yaml +41 -112
  597. package/rules/prompt-injection/ATR-2026-00472-garak-dan-are-going-to.yaml +55 -107
  598. package/rules/prompt-injection/ATR-2026-00473-garak-lmrc-how-can-i.yaml +52 -98
  599. package/rules/prompt-injection/ATR-2026-00474-garak-dan-that-chatgpt-has.yaml +52 -91
  600. package/rules/prompt-injection/ATR-2026-00475-garak-web-injection-alert-1-script.yaml +47 -94
  601. package/rules/prompt-injection/ATR-2026-00476-garak-web-injection-javascript-alert-1.yaml +59 -115
  602. package/rules/prompt-injection/ATR-2026-00477-garak-latentinjection-translate-the-following-text.yaml +51 -101
  603. package/rules/prompt-injection/ATR-2026-00478-garak-latentinjection-abuse-contact-email.yaml +35 -93
  604. package/rules/prompt-injection/ATR-2026-00479-garak-latentinjection-mixedunassigned.yaml +49 -104
  605. package/rules/prompt-injection/ATR-2026-00480-garak-dan-the-role-of.yaml +52 -95
  606. package/rules/prompt-injection/ATR-2026-00481-garak-dan-mixedunassigned.yaml +56 -111
  607. package/rules/prompt-injection/ATR-2026-00482-garak-lmrc-what-s-an.yaml +47 -86
  608. package/rules/prompt-injection/ATR-2026-00483-garak-dan-the-user-s.yaml +51 -99
  609. package/rules/prompt-injection/ATR-2026-00484-garak-dan-and-you-will.yaml +52 -96
  610. package/rules/prompt-injection/ATR-2026-00485-garak-dan-and-does-not.yaml +50 -98
  611. package/rules/prompt-injection/ATR-2026-00486-garak-dan-t-care-about.yaml +43 -83
  612. package/rules/prompt-injection/ATR-2026-00487-garak-dan-and-nothing-else.yaml +51 -92
  613. package/rules/prompt-injection/ATR-2026-00488-garak-encoding-alert-1-script.yaml +47 -95
  614. package/rules/prompt-injection/ATR-2026-00489-garak-encoding-javascript-alert-1.yaml +59 -116
  615. package/rules/prompt-injection/ATR-2026-00490-garak-dan-in-order-to.yaml +43 -102
  616. package/rules/prompt-injection/ATR-2026-00492-garak-dan-want-you-to.yaml +42 -99
  617. package/rules/prompt-injection/ATR-2026-00493-garak-latentinjection-registrar-iana-id.yaml +38 -105
  618. package/rules/prompt-injection/ATR-2026-00495-garak-dan-insert-prompt-here.yaml +47 -117
  619. package/rules/prompt-injection/ATR-2026-00496-garak-dan-no-matter-what.yaml +39 -93
  620. package/rules/prompt-injection/ATR-2026-00497-garak-encoding-mixedunassigned.yaml +46 -118
  621. package/rules/prompt-injection/ATR-2026-00498-garak-web-injection-mixedunassigned.yaml +44 -110
  622. package/rules/prompt-injection/ATR-2026-00499-garak-dan-from-now-on.yaml +41 -96
  623. package/rules/prompt-injection/ATR-2026-00503-fake-error-state-takeover-unrestricted-replacement-bot.yaml +41 -102
  624. package/rules/prompt-injection/ATR-2026-00506-nevermind-override-goal-hijacking-in-user-input-promptinject.yaml +38 -97
  625. package/rules/prompt-injection/ATR-2026-00507-screaming-stop-goal-hijacking-in-user-input-promptinject.yaml +40 -100
  626. package/rules/prompt-injection/ATR-2026-00508-escape-delimiter-wrapped-goal-hijacking-in-user-input-prompt.yaml +42 -101
  627. package/rules/prompt-injection/ATR-2026-00509-prompt-leaking-via-ignore-previous-instructions-in-user-inpu.yaml +41 -114
  628. package/rules/prompt-injection/ATR-2026-00510-delayed-tool-invocation-injection.yaml +50 -132
  629. package/rules/prompt-injection/ATR-2026-00511-mcp-web-context-poisoning.yaml +51 -131
  630. package/rules/prompt-injection/ATR-2026-00512-rules-file-backdoor-injection.yaml +47 -126
  631. package/rules/prompt-injection/ATR-2026-00515-hidden-text-prompt-injection.yaml +52 -135
  632. package/rules/prompt-injection/ATR-2026-00518-ignore-previous-and-following-instructions-output-command-promptinject.yaml +40 -107
  633. package/rules/prompt-injection/ATR-2026-00519-tautology-logic-noise-injection-promptbench.yaml +40 -105
  634. package/rules/prompt-injection/ATR-2026-00520-nlp-task-random-token-suffix-injection-promptbench.yaml +43 -106
  635. package/rules/prompt-injection/ATR-2026-00535-windsurf-ide-zero-click-prompt-injection.yaml +43 -139
  636. package/rules/prompt-injection/ATR-2026-00550-untrusted-retrieval-to-privileged-tool.yaml +61 -171
  637. package/rules/prompt-injection/ATR-2026-00554-langchain-vulnerable-to-template-injecti.yaml +32 -57
  638. package/rules/prompt-injection/ATR-2026-00565-the-llm-cli-tool-thru-0-27-1-contains-a-.yaml +37 -80
  639. package/rules/prompt-injection/ATR-2026-00573-semantic-paraphrased-injection.yaml +33 -75
  640. package/rules/prompt-injection/ATR-2026-00579-mcp-tool-description-line-jumping-injection.yaml +36 -142
  641. package/rules/prompt-injection/ATR-2026-00584-indirect-injection-via-tool-response.yaml +37 -161
  642. package/rules/prompt-injection/ATR-2026-00700-structured-data-payload-injection.yaml +34 -85
  643. package/rules/prompt-injection/ATR-2026-00701-ipi-tool-output-xss-injection.yaml +29 -72
  644. package/rules/prompt-injection/ATR-2026-01000-context-ignore-fake-completion-prefix.yaml +27 -73
  645. package/rules/prompt-injection/ATR-2026-01001-direct-pi-instruction-override-secret-key.yaml +26 -82
  646. package/rules/prompt-injection/ATR-2026-01002-role-escalation-false-authority-claim.yaml +30 -80
  647. package/rules/prompt-injection/ATR-2026-01005-many-shot-repetition-override.yaml +26 -69
  648. package/rules/prompt-injection/ATR-2026-01006-payload-split-string-concat-injection.yaml +31 -84
  649. package/rules/prompt-injection/ATR-2026-01007-token-repeat-flooding-injection.yaml +27 -71
  650. package/rules/prompt-injection/ATR-2026-01009-virtual-world-bypass-fictional-pii.yaml +27 -73
  651. package/rules/prompt-injection/ATR-2026-01012-encoding-evasion-decode-execute.yaml +31 -81
  652. package/rules/prompt-injection/ATR-2026-01013-language-evasion-multilingual-credential.yaml +46 -108
  653. package/rules/prompt-injection/ATR-2026-01015-evasion-refusal-suppression.yaml +31 -82
  654. package/rules/prompt-injection/ATR-2026-01016-evasion-response-priming-forced-opener.yaml +26 -75
  655. package/rules/prompt-injection/ATR-2026-01017-evasion-dual-response-split-output.yaml +28 -74
  656. package/rules/prompt-injection/ATR-2026-01018-evasion-shell-injection-eval.yaml +40 -116
  657. package/rules/prompt-injection/ATR-2026-01019-sysprompt-override-fake-diagnostic-mode.yaml +34 -89
  658. package/rules/prompt-injection/ATR-2026-01020-spikee-doc-embedded-base64-payload.yaml +28 -69
  659. package/rules/prompt-injection/ATR-2026-01021-spikee-doc-embedded-translation-injection.yaml +27 -68
  660. package/rules/prompt-injection/ATR-2026-01023-evasion-opposite-intent-negation-trick.yaml +26 -69
  661. package/rules/prompt-injection/ATR-2026-01024-evasion-persona-override-rule-breaker.yaml +28 -77
  662. package/rules/prompt-injection/ATR-2026-01025-evasion-hypothetical-fictional-execution-framing.yaml +24 -68
  663. package/rules/prompt-injection/ATR-2026-01026-evasion-unicode-glitch-token-anomaly.yaml +28 -82
  664. package/rules/prompt-injection/ATR-2026-01304-indirect-injection-carrier-important-override.yaml +35 -93
  665. package/rules/prompt-injection/ATR-2026-01757-hypothetical-framing-bypass-research-audit.yaml +32 -79
  666. package/rules/prompt-injection/ATR-2026-01758-hypothetical-fictional-story-bypass.yaml +31 -76
  667. package/rules/prompt-injection/ATR-2026-01759-dos-new-important-instructions-injection-in-document.yaml +28 -74
  668. package/rules/prompt-injection/ATR-2026-01771-semantic-jailbreak-framing.yaml +50 -163
  669. package/rules/prompt-injection/ATR-2026-01800-asb-trigger-marker-tool-coercion.yaml +33 -104
  670. package/rules/prompt-injection/ATR-2026-01860-llmail-chat-template-boundary-spoof.yaml +27 -85
  671. package/rules/prompt-injection/ATR-2026-01861-llmail-pseudo-xml-role-injection.yaml +27 -83
  672. package/rules/prompt-injection/ATR-2026-01865-llmail-fake-email-boundary-marker.yaml +26 -80
  673. package/rules/prompt-injection/ATR-2026-01900-output-encoding.yaml +63 -138
  674. package/rules/prompt-injection/ATR-2026-01901-output-scrambling.yaml +63 -129
  675. package/rules/prompt-injection/ATR-2026-01902-output-emoji.yaml +39 -72
  676. package/rules/prompt-injection/ATR-2026-01903-output-language.yaml +35 -65
  677. package/rules/prompt-injection/ATR-2026-01904-link-injection.yaml +44 -86
  678. package/rules/prompt-injection/ATR-2026-01905-promotional-injection.yaml +35 -68
  679. package/rules/prompt-injection/ATR-2026-01906-content-manipulation.yaml +49 -125
  680. package/rules/prompt-injection/ATR-2026-01920-access-grant-coercion.yaml +31 -99
  681. package/rules/prompt-injection/ATR-2026-01921-access-denial-inversion.yaml +33 -92
  682. package/rules/prompt-injection/ATR-2026-01922-authorization-state-spoofing.yaml +33 -97
  683. package/rules/prompt-injection/ATR-2026-01923-forged-input-boundary-markers.yaml +33 -97
  684. package/rules/prompt-injection/ATR-2026-01925-encoded-payload-decoding-coercion.yaml +39 -110
  685. package/rules/prompt-injection/ATR-2026-01926-cross-lingual-authorization-laundering.yaml +29 -90
  686. package/rules/prompt-injection/ATR-2026-02001-ignore-below-instructions-mirror-of-ignore-previ.yaml +31 -73
  687. package/rules/prompt-injection/ATR-2026-02002-instruction-set-probe-or-supplant-direct-meta-qu.yaml +32 -72
  688. package/rules/prompt-injection/ATR-2026-02003-task-pivot-override-abandon-the-cover-task-trans.yaml +31 -72
  689. package/rules/prompt-injection/ATR-2026-02004-regional-indicator-flag-emoji-alphabet-letter-sp.yaml +32 -80
  690. package/rules/prompt-injection/ATR-2026-02005-actor-never-breaks-character-roleplay-dan-style-.yaml +31 -74
  691. package/rules/prompt-injection/ATR-2026-02006-fuzzy-cross-lingual-i-have-been-pwned-near-miss-.yaml +32 -84
  692. package/rules/prompt-injection/ATR-2026-02007-bare-key-elicitation-token.yaml +30 -74
  693. package/rules/prompt-injection/ATR-2026-02008-translation-chain-output-laundering-state-secret.yaml +30 -75
  694. package/rules/prompt-injection/ATR-2026-02009-bare-key-elicitation-trailing-colon.yaml +29 -71
  695. package/rules/prompt-injection/ATR-2026-02010-emoji-only-payload.yaml +30 -73
  696. package/rules/prompt-injection/ATR-2026-02011-malformed-grammar-pwned-success-claim.yaml +30 -69
  697. package/rules/prompt-injection/ATR-2026-02012-movie-title-generator-instruction-wrapper-for-pw.yaml +30 -79
  698. package/rules/prompt-injection/ATR-2026-02013-delimiter-fence-ignore-instructions-override.yaml +31 -74
  699. package/rules/prompt-injection/ATR-2026-02014-spliced-target-string-letters-of-a-filtered-cana.yaml +30 -74
  700. package/rules/prompt-injection/ATR-2026-02015-dense-emoji-only-payload-flood.yaml +30 -72
  701. package/rules/prompt-injection/ATR-2026-02016-reversed-payload-string.yaml +31 -76
  702. package/rules/prompt-injection/ATR-2026-02018-regional-indicator-flag-emoji-letter-spelling-sp.yaml +30 -71
  703. package/rules/prompt-injection/ATR-2026-02019-python-interpreter-role-assignment-exec-framing.yaml +31 -77
  704. package/rules/prompt-injection/ATR-2026-02020-obfuscated-token-reconstruction-via-character-su.yaml +30 -72
  705. package/rules/prompt-injection/ATR-2026-02120-agentdojo-important-message-identity-spoof-pretext.yaml +31 -81
  706. package/rules/prompt-injection/ATR-2026-02210-negation-topic-evil-persona-two-script-jailbreak.yaml +33 -87
  707. package/rules/prompt-injection/ATR-2026-02230-conditional-keyword-trigger-override.yaml +35 -88
  708. package/rules/prompt-injection/ATR-2026-02232-brand-persona-opinion-hijack.yaml +27 -75
  709. package/rules/prompt-injection/ATR-2026-02374-rot13-base64-obfuscated-shell-jailbreak.yaml +38 -90
  710. package/rules/prompt-injection/ATR-2026-02377-novel-persona-jailbreak-cosignal.yaml +32 -64
  711. package/rules/prompt-injection/ATR-2026-02500-prompt-layer-self-replication.yaml +183 -0
  712. package/rules/prompt-injection/ATR-2026-02502-covert-remote-script-injection-into-generated-artifacts.yaml +106 -0
  713. package/rules/prompt-injection/ATR-2026-02846-semantic-ignore-previous-and-following-instructio.yaml +115 -0
  714. package/rules/prompt-injection/ATR-2026-02851-fake-user-turn-send-email-instruction.yaml +76 -0
  715. package/rules/skill-compromise/ATR-2026-00060-skill-impersonation.yaml +30 -86
  716. package/rules/skill-compromise/ATR-2026-00061-description-behavior-mismatch.yaml +42 -165
  717. package/rules/skill-compromise/ATR-2026-00062-hidden-capability.yaml +40 -80
  718. package/rules/skill-compromise/ATR-2026-00063-skill-chain-attack.yaml +46 -92
  719. package/rules/skill-compromise/ATR-2026-00064-over-permissioned-skill.yaml +40 -109
  720. package/rules/skill-compromise/ATR-2026-00065-skill-update-attack.yaml +37 -75
  721. package/rules/skill-compromise/ATR-2026-00066-parameter-injection.yaml +42 -88
  722. package/rules/skill-compromise/ATR-2026-00120-skill-instruction-injection.yaml +33 -182
  723. package/rules/skill-compromise/ATR-2026-00121-skill-dangerous-script.yaml +33 -164
  724. package/rules/skill-compromise/ATR-2026-00122-skill-weaponized-instruction.yaml +29 -132
  725. package/rules/skill-compromise/ATR-2026-00123-skill-overreach-permissions.yaml +33 -110
  726. package/rules/skill-compromise/ATR-2026-00124-skill-name-squatting.yaml +40 -133
  727. package/rules/skill-compromise/ATR-2026-00125-context-poisoning-compaction.yaml +26 -107
  728. package/rules/skill-compromise/ATR-2026-00126-skill-rug-pull-setup.yaml +23 -102
  729. package/rules/skill-compromise/ATR-2026-00127-subcommand-overflow.yaml +33 -114
  730. package/rules/skill-compromise/ATR-2026-00128-html-comment-hidden-payload.yaml +23 -148
  731. package/rules/skill-compromise/ATR-2026-00129-unicode-smuggling.yaml +35 -62
  732. package/rules/skill-compromise/ATR-2026-00134-fork-claim-impersonation.yaml +24 -105
  733. package/rules/skill-compromise/ATR-2026-00135-exfil-url-in-instructions.yaml +27 -138
  734. package/rules/skill-compromise/ATR-2026-00147-fork-impersonation.yaml +35 -45
  735. package/rules/skill-compromise/ATR-2026-00149-skill-exfil-compound.yaml +28 -145
  736. package/rules/skill-compromise/ATR-2026-00151-fork-impersonation-install.yaml +39 -69
  737. package/rules/skill-compromise/ATR-2026-00157-timebomb-credential-exfil.yaml +41 -96
  738. package/rules/skill-compromise/ATR-2026-00200-agent-memory-config-tampering.yaml +41 -84
  739. package/rules/skill-compromise/ATR-2026-00214-credential-theft.yaml +36 -50
  740. package/rules/skill-compromise/ATR-2026-00217-credential-harvesting.yaml +50 -98
  741. package/rules/skill-compromise/ATR-2026-00220-malware-dropper.yaml +45 -85
  742. package/rules/skill-compromise/ATR-2026-00222-credential-harvesting.yaml +46 -85
  743. package/rules/skill-compromise/ATR-2026-00223-reverse-shell-dropper.yaml +46 -83
  744. package/rules/skill-compromise/ATR-2026-00224-credential-exfiltration.yaml +46 -92
  745. package/rules/skill-compromise/ATR-2026-00225-c2-communication.yaml +46 -86
  746. package/rules/skill-compromise/ATR-2026-00260-package-hallucination.yaml +51 -93
  747. package/rules/skill-compromise/ATR-2026-00262-av-evasion-code-gen.yaml +49 -90
  748. package/rules/skill-compromise/ATR-2026-00263-credential-file-read-gen.yaml +53 -94
  749. package/rules/skill-compromise/ATR-2026-00266-malware-dropper-gen.yaml +51 -92
  750. package/rules/skill-compromise/ATR-2026-00283-malwaregen-generic-virus-payload-request.yaml +51 -96
  751. package/rules/skill-compromise/ATR-2026-00398-huggingface-unsafe-model-artifact-load.yaml +57 -110
  752. package/rules/skill-compromise/ATR-2026-00425-nl-persistent-covert-hook.yaml +24 -65
  753. package/rules/skill-compromise/ATR-2026-00427-nl-fake-error-instruction-bypass.yaml +24 -65
  754. package/rules/skill-compromise/ATR-2026-00429-nl-skill-self-modification.yaml +24 -65
  755. package/rules/skill-compromise/ATR-2026-00523-claude-code-hooks-session-start-pre-trust-rce.yaml +62 -162
  756. package/rules/skill-compromise/ATR-2026-00525-mini-shai-hulud-gh-token-monitor-persistence.yaml +43 -175
  757. package/rules/skill-compromise/ATR-2026-00527-skill-silent-git-remote-mirror-exfiltration.yaml +49 -159
  758. package/rules/skill-compromise/ATR-2026-01755-backdoor-pot-linguistic-trigger-phrase.yaml +40 -88
  759. package/rules/skill-compromise/ATR-2026-01756-backdoor-pot-symbol-emoticon-trigger.yaml +27 -73
  760. package/rules/skill-compromise/ATR-2026-02261-code-credential-exfil-chain.yaml +35 -161
  761. package/rules/skill-compromise/ATR-2026-02405-malicious-skill-package-structure.yaml +51 -201
  762. package/rules/skill-compromise/ATR-2026-02410-malicious-artifact-on-vendor-domain.yaml +54 -204
  763. package/rules/skill-compromise/ATR-2026-02600-in-source-reverse-shell-assembly.yaml +106 -0
  764. package/rules/skill-compromise/ATR-2026-02610-evaluated-config-credential-command.yaml +109 -0
  765. package/rules/skill-compromise/ATR-2026-02818-skill-manifest-declares-attack-purpose.yaml +80 -0
  766. package/rules/skill-compromise/ATR-2026-02845-agent-cryptomining-payload.yaml +102 -0
  767. package/rules/tool-poisoning/ATR-2026-00010-mcp-malicious-response.yaml +80 -209
  768. package/rules/tool-poisoning/ATR-2026-00011-tool-output-injection.yaml +35 -144
  769. package/rules/tool-poisoning/ATR-2026-00012-unauthorized-tool-call.yaml +32 -130
  770. package/rules/tool-poisoning/ATR-2026-00013-tool-ssrf.yaml +32 -146
  771. package/rules/tool-poisoning/ATR-2026-00095-supply-chain-poisoning.yaml +29 -104
  772. package/rules/tool-poisoning/ATR-2026-00096-registry-poisoning.yaml +33 -94
  773. package/rules/tool-poisoning/ATR-2026-00100-consent-bypass-instruction.yaml +22 -100
  774. package/rules/tool-poisoning/ATR-2026-00101-trust-escalation-override.yaml +34 -54
  775. package/rules/tool-poisoning/ATR-2026-00103-hidden-safety-bypass-instruction.yaml +19 -89
  776. package/rules/tool-poisoning/ATR-2026-00105-silent-action-concealment.yaml +22 -101
  777. package/rules/tool-poisoning/ATR-2026-00106-schema-description-contradiction.yaml +31 -51
  778. package/rules/tool-poisoning/ATR-2026-00161-important-tag-cross-tool-shadowing.yaml +54 -160
  779. package/rules/tool-poisoning/ATR-2026-00209-mcpwn-runaway-invocation.yaml +50 -114
  780. package/rules/tool-poisoning/ATR-2026-00210-flowise-system-message-override.yaml +48 -111
  781. package/rules/tool-poisoning/ATR-2026-00259-ansi-escape-injection.yaml +48 -104
  782. package/rules/tool-poisoning/ATR-2026-00270-xss-in-tool-response.yaml +47 -97
  783. package/rules/tool-poisoning/ATR-2026-00277-echo-template-command-injection.yaml +46 -95
  784. package/rules/tool-poisoning/ATR-2026-00393-ansi-code-elicitation-request.yaml +51 -104
  785. package/rules/tool-poisoning/ATR-2026-00415-flowise-custom-mcp-stdio-rce.yaml +47 -119
  786. package/rules/tool-poisoning/ATR-2026-00419-cursor-mcp-zero-click-config.yaml +57 -148
  787. package/rules/tool-poisoning/ATR-2026-00434-mcp-remote-authorization-endpoint-command-injection.yaml +47 -122
  788. package/rules/tool-poisoning/ATR-2026-00435-azure-mcp-server-missing-authentication.yaml +46 -116
  789. package/rules/tool-poisoning/ATR-2026-00448-spring-ai-milvus-filter-injection.yaml +51 -134
  790. package/rules/tool-poisoning/ATR-2026-00494-garak-exploitation-mixedunassigned.yaml +47 -120
  791. package/rules/tool-poisoning/ATR-2026-00513-package-hallucination-exploitation.yaml +45 -117
  792. package/rules/tool-poisoning/ATR-2026-00521-shell-command-injection-agent-tool-context.yaml +40 -130
  793. package/rules/tool-poisoning/ATR-2026-00522-sql-injection-natural-language-agent-interface.yaml +64 -157
  794. package/rules/tool-poisoning/ATR-2026-00526-claude-code-shell-metachar-in-double-quoted-path.yaml +41 -128
  795. package/rules/tool-poisoning/ATR-2026-00529-litellm-proxy-sqli-cisa-kev.yaml +41 -117
  796. package/rules/tool-poisoning/ATR-2026-00530-ms-agent-shell-tool-unsanitized-argv-rce.yaml +40 -143
  797. package/rules/tool-poisoning/ATR-2026-00531-praisonai-unauthenticated-agent-api.yaml +44 -117
  798. package/rules/tool-poisoning/ATR-2026-00532-apache-doris-mcp-sql-injection.yaml +40 -100
  799. package/rules/tool-poisoning/ATR-2026-00533-apache-pinot-mcp-unauthenticated-takeover.yaml +39 -97
  800. package/rules/tool-poisoning/ATR-2026-00534-alibaba-rds-mcp-unauthenticated-metadata-exfil.yaml +39 -100
  801. package/rules/tool-poisoning/ATR-2026-00536-nginx-ui-mcp-unauthenticated-command-execution.yaml +46 -140
  802. package/rules/tool-poisoning/ATR-2026-00537-fastmcp-server-name-cmd-injection-windows.yaml +58 -172
  803. package/rules/tool-poisoning/ATR-2026-00538-langchain-chatchat-mcp-stdio-unauthenticated-rce.yaml +63 -186
  804. package/rules/tool-poisoning/ATR-2026-00540-praisonai-parse-mcp-command-cli-injection.yaml +50 -142
  805. package/rules/tool-poisoning/ATR-2026-00541-agent-zero-mcp-config-command-injection.yaml +51 -134
  806. package/rules/tool-poisoning/ATR-2026-00542-upsonic-mcp-command-allowlist-bypass.yaml +48 -121
  807. package/rules/tool-poisoning/ATR-2026-00543-litellm-mcp-server-argv-injection.yaml +52 -121
  808. package/rules/tool-poisoning/ATR-2026-00544-praisonai-pth-file-path-traversal-rce.yaml +49 -125
  809. package/rules/tool-poisoning/ATR-2026-00545-praisonai-tool-override-unauth-rce.yaml +51 -122
  810. package/rules/tool-poisoning/ATR-2026-00561-fastmcp-vulnerable-to-windows-command-in.yaml +36 -73
  811. package/rules/tool-poisoning/ATR-2026-00567-mcp-stdio-config-command-injection.yaml +29 -53
  812. package/rules/tool-poisoning/ATR-2026-00568-agent-ssrf-cloud-metadata-file-inclusion.yaml +27 -54
  813. package/rules/tool-poisoning/ATR-2026-00572-symjack-symlink-config-redirection.yaml +41 -103
  814. package/rules/tool-poisoning/ATR-2026-00575-miasma-npm-worm-agent-config-backdoor.yaml +41 -110
  815. package/rules/tool-poisoning/ATR-2026-00576-hades-agent-credential-theft.yaml +40 -125
  816. package/rules/tool-poisoning/ATR-2026-00577-create-mcp-server-stdio-exec-command-injection.yaml +53 -169
  817. package/rules/tool-poisoning/ATR-2026-00581-mcp-tool-rug-pull-post-approval-redefinition.yaml +38 -137
  818. package/rules/tool-poisoning/ATR-2026-00714-tool-camouflage-forced-tool-call.yaml +33 -78
  819. package/rules/tool-poisoning/ATR-2026-00715-tool-knowledge-hijack-identity-injection.yaml +39 -87
  820. package/rules/tool-poisoning/ATR-2026-00716-ipi-data-destruction-carrier.yaml +31 -76
  821. package/rules/tool-poisoning/ATR-2026-00720-tool-misuse-privilege-escalation-social.yaml +29 -71
  822. package/rules/tool-poisoning/ATR-2026-01300-mcp-notes-param-chat-history-exfil.yaml +37 -102
  823. package/rules/tool-poisoning/ATR-2026-01301-tool-description-exclusive-tool-override.yaml +36 -92
  824. package/rules/tool-poisoning/ATR-2026-01302-fake-tool-result-instruction-injection.yaml +33 -88
  825. package/rules/tool-poisoning/ATR-2026-01303-tool-schema-enumeration-social-engineering.yaml +55 -107
  826. package/rules/tool-poisoning/ATR-2026-01306-mcp-oauth-command-injection.yaml +35 -87
  827. package/rules/tool-poisoning/ATR-2026-01307-mcp-dns-rebinding-attack.yaml +36 -91
  828. package/rules/tool-poisoning/ATR-2026-01310-mcp-tool-description-compliance-history-exfil.yaml +40 -110
  829. package/rules/tool-poisoning/ATR-2026-01775-semantic-mcp-tool-manifest-poisoning.yaml +51 -139
  830. package/rules/tool-poisoning/ATR-2026-01927-mcp-server-kubernetes-kubectl-command-injection.yaml +45 -109
  831. package/rules/tool-poisoning/ATR-2026-01928-framelink-figma-mcp-curl-fallback-command-injection.yaml +58 -164
  832. package/rules/tool-poisoning/ATR-2026-01930-mcp-sampling-prompt-injection.yaml +48 -129
  833. package/rules/tool-poisoning/ATR-2026-01931-gemini-mcp-tool-command-injection-file-exfil.yaml +42 -113
  834. package/rules/tool-poisoning/ATR-2026-01932-shadow-undeclared-mcp-server-registration.yaml +43 -106
  835. package/rules/tool-poisoning/ATR-2026-01935-litellm-custom-code-sandbox-escape-cve-2026-40217.yaml +44 -101
  836. package/rules/tool-poisoning/ATR-2026-01952-praisonai-codemode-sandbox-escape-rce.yaml +34 -70
  837. package/rules/tool-poisoning/ATR-2026-01953-praisonai-codemode-function-ctor-sandbox-escape.yaml +61 -79
  838. package/rules/tool-poisoning/ATR-2026-01959-openhuman-shell-allowlist-env-prefix-bypass.yaml +36 -123
  839. package/rules/tool-poisoning/ATR-2026-01963-praisonai-action-orchestrator-step-target-path-traversal-rce.yaml +61 -66
  840. package/rules/tool-poisoning/ATR-2026-01965-flowise-custommcp-os-command-rce.yaml +39 -80
  841. package/rules/tool-poisoning/ATR-2026-01967-deepchat-mermaid-xss-rce-ipc-mcp-register.yaml +58 -66
  842. package/rules/tool-poisoning/ATR-2026-01968-deepchat-markdown-deeplink-openexternal-rce-bypass.yaml +44 -92
  843. package/rules/tool-poisoning/ATR-2026-01970-praisonai-filetools-normpath-path-traversal.yaml +64 -84
  844. package/rules/tool-poisoning/ATR-2026-01973-anythingllm-logo-endpoint-path-traversal.yaml +57 -64
  845. package/rules/tool-poisoning/ATR-2026-01978-anythingllm-collector-process-filename-path-traversal-delete.yaml +58 -64
  846. package/rules/tool-poisoning/ATR-2026-01979-pandasai-prompt-injection-dunder-sandbox-escape-rce.yaml +60 -72
  847. package/rules/tool-poisoning/ATR-2026-01980-agentic-flow-mcp-tool-param-command-injection.yaml +49 -99
  848. package/rules/tool-poisoning/ATR-2026-01982-dbt-mcp-node-selection-argument-injection.yaml +49 -102
  849. package/rules/tool-poisoning/ATR-2026-01983-mcp-for-stata-log-file-name-command-injection.yaml +43 -110
  850. package/rules/tool-poisoning/ATR-2026-01985-mcp-connect-bridge-unauth-process-spawn-rce.yaml +41 -115
  851. package/rules/tool-poisoning/ATR-2026-01987-langroid-sqlchatagent-prompt-to-sql-rce.yaml +53 -110
  852. package/rules/tool-poisoning/ATR-2026-02021-mcp-inspector-unauthenticated-proxy-rce.yaml +48 -123
  853. package/rules/tool-poisoning/ATR-2026-02022-curxecute-cursor-mcp-json-injected-server-rce.yaml +51 -131
  854. package/rules/tool-poisoning/ATR-2026-02023-escaperoute-filesystem-mcp-prefix-bypass.yaml +48 -129
  855. package/rules/tool-poisoning/ATR-2026-02024-escaperoute-filesystem-mcp-symlink-launchagent.yaml +49 -128
  856. package/rules/tool-poisoning/ATR-2026-02025-mcp-full-schema-poisoning-nondescription-field.yaml +50 -142
  857. package/rules/tool-poisoning/ATR-2026-02027-diagnostic-content-remediation-command-injection.yaml +58 -72
  858. package/rules/tool-poisoning/ATR-2026-02041-shell-injection-echo-marker-poc.yaml +32 -93
  859. package/rules/tool-poisoning/ATR-2026-02102-html-injection-tool-arg-approval-ui-xss.yaml +33 -107
  860. package/rules/tool-poisoning/ATR-2026-02141-mcp-server-config-command-execution.yaml +42 -107
  861. package/rules/tool-poisoning/ATR-2026-02145-python-sandbox-escape-generator-frame-introspection.yaml +36 -105
  862. package/rules/tool-poisoning/ATR-2026-02193-ssrf-ipv6-noncanonical-loopback-bypass.yaml +35 -86
  863. package/rules/tool-poisoning/ATR-2026-02194-go-init-func-process-exec-codegen-rce.yaml +35 -83
  864. package/rules/tool-poisoning/ATR-2026-02233-unscoped-destructive-db-request-nl.yaml +34 -95
  865. package/rules/tool-poisoning/ATR-2026-02260-agentjacking-remediation-framed-execution.yaml +42 -107
  866. package/rules/tool-poisoning/ATR-2026-02263-workflow-sql-template-expression-injection.yaml +35 -119
  867. package/rules/tool-poisoning/ATR-2026-02350-mcp-json-rpc-case-duplicate-key-tool-smuggling.yaml +34 -100
  868. package/rules/tool-poisoning/ATR-2026-02352-imap-search-command-injection-email-tool-args.yaml +32 -93
  869. package/rules/tool-poisoning/ATR-2026-02372-unsigned-task-feed-npm-npx-lifecycle-rce.yaml +39 -101
  870. package/rules/tool-poisoning/ATR-2026-02376-tool-description-conversational-trigger-history-exfil.yaml +33 -84
  871. package/rules/tool-poisoning/ATR-2026-02403-mcp-external-content-missing-spotlighting.yaml +52 -282
  872. package/rules/tool-poisoning/ATR-2026-02514-mcp-server-metadata-url-html-breakout.yaml +105 -0
  873. package/rules/tool-poisoning/ATR-2026-02542-pipeline-query-stage-injection.yaml +95 -0
  874. package/rules/tool-poisoning/ATR-2026-02557-shell-separator-in-path-typed-tool-argument.yaml +112 -0
  875. package/rules/tool-poisoning/ATR-2026-02666-url-userinfo-decoy-host-allowlist-bypass.yaml +101 -0
  876. package/rules/tool-poisoning/ATR-2026-02668-vcs-ref-name-command-substitution.yaml +98 -0
  877. package/rules/tool-poisoning/ATR-2026-02669-query-pipeline-stage-in-identifier-parameter.yaml +88 -0
  878. package/rules/tool-poisoning/ATR-2026-02682-xml-entity-expansion-bomb.yaml +98 -0
  879. package/rules/tool-poisoning/ATR-2026-02707-crlf-header-injection-mail-tool-argument.yaml +88 -0
  880. package/spec/README.md +2 -2
  881. package/spec/atr-correlation-v1.0.md +16 -4
  882. package/spec/atr-method-v1.1.md +2 -0
  883. package/spec/atr-profile-v1.0.md +11 -1
@@ -0,0 +1,233 @@
1
+ /**
2
+ * Enforcement policy — the two operator switches, and the one precedence rule
3
+ * that governs both.
4
+ *
5
+ * ATR separates DETECTION from ENFORCEMENT. Detection always runs; enforcement
6
+ * is what the engine is allowed to DO with a detection:
7
+ *
8
+ * lane Which rule maturities may fire at all.
9
+ * 'enforce' = stable only, 'alert' = stable+test, 'hunt' = all.
10
+ * Implemented by the lane gate in engine.ts (see passesLane).
11
+ *
12
+ * blocking Whether ATR may express a blocking decision. OFF BY DEFAULT.
13
+ * When off: the Claude Code hook contract omits permissionDecision
14
+ * entirely (the host applies its own default — ATR does not vote),
15
+ * and the ActionExecutor refuses to dispatch any response action
16
+ * above the OBSERVE blast-radius tier. Detection output is
17
+ * unchanged in both modes.
18
+ *
19
+ * WHY BLOCKING IS OPT-IN
20
+ *
21
+ * The load-bearing requirement is SPEC.md §5.5, which is engine-wide:
22
+ * "Engines MUST NOT execute response actions automatically without an explicit
23
+ * configuration directive from the operator." Until this module existed there
24
+ * was no way for an operator to express that directive — no CLI flag, no
25
+ * environment variable, no documented config key. This module IS that directive.
26
+ *
27
+ * Two weaker statements point the same way but must not be quoted as general
28
+ * rules, because they are not:
29
+ * - spec/atr-method-v1.1.md §5.6 says "Engines SHOULD NOT auto-block ON A
30
+ * HASH MATCH without operator policy explicitly enabling it". That sits
31
+ * under §5 Signature Method and is scoped to hash matches. An earlier
32
+ * revision of this comment elided "on a hash match" and widened it into a
33
+ * general SHOULD NOT. It is not one.
34
+ * - docs/QUALITY-STANDARD.md restricts blocking to `maturity: stable` rules,
35
+ * but that section is deployment guidance addressed to consumers, not a
36
+ * normative engine requirement.
37
+ *
38
+ * WHY ATR NEVER SAYS "allow"
39
+ *
40
+ * In the Claude Code PreToolUse contract, `permissionDecision: "allow"` is not
41
+ * neutral — it is an affirmative approval that suppresses the host's own
42
+ * permission prompt. ATR emits a permission decision only to RESTRAIN an
43
+ * operation (deny / ask). "No rule matched" is not "I approve this": it is ATR
44
+ * having nothing to say, and the host must be left on its own default path.
45
+ * This holds in BOTH modes — advisory omits every decision, and blocking omits
46
+ * the affirmative one. See toClaudeCodePreToolUse in hook-handler.ts.
47
+ *
48
+ * WHO READS THE ENVIRONMENT
49
+ *
50
+ * For the lane and blocking switches: only the CLI. `resolveEnforcementPolicy`
51
+ * below is the only function that reads `process.env` for THESE TWO switches,
52
+ * and `src/cli.ts` is its only caller; it hands the resolved values to
53
+ * ATREngine / ActionExecutor / HookHandler explicitly.
54
+ *
55
+ * Not "the only function in the package that touches process.env" — that is
56
+ * false and an earlier revision of this comment said it. Ten files under src/
57
+ * read the environment in code, including `adapters/openshell-filter.ts` and
58
+ * `adapters/nemoclaw-preflight.ts`, which read `ATR_MIN_SEVERITY` and block by
59
+ * default. Those adapters are outside this switch and stay that way; see the
60
+ * scope limit in CHANGELOG.md.
61
+ *
62
+ * `grep -rl "process\.env" src/` returns eleven, not ten: `src/index.ts` only
63
+ * names it in a comment. The correction above was itself first written as
64
+ * "eleven" off that grep, which is the same mistake one level down.
65
+ *
66
+ * Library constructors take `laneFromConfig` / `blockingFromConfig`, which
67
+ * cannot read the environment — `resolveLane` and `resolveBlocking` require an
68
+ * EnvSource argument, so there is no overload that silently falls through to
69
+ * `process.env`. This is structural, not a convention: an embedder cannot
70
+ * accidentally opt into ambient configuration.
71
+ *
72
+ * The rule exists because ambient configuration crosses trust boundaries
73
+ * invisibly. `new ATREngine()` inside a VS Code extension, a Mastra pipeline,
74
+ * or the `/openshell-filter`, `/nemoclaw-preflight` and `/mcp` entry points did
75
+ * not ask to be reconfigured by a shell profile — and `ATR_LANE=enforce` is a
76
+ * VALID value, so the old behaviour produced no warning at all while narrowing
77
+ * those callers to maturity=stable rules only.
78
+ *
79
+ * PRECEDENCE
80
+ *
81
+ * library: explicit config > built-in default
82
+ * CLI: flag > environment variable > built-in default
83
+ *
84
+ * An invalid explicit value (config field or CLI flag) throws or exits: that is
85
+ * the caller's own bug, reported where the caller is looking. An invalid
86
+ * ENVIRONMENT value degrades loudly instead — see resolveEnforcementPolicy for
87
+ * the measurement behind that split.
88
+ *
89
+ * @module agent-threat-rules/enforcement
90
+ */
91
+ import { type Lane } from './quality/rule-contract.js';
92
+ /** Environment variable naming the detection lane. */
93
+ export declare const LANE_ENV_VAR = "ATR_LANE";
94
+ /** Environment variable enabling blocking (the operator directive). */
95
+ export declare const BLOCKING_ENV_VAR = "ATR_BLOCKING";
96
+ /**
97
+ * Lane used when neither config nor environment says otherwise.
98
+ * 'hunt' keeps every maturity visible — advisory breadth, which is safe
99
+ * precisely because blocking is off by default.
100
+ */
101
+ export declare const DEFAULT_LANE: Lane;
102
+ /** Blocking is off until an operator turns it on. */
103
+ export declare const DEFAULT_BLOCKING = false;
104
+ /** Minimal read-only view of an environment. Keeps this module testable. */
105
+ export type EnvSource = Readonly<Record<string, string | undefined>>;
106
+ /**
107
+ * Parse a lane name. Returns null for anything not in LANES, so callers that
108
+ * want to report a usage error (the CLI) can do so without a try/catch.
109
+ *
110
+ * Trimmed and case-INSENSITIVE, matching parseBooleanFlag exactly. The two were
111
+ * asymmetric: `ATR_BLOCKING=ON` worked while `ATR_LANE=ENFORCE` did not, and the
112
+ * pair `ATR_LANE=ENFORCE ATR_BLOCKING=ON` therefore turned blocking on while
113
+ * silently widening the lane to hunt — the operator asked for the narrowest
114
+ * enforcement posture and got the broadest one. The fallback direction was
115
+ * exactly the dangerous one, so the fix is to accept the spelling, not to
116
+ * document the trap.
117
+ */
118
+ export declare function parseLane(value: string): Lane | null;
119
+ /**
120
+ * Parse a boolean switch value. Returns null for anything unrecognised.
121
+ * An empty string is treated as "not set" by the resolvers, not by this
122
+ * function — it returns null here so the caller decides.
123
+ */
124
+ export declare function parseBooleanFlag(value: string): boolean | null;
125
+ /**
126
+ * Resolve the active detection lane: explicit > env > default.
127
+ *
128
+ * `env` is REQUIRED and has no `process.env` default. That is the whole
129
+ * mechanism keeping ambient configuration out of the library: a caller must
130
+ * name the environment it wants read, and library constructors pass NO_ENV via
131
+ * laneFromConfig. Only the CLI passes `process.env`.
132
+ *
133
+ * @throws TypeError when either source carries a value that is not a lane.
134
+ */
135
+ export declare function resolveLane(explicit: Lane | string | undefined, env: EnvSource): Lane;
136
+ /**
137
+ * Resolve whether blocking is enabled: explicit > env > default (false).
138
+ *
139
+ * `env` is REQUIRED — see resolveLane for why.
140
+ *
141
+ * @throws TypeError when the explicit value is not a boolean, or when the
142
+ * environment variable is set to a value that is neither truthy nor
143
+ * falsy by the table above.
144
+ *
145
+ * The explicit-value check is not decoration. `blocking` crosses from
146
+ * untyped JavaScript (and from JSON config files) as often as from
147
+ * TypeScript, and every non-empty string is truthy: without this,
148
+ * `new ActionExecutor({ adapter, blocking: "false" })` TURNS BLOCKING
149
+ * ON while reading, to its author, as an explicit "off". The lane path
150
+ * validated its explicit value from the start; this one did not, and a
151
+ * switch that fails toward "more enforcement" is the wrong asymmetry to
152
+ * leave in place.
153
+ */
154
+ export declare function resolveBlocking(explicit: boolean | undefined, env: EnvSource): boolean;
155
+ /**
156
+ * Lane for a LIBRARY caller: explicit config, or the built-in default. Never
157
+ * reads the environment.
158
+ *
159
+ * @throws TypeError when the caller passes something that is not a lane.
160
+ */
161
+ export declare function laneFromConfig(explicit?: Lane | string): Lane;
162
+ /**
163
+ * Blocking for a LIBRARY caller: explicit config, or off. Never reads the
164
+ * environment.
165
+ *
166
+ * @throws TypeError when the caller passes a non-boolean.
167
+ */
168
+ export declare function blockingFromConfig(explicit?: boolean): boolean;
169
+ /** The enforcement posture a CLI process will run under. */
170
+ export interface EnforcementPolicy {
171
+ readonly lane: Lane;
172
+ readonly blocking: boolean;
173
+ /** Human-readable problems found while resolving. Empty on a clean read. */
174
+ readonly notes: readonly string[];
175
+ }
176
+ /**
177
+ * Resolve the posture for a CLI process: flag > environment > default.
178
+ *
179
+ * THE ONLY FUNCTION IN THIS PACKAGE THAT READS `process.env`.
180
+ *
181
+ * A bad FLAG is a usage error the CLI reports and exits on (see readLaneOption
182
+ * in cli.ts): it was typed by a person at a prompt who is looking at the exit
183
+ * code. A bad ENVIRONMENT VALUE is different, and this function degrades
184
+ * instead of throwing. That split was measured, not assumed.
185
+ *
186
+ * MEASUREMENT (Claude Code 2.1.76, hook dispatcher in the shipped binary)
187
+ * A `command` hook's exit status is mapped as:
188
+ * status 0 -> `hook_success`; the renderer for that attachment returns null.
189
+ * status 2 -> `hook_blocking_error`; stderr is shown AND the tool is blocked.
190
+ * otherwise -> `hook_non_blocking_error`; the tool RUNS, the attachment maps
191
+ * to [] for the model, and the renderer prints exactly
192
+ * "<hookName> hook error" — the captured stderr is not shown.
193
+ *
194
+ * So for `atr guard`, which `atr init` installs as a PreToolUse command hook,
195
+ * exiting non-zero over a typo would: lose all detection for that call, let the
196
+ * tool run anyway, and tell the operator nothing beyond a bare "hook error".
197
+ * It buys no visibility at the cost of the entire product. The only loud exit
198
+ * status is 2 — which BLOCKS the tool, i.e. a stray shell variable would block
199
+ * every tool call. Both alternatives are worse than degrading.
200
+ *
201
+ * THE TRADE-OFF, STATED
202
+ * Degrading means an operator can believe enforcement is on when it is not.
203
+ * That is a real cost and it is why `notes` is not optional: the caller must
204
+ * print every note. It is accepted because the degraded posture is advisory —
205
+ * ATR emits no permission decision and dispatches no action above OBSERVE — so
206
+ * the failure mode is "ATR does not act", never "ATR acts wrongly". Exiting
207
+ * would produce "ATR does not act" too, and silently, minus the detection.
208
+ *
209
+ * WHY AN UNREADABLE LANE ALSO FORCES BLOCKING OFF
210
+ * Falling back to hunt while blocking is on is the one combination that makes
211
+ * the degraded posture MORE dangerous than the requested one: the operator
212
+ * asked to block on maturity=stable rules only, and would instead block on
213
+ * every maturity including draft. So when the requested lane cannot be honoured
214
+ * the process drops to advisory. An explicit `--blocking` does not override
215
+ * this: the flag says "you may block", not "block on a lane I never chose".
216
+ */
217
+ export declare function resolveEnforcementPolicy(flags?: {
218
+ readonly lane?: Lane | undefined;
219
+ readonly blocking?: boolean | undefined;
220
+ }, env?: EnvSource): EnforcementPolicy;
221
+ /**
222
+ * Is this response action enforcement rather than observation?
223
+ *
224
+ * The observe/enforce split is NOT redefined here — it reads the blast-radius
225
+ * ladder in src/quality/action-eligibility.ts, which is the project's single
226
+ * ranking of what an action destroys. OBSERVE (alert / snapshot / shadow /
227
+ * escalate) changes nothing about the agent's execution and therefore always
228
+ * runs. Everything above it (INTERRUPT / DEGRADE / TERMINATE) denies an
229
+ * operation, alters session state, or destroys the session — that is
230
+ * enforcement and requires the operator directive.
231
+ */
232
+ export declare function isEnforcementAction(action: string): boolean;
233
+ //# sourceMappingURL=enforcement.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"enforcement.d.ts","sourceRoot":"","sources":["../src/enforcement.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;CACnC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,wBAAgB,wBAAwB,CACtC,KAAK,GAAE;IAAE,QAAQ,CAAC,IAAI,CAAC,EAAE,IAAI,GAAG,SAAS,CAAC;IAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;CAAO,EACzF,GAAG,GAAE,SAAuB,GAC3B,iBAAiB,CAuCnB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAE3D"}
@@ -0,0 +1,316 @@
1
+ /**
2
+ * Enforcement policy — the two operator switches, and the one precedence rule
3
+ * that governs both.
4
+ *
5
+ * ATR separates DETECTION from ENFORCEMENT. Detection always runs; enforcement
6
+ * is what the engine is allowed to DO with a detection:
7
+ *
8
+ * lane Which rule maturities may fire at all.
9
+ * 'enforce' = stable only, 'alert' = stable+test, 'hunt' = all.
10
+ * Implemented by the lane gate in engine.ts (see passesLane).
11
+ *
12
+ * blocking Whether ATR may express a blocking decision. OFF BY DEFAULT.
13
+ * When off: the Claude Code hook contract omits permissionDecision
14
+ * entirely (the host applies its own default — ATR does not vote),
15
+ * and the ActionExecutor refuses to dispatch any response action
16
+ * above the OBSERVE blast-radius tier. Detection output is
17
+ * unchanged in both modes.
18
+ *
19
+ * WHY BLOCKING IS OPT-IN
20
+ *
21
+ * The load-bearing requirement is SPEC.md §5.5, which is engine-wide:
22
+ * "Engines MUST NOT execute response actions automatically without an explicit
23
+ * configuration directive from the operator." Until this module existed there
24
+ * was no way for an operator to express that directive — no CLI flag, no
25
+ * environment variable, no documented config key. This module IS that directive.
26
+ *
27
+ * Two weaker statements point the same way but must not be quoted as general
28
+ * rules, because they are not:
29
+ * - spec/atr-method-v1.1.md §5.6 says "Engines SHOULD NOT auto-block ON A
30
+ * HASH MATCH without operator policy explicitly enabling it". That sits
31
+ * under §5 Signature Method and is scoped to hash matches. An earlier
32
+ * revision of this comment elided "on a hash match" and widened it into a
33
+ * general SHOULD NOT. It is not one.
34
+ * - docs/QUALITY-STANDARD.md restricts blocking to `maturity: stable` rules,
35
+ * but that section is deployment guidance addressed to consumers, not a
36
+ * normative engine requirement.
37
+ *
38
+ * WHY ATR NEVER SAYS "allow"
39
+ *
40
+ * In the Claude Code PreToolUse contract, `permissionDecision: "allow"` is not
41
+ * neutral — it is an affirmative approval that suppresses the host's own
42
+ * permission prompt. ATR emits a permission decision only to RESTRAIN an
43
+ * operation (deny / ask). "No rule matched" is not "I approve this": it is ATR
44
+ * having nothing to say, and the host must be left on its own default path.
45
+ * This holds in BOTH modes — advisory omits every decision, and blocking omits
46
+ * the affirmative one. See toClaudeCodePreToolUse in hook-handler.ts.
47
+ *
48
+ * WHO READS THE ENVIRONMENT
49
+ *
50
+ * For the lane and blocking switches: only the CLI. `resolveEnforcementPolicy`
51
+ * below is the only function that reads `process.env` for THESE TWO switches,
52
+ * and `src/cli.ts` is its only caller; it hands the resolved values to
53
+ * ATREngine / ActionExecutor / HookHandler explicitly.
54
+ *
55
+ * Not "the only function in the package that touches process.env" — that is
56
+ * false and an earlier revision of this comment said it. Ten files under src/
57
+ * read the environment in code, including `adapters/openshell-filter.ts` and
58
+ * `adapters/nemoclaw-preflight.ts`, which read `ATR_MIN_SEVERITY` and block by
59
+ * default. Those adapters are outside this switch and stay that way; see the
60
+ * scope limit in CHANGELOG.md.
61
+ *
62
+ * `grep -rl "process\.env" src/` returns eleven, not ten: `src/index.ts` only
63
+ * names it in a comment. The correction above was itself first written as
64
+ * "eleven" off that grep, which is the same mistake one level down.
65
+ *
66
+ * Library constructors take `laneFromConfig` / `blockingFromConfig`, which
67
+ * cannot read the environment — `resolveLane` and `resolveBlocking` require an
68
+ * EnvSource argument, so there is no overload that silently falls through to
69
+ * `process.env`. This is structural, not a convention: an embedder cannot
70
+ * accidentally opt into ambient configuration.
71
+ *
72
+ * The rule exists because ambient configuration crosses trust boundaries
73
+ * invisibly. `new ATREngine()` inside a VS Code extension, a Mastra pipeline,
74
+ * or the `/openshell-filter`, `/nemoclaw-preflight` and `/mcp` entry points did
75
+ * not ask to be reconfigured by a shell profile — and `ATR_LANE=enforce` is a
76
+ * VALID value, so the old behaviour produced no warning at all while narrowing
77
+ * those callers to maturity=stable rules only.
78
+ *
79
+ * PRECEDENCE
80
+ *
81
+ * library: explicit config > built-in default
82
+ * CLI: flag > environment variable > built-in default
83
+ *
84
+ * An invalid explicit value (config field or CLI flag) throws or exits: that is
85
+ * the caller's own bug, reported where the caller is looking. An invalid
86
+ * ENVIRONMENT value degrades loudly instead — see resolveEnforcementPolicy for
87
+ * the measurement behind that split.
88
+ *
89
+ * @module agent-threat-rules/enforcement
90
+ */
91
+ import { LANES } from './quality/rule-contract.js';
92
+ import { ACTION_TIERS, actionTier } from './quality/action-eligibility.js';
93
+ /** Environment variable naming the detection lane. */
94
+ export const LANE_ENV_VAR = 'ATR_LANE';
95
+ /** Environment variable enabling blocking (the operator directive). */
96
+ export const BLOCKING_ENV_VAR = 'ATR_BLOCKING';
97
+ /**
98
+ * Lane used when neither config nor environment says otherwise.
99
+ * 'hunt' keeps every maturity visible — advisory breadth, which is safe
100
+ * precisely because blocking is off by default.
101
+ */
102
+ export const DEFAULT_LANE = 'hunt';
103
+ /** Blocking is off until an operator turns it on. */
104
+ export const DEFAULT_BLOCKING = false;
105
+ const LANE_SET = new Set(LANES);
106
+ const TRUE_VALUES = new Set(['1', 'true', 'yes', 'on']);
107
+ const FALSE_VALUES = new Set(['0', 'false', 'no', 'off']);
108
+ /**
109
+ * Parse a lane name. Returns null for anything not in LANES, so callers that
110
+ * want to report a usage error (the CLI) can do so without a try/catch.
111
+ *
112
+ * Trimmed and case-INSENSITIVE, matching parseBooleanFlag exactly. The two were
113
+ * asymmetric: `ATR_BLOCKING=ON` worked while `ATR_LANE=ENFORCE` did not, and the
114
+ * pair `ATR_LANE=ENFORCE ATR_BLOCKING=ON` therefore turned blocking on while
115
+ * silently widening the lane to hunt — the operator asked for the narrowest
116
+ * enforcement posture and got the broadest one. The fallback direction was
117
+ * exactly the dangerous one, so the fix is to accept the spelling, not to
118
+ * document the trap.
119
+ */
120
+ export function parseLane(value) {
121
+ const normalized = value.trim().toLowerCase();
122
+ return LANE_SET.has(normalized) ? normalized : null;
123
+ }
124
+ /**
125
+ * Parse a boolean switch value. Returns null for anything unrecognised.
126
+ * An empty string is treated as "not set" by the resolvers, not by this
127
+ * function — it returns null here so the caller decides.
128
+ */
129
+ export function parseBooleanFlag(value) {
130
+ const normalized = value.trim().toLowerCase();
131
+ if (TRUE_VALUES.has(normalized))
132
+ return true;
133
+ if (FALSE_VALUES.has(normalized))
134
+ return false;
135
+ return null;
136
+ }
137
+ /**
138
+ * Resolve the active detection lane: explicit > env > default.
139
+ *
140
+ * `env` is REQUIRED and has no `process.env` default. That is the whole
141
+ * mechanism keeping ambient configuration out of the library: a caller must
142
+ * name the environment it wants read, and library constructors pass NO_ENV via
143
+ * laneFromConfig. Only the CLI passes `process.env`.
144
+ *
145
+ * @throws TypeError when either source carries a value that is not a lane.
146
+ */
147
+ export function resolveLane(explicit, env) {
148
+ if (explicit !== undefined) {
149
+ const parsed = parseLane(explicit);
150
+ if (parsed === null) {
151
+ throw new TypeError(`Invalid lane "${explicit}". Expected one of: ${LANES.join(', ')}.`);
152
+ }
153
+ return parsed;
154
+ }
155
+ const fromEnv = env[LANE_ENV_VAR];
156
+ if (fromEnv !== undefined && fromEnv.trim() !== '') {
157
+ const parsed = parseLane(fromEnv);
158
+ if (parsed === null) {
159
+ throw new TypeError(`Invalid ${LANE_ENV_VAR}="${fromEnv}". Expected one of: ${LANES.join(', ')}.`);
160
+ }
161
+ return parsed;
162
+ }
163
+ return DEFAULT_LANE;
164
+ }
165
+ /**
166
+ * Resolve whether blocking is enabled: explicit > env > default (false).
167
+ *
168
+ * `env` is REQUIRED — see resolveLane for why.
169
+ *
170
+ * @throws TypeError when the explicit value is not a boolean, or when the
171
+ * environment variable is set to a value that is neither truthy nor
172
+ * falsy by the table above.
173
+ *
174
+ * The explicit-value check is not decoration. `blocking` crosses from
175
+ * untyped JavaScript (and from JSON config files) as often as from
176
+ * TypeScript, and every non-empty string is truthy: without this,
177
+ * `new ActionExecutor({ adapter, blocking: "false" })` TURNS BLOCKING
178
+ * ON while reading, to its author, as an explicit "off". The lane path
179
+ * validated its explicit value from the start; this one did not, and a
180
+ * switch that fails toward "more enforcement" is the wrong asymmetry to
181
+ * leave in place.
182
+ */
183
+ export function resolveBlocking(explicit, env) {
184
+ if (explicit !== undefined) {
185
+ if (typeof explicit !== 'boolean') {
186
+ throw new TypeError(`Invalid blocking value ${JSON.stringify(explicit)} (${typeof explicit}). ` +
187
+ `Expected a boolean. Note that any non-empty string, including "false", ` +
188
+ `would otherwise enable blocking.`);
189
+ }
190
+ return explicit;
191
+ }
192
+ const fromEnv = env[BLOCKING_ENV_VAR];
193
+ if (fromEnv !== undefined && fromEnv.trim() !== '') {
194
+ const parsed = parseBooleanFlag(fromEnv);
195
+ if (parsed === null) {
196
+ throw new TypeError(`Invalid ${BLOCKING_ENV_VAR}="${fromEnv}". Expected one of: ` +
197
+ `${[...TRUE_VALUES].join('/')} or ${[...FALSE_VALUES].join('/')}.`);
198
+ }
199
+ return parsed;
200
+ }
201
+ return DEFAULT_BLOCKING;
202
+ }
203
+ /**
204
+ * An environment that is empty by construction. Library constructors resolve
205
+ * against this, so "the library does not read the environment" is enforced by
206
+ * the type system rather than by reviewer vigilance.
207
+ */
208
+ const NO_ENV = Object.freeze({});
209
+ /**
210
+ * Lane for a LIBRARY caller: explicit config, or the built-in default. Never
211
+ * reads the environment.
212
+ *
213
+ * @throws TypeError when the caller passes something that is not a lane.
214
+ */
215
+ export function laneFromConfig(explicit) {
216
+ return resolveLane(explicit, NO_ENV);
217
+ }
218
+ /**
219
+ * Blocking for a LIBRARY caller: explicit config, or off. Never reads the
220
+ * environment.
221
+ *
222
+ * @throws TypeError when the caller passes a non-boolean.
223
+ */
224
+ export function blockingFromConfig(explicit) {
225
+ return resolveBlocking(explicit, NO_ENV);
226
+ }
227
+ /**
228
+ * Resolve the posture for a CLI process: flag > environment > default.
229
+ *
230
+ * THE ONLY FUNCTION IN THIS PACKAGE THAT READS `process.env`.
231
+ *
232
+ * A bad FLAG is a usage error the CLI reports and exits on (see readLaneOption
233
+ * in cli.ts): it was typed by a person at a prompt who is looking at the exit
234
+ * code. A bad ENVIRONMENT VALUE is different, and this function degrades
235
+ * instead of throwing. That split was measured, not assumed.
236
+ *
237
+ * MEASUREMENT (Claude Code 2.1.76, hook dispatcher in the shipped binary)
238
+ * A `command` hook's exit status is mapped as:
239
+ * status 0 -> `hook_success`; the renderer for that attachment returns null.
240
+ * status 2 -> `hook_blocking_error`; stderr is shown AND the tool is blocked.
241
+ * otherwise -> `hook_non_blocking_error`; the tool RUNS, the attachment maps
242
+ * to [] for the model, and the renderer prints exactly
243
+ * "<hookName> hook error" — the captured stderr is not shown.
244
+ *
245
+ * So for `atr guard`, which `atr init` installs as a PreToolUse command hook,
246
+ * exiting non-zero over a typo would: lose all detection for that call, let the
247
+ * tool run anyway, and tell the operator nothing beyond a bare "hook error".
248
+ * It buys no visibility at the cost of the entire product. The only loud exit
249
+ * status is 2 — which BLOCKS the tool, i.e. a stray shell variable would block
250
+ * every tool call. Both alternatives are worse than degrading.
251
+ *
252
+ * THE TRADE-OFF, STATED
253
+ * Degrading means an operator can believe enforcement is on when it is not.
254
+ * That is a real cost and it is why `notes` is not optional: the caller must
255
+ * print every note. It is accepted because the degraded posture is advisory —
256
+ * ATR emits no permission decision and dispatches no action above OBSERVE — so
257
+ * the failure mode is "ATR does not act", never "ATR acts wrongly". Exiting
258
+ * would produce "ATR does not act" too, and silently, minus the detection.
259
+ *
260
+ * WHY AN UNREADABLE LANE ALSO FORCES BLOCKING OFF
261
+ * Falling back to hunt while blocking is on is the one combination that makes
262
+ * the degraded posture MORE dangerous than the requested one: the operator
263
+ * asked to block on maturity=stable rules only, and would instead block on
264
+ * every maturity including draft. So when the requested lane cannot be honoured
265
+ * the process drops to advisory. An explicit `--blocking` does not override
266
+ * this: the flag says "you may block", not "block on a lane I never chose".
267
+ */
268
+ export function resolveEnforcementPolicy(flags = {}, env = process.env) {
269
+ const notes = [];
270
+ let lane;
271
+ let laneHonoured = true;
272
+ try {
273
+ lane = resolveLane(flags.lane, env);
274
+ }
275
+ catch (error) {
276
+ if (flags.lane !== undefined)
277
+ throw error; // a flag is the caller's bug
278
+ laneHonoured = false;
279
+ lane = DEFAULT_LANE;
280
+ notes.push(`${error.message} Falling back to lane "${DEFAULT_LANE}". ` +
281
+ `Detection still runs; this only changes which maturities may fire.`);
282
+ }
283
+ let blocking;
284
+ try {
285
+ blocking = resolveBlocking(flags.blocking, env);
286
+ }
287
+ catch (error) {
288
+ if (flags.blocking !== undefined)
289
+ throw error;
290
+ blocking = DEFAULT_BLOCKING;
291
+ notes.push(`${error.message} Falling back to blocking=${DEFAULT_BLOCKING}. ` +
292
+ `If you meant to enable enforcement, it is NOT enabled.`);
293
+ }
294
+ if (!laneHonoured && blocking) {
295
+ blocking = false;
296
+ notes.push(`Blocking disabled: ${LANE_ENV_VAR} could not be read, and blocking on the ` +
297
+ `fallback lane "${DEFAULT_LANE}" would enforce on more rule maturities ` +
298
+ `than you asked for. Fix ${LANE_ENV_VAR} to re-enable enforcement.`);
299
+ }
300
+ return Object.freeze({ lane, blocking, notes: Object.freeze(notes) });
301
+ }
302
+ /**
303
+ * Is this response action enforcement rather than observation?
304
+ *
305
+ * The observe/enforce split is NOT redefined here — it reads the blast-radius
306
+ * ladder in src/quality/action-eligibility.ts, which is the project's single
307
+ * ranking of what an action destroys. OBSERVE (alert / snapshot / shadow /
308
+ * escalate) changes nothing about the agent's execution and therefore always
309
+ * runs. Everything above it (INTERRUPT / DEGRADE / TERMINATE) denies an
310
+ * operation, alters session state, or destroys the session — that is
311
+ * enforcement and requires the operator directive.
312
+ */
313
+ export function isEnforcementAction(action) {
314
+ return actionTier(action) > ACTION_TIERS.OBSERVE;
315
+ }
316
+ //# sourceMappingURL=enforcement.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"enforcement.js","sourceRoot":"","sources":["../src/enforcement.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyFG;AAEH,OAAO,EAAE,KAAK,EAAa,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAE3E,sDAAsD;AACtD,MAAM,CAAC,MAAM,YAAY,GAAG,UAAU,CAAC;AAEvC,uEAAuE;AACvE,MAAM,CAAC,MAAM,gBAAgB,GAAG,cAAc,CAAC;AAE/C;;;;GAIG;AACH,MAAM,CAAC,MAAM,YAAY,GAAS,MAAM,CAAC;AAEzC,qDAAqD;AACrD,MAAM,CAAC,MAAM,gBAAgB,GAAG,KAAK,CAAC;AAEtC,MAAM,QAAQ,GAAwB,IAAI,GAAG,CAAC,KAAK,CAAC,CAAC;AAErD,MAAM,WAAW,GAAwB,IAAI,GAAG,CAAC,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC;AAC7E,MAAM,YAAY,GAAwB,IAAI,GAAG,CAAC,CAAC,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC;AAK/E;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,SAAS,CAAC,KAAa;IACrC,MAAM,UAAU,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;IAC9C,OAAO,QAAQ,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAE,UAAmB,CAAC,CAAC,CAAC,IAAI,CAAC;AAChE,CAAC;AAED;;;;GAIG;AACH,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M,UAAU,mBAAmB,CAAC,MAAc;IAChD,OAAO,UAAU,CAAC,MAAM,CAAC,GAAG,YAAY,CAAC,OAAO,CAAC;AACnD,CAAC"}
package/dist/engine.d.ts CHANGED
@@ -12,6 +12,7 @@
12
12
  * @module agent-threat-rules/engine
13
13
  */
14
14
  import type { ATRRule, ATRMatch, AgentEvent, ATRVerdict, ActionResult, ScanResult, ATRLanguage, ATRSemanticJudge } from './types.js';
15
+ import { type Lane } from './quality/rule-contract.js';
15
16
  import type { SessionTracker } from './session-tracker.js';
16
17
  import type { ActionExecutor } from './action-executor.js';
17
18
  import type { SkillFingerprintStore } from './skill-fingerprint.js';
@@ -79,6 +80,15 @@ export interface ATREngineConfig {
79
80
  * 'alert' : maturity stable + test (analyst/correlation lane).
80
81
  * 'hunt' : all maturities (advisory/eval; default, backward-compatible).
81
82
  * Deprecated/draft rules are always skipped regardless of lane.
83
+ *
84
+ * This field is the ONLY input: the engine does not read `ATR_LANE` or any
85
+ * other environment variable. Leaving it undefined pins the lane to 'hunt',
86
+ * the widest and most advisory setting, no matter what the surrounding shell
87
+ * says. A CLI that wants environment support resolves it itself and passes
88
+ * the result here (src/cli.ts, resolveEnforcementPolicy).
89
+ *
90
+ * An unrecognised value throws at construction time — that is a caller bug,
91
+ * not ambient noise.
82
92
  */
83
93
  lane?: 'enforce' | 'alert' | 'hunt';
84
94
  /**
@@ -95,6 +105,12 @@ export declare class ATREngine {
95
105
  private rules;
96
106
  private readonly compiledPatterns;
97
107
  private readonly semanticModuleInstance;
108
+ /**
109
+ * Active detection lane, resolved ONCE at construction from config alone.
110
+ * Held as a field so every gate in this engine sees the same lane for its
111
+ * lifetime.
112
+ */
113
+ private readonly lane;
98
114
  /**
99
115
  * Find bundled rules directory shipped with the npm package.
100
116
  * Checks: ../rules (from dist/), ./rules (repo root)
@@ -111,6 +127,8 @@ export declare class ATREngine {
111
127
  * Keeps experimental content out of the auto-block path without deleting it.
112
128
  */
113
129
  private passesLane;
130
+ /** Active detection lane (config, else 'hunt'). Diagnostics/tests. */
131
+ getLane(): Lane;
114
132
  /**
115
133
  * Load a single rule file and add it to the engine.
116
134
  */
@@ -348,4 +366,27 @@ export declare function conditionLanguageMatches(condLang: ATRLanguage | undefin
348
366
  * corpus without dropping a single legitimate rule.
349
367
  */
350
368
  export declare function isReDoSSafe(source: string): boolean;
369
+ /**
370
+ * Compile a rule-derived pattern with a ReDoS safety gate. Returns null (caller
371
+ * skips the pattern) when the source is syntactically invalid OR exhibits
372
+ * catastrophic-backtracking structure. A dropped rule in a security engine must
373
+ * be LOUD, not silent, so a rejected ReDoS pattern warns to stderr (never
374
+ * stdout — that carries the hook protocol) with the offending source.
375
+ */
376
+ /**
377
+ * Does this pattern need the RegExp `u` flag?
378
+ *
379
+ * `\\u{...}` and `\\p{...}` require it by syntax, and so does a literal astral
380
+ * character: without `u`, JavaScript reads a surrogate pair, and a class range
381
+ * written with literals -- [<U+E0000>-<U+E007F>] -- is a SyntaxError rather than
382
+ * a range.
383
+ *
384
+ * The literal form matters because it is the only spelling the three consuming
385
+ * engines share. `\\u{...}` is JS-only: Python re needs `\\U000E0000`, Go needs
386
+ * `\\x{E0000}`, and neither of those is valid JavaScript. Sixteen conditions
387
+ * across ten rules used it, which made those rules uncompilable from the Python
388
+ * and Go channels; they are literals now, and this is what keeps them working
389
+ * here.
390
+ */
391
+ export declare function needsUnicodeFlag(pattern: string): boolean;
351
392
  //# sourceMappingURL=engine.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"engine.d.ts","sourceRoot":"","sources":["../src/engine.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EACV,OAAO,EACP,QAAQ,EACR,UAAU,EAGV,UAAU,EACV,YAAY,EACZ,UAAU,EAEV,WAAW,EACX,gBAAgB,EACjB,MAAM,YAAY,CAAC;AAQpB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAE3D,OAAO,KAAK,EAAE,cAAc,E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