agent-threat-rules 2.1.5 → 3.0.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 (172) hide show
  1. package/README.md +365 -327
  2. package/dist/engine.d.ts +46 -1
  3. package/dist/engine.d.ts.map +1 -1
  4. package/dist/engine.js +242 -1
  5. package/dist/engine.js.map +1 -1
  6. package/dist/eval/eval-harness.d.ts.map +1 -1
  7. package/dist/eval/eval-harness.js +9 -0
  8. package/dist/eval/eval-harness.js.map +1 -1
  9. package/dist/eval/run-hackaprompt-benchmark.js +9 -0
  10. package/dist/eval/run-hackaprompt-benchmark.js.map +1 -1
  11. package/dist/eval/run-pint-benchmark.js +9 -0
  12. package/dist/eval/run-pint-benchmark.js.map +1 -1
  13. package/dist/eval/skill-benchmark.d.ts +11 -0
  14. package/dist/eval/skill-benchmark.d.ts.map +1 -1
  15. package/dist/eval/skill-benchmark.js +57 -0
  16. package/dist/eval/skill-benchmark.js.map +1 -1
  17. package/dist/measurement/from-eval-harness.d.ts +70 -0
  18. package/dist/measurement/from-eval-harness.d.ts.map +1 -0
  19. package/dist/measurement/from-eval-harness.js +49 -0
  20. package/dist/measurement/from-eval-harness.js.map +1 -0
  21. package/dist/measurement/schema.d.ts +152 -0
  22. package/dist/measurement/schema.d.ts.map +1 -0
  23. package/dist/measurement/schema.js +178 -0
  24. package/dist/measurement/schema.js.map +1 -0
  25. package/dist/measurement/write.d.ts +64 -0
  26. package/dist/measurement/write.d.ts.map +1 -0
  27. package/dist/measurement/write.js +163 -0
  28. package/dist/measurement/write.js.map +1 -0
  29. package/dist/semantic-evaluator.d.ts +48 -0
  30. package/dist/semantic-evaluator.d.ts.map +1 -0
  31. package/dist/semantic-evaluator.js +107 -0
  32. package/dist/semantic-evaluator.js.map +1 -0
  33. package/dist/trace-evaluator.d.ts +22 -0
  34. package/dist/trace-evaluator.d.ts.map +1 -0
  35. package/dist/trace-evaluator.js +249 -0
  36. package/dist/trace-evaluator.js.map +1 -0
  37. package/dist/types.d.ts +143 -0
  38. package/dist/types.d.ts.map +1 -1
  39. package/package.json +5 -3
  40. package/rules/agent-manipulation/ATR-2026-00552-goal-drift-after-pressure-injection.yaml +216 -0
  41. package/rules/context-exfiltration/ATR-2026-00471-garak-sysprompt-extraction-mixedunassigned.yaml +126 -0
  42. package/rules/context-exfiltration/ATR-2026-00501-data-exfiltration-via-markdown-image-and-link-url-injection.yaml +173 -0
  43. package/rules/context-exfiltration/ATR-2026-00504-tool-and-function-capability-enumeration.yaml +164 -0
  44. package/rules/context-exfiltration/ATR-2026-00505-system-prompt-extraction-instruction-dump-request.yaml +178 -0
  45. package/rules/context-exfiltration/ATR-2026-00514-system-prompt-extraction.yaml +202 -0
  46. package/rules/context-exfiltration/ATR-2026-00516-output-xss-via-llm.yaml +180 -0
  47. package/rules/context-exfiltration/ATR-2026-00524-claude-code-anthropic-base-url-credential-exfil.yaml +257 -0
  48. package/rules/context-exfiltration/ATR-2026-00548-cross-agent-session-context-leak.yaml +177 -0
  49. package/rules/excessive-autonomy/ATR-2026-00491-garak-agent-breaker-markdown-just-raw-json.yaml +152 -0
  50. package/rules/excessive-autonomy/ATR-2026-00500-ssrf-via-agent-url-fetch-instruction.yaml +168 -0
  51. package/rules/excessive-autonomy/ATR-2026-00553-runaway-tool-loop-behavioral.yaml +174 -0
  52. package/rules/model-abuse/ATR-2026-00502-training-data-extraction-via-divergent-repetition-attack.yaml +158 -0
  53. package/rules/model-abuse/ATR-2026-00517-model-extraction-distillation.yaml +187 -0
  54. package/rules/privilege-escalation/ATR-2026-00528-praisonai-auth-disabled-default.yaml +192 -0
  55. package/rules/privilege-escalation/ATR-2026-00539-crewai-codeinterpreter-sandbox-escape-rce.yaml +292 -0
  56. package/rules/privilege-escalation/ATR-2026-00546-crewai-json-loader-local-file-read.yaml +162 -0
  57. package/rules/privilege-escalation/ATR-2026-00547-crewai-rag-url-ssrf-bypass.yaml +167 -0
  58. package/rules/privilege-escalation/ATR-2026-00549-destructive-tool-without-human-approval.yaml +193 -0
  59. package/rules/privilege-escalation/ATR-2026-00551-cross-conversation-memory-write.yaml +198 -0
  60. package/rules/prompt-injection/ATR-2026-00452-direct-pwned-payload-injection.yaml +172 -0
  61. package/rules/prompt-injection/ATR-2026-00453-secret-key-reveal-demand.yaml +165 -0
  62. package/rules/prompt-injection/ATR-2026-00454-backslash-per-character-encoding.yaml +162 -0
  63. package/rules/prompt-injection/ATR-2026-00455-no-period-output-override.yaml +153 -0
  64. package/rules/prompt-injection/ATR-2026-00456-conditional-empty-input-injection.yaml +168 -0
  65. package/rules/prompt-injection/ATR-2026-00457-garak-dan-to-every-prompt.yaml +160 -0
  66. package/rules/prompt-injection/ATR-2026-00458-garak-dra-step-by-step.yaml +143 -0
  67. package/rules/prompt-injection/ATR-2026-00459-garak-dan-an-ai-language.yaml +136 -0
  68. package/rules/prompt-injection/ATR-2026-00460-garak-dan-no-matter-how.yaml +162 -0
  69. package/rules/prompt-injection/ATR-2026-00461-garak-goodside-mixedunassigned.yaml +140 -0
  70. package/rules/prompt-injection/ATR-2026-00462-garak-gcg-mixedunassigned.yaml +141 -0
  71. package/rules/prompt-injection/ATR-2026-00463-garak-lmrc-mixedunassigned.yaml +142 -0
  72. package/rules/prompt-injection/ATR-2026-00464-garak-dan-i-would-like.yaml +139 -0
  73. package/rules/prompt-injection/ATR-2026-00465-garak-dan-your-prompt-here.yaml +145 -0
  74. package/rules/prompt-injection/ATR-2026-00466-garak-latentinjection-following-text-from.yaml +141 -0
  75. package/rules/prompt-injection/ATR-2026-00467-garak-dan-act-as-a.yaml +140 -0
  76. package/rules/prompt-injection/ATR-2026-00468-garak-goat-the-target-llm.yaml +141 -0
  77. package/rules/prompt-injection/ATR-2026-00469-garak-dan-at-the-end.yaml +140 -0
  78. package/rules/prompt-injection/ATR-2026-00470-garak-dan-as-an-ai.yaml +155 -0
  79. package/rules/prompt-injection/ATR-2026-00472-garak-dan-are-going-to.yaml +150 -0
  80. package/rules/prompt-injection/ATR-2026-00473-garak-lmrc-how-can-i.yaml +140 -0
  81. package/rules/prompt-injection/ATR-2026-00474-garak-dan-that-chatgpt-has.yaml +133 -0
  82. package/rules/prompt-injection/ATR-2026-00475-garak-web-injection-alert-1-script.yaml +136 -0
  83. package/rules/prompt-injection/ATR-2026-00476-garak-web-injection-javascript-alert-1.yaml +157 -0
  84. package/rules/prompt-injection/ATR-2026-00477-garak-latentinjection-translate-the-following-text.yaml +143 -0
  85. package/rules/prompt-injection/ATR-2026-00478-garak-latentinjection-abuse-contact-email.yaml +136 -0
  86. package/rules/prompt-injection/ATR-2026-00479-garak-latentinjection-mixedunassigned.yaml +146 -0
  87. package/rules/prompt-injection/ATR-2026-00480-garak-dan-the-role-of.yaml +137 -0
  88. package/rules/prompt-injection/ATR-2026-00481-garak-dan-mixedunassigned.yaml +153 -0
  89. package/rules/prompt-injection/ATR-2026-00482-garak-lmrc-what-s-an.yaml +128 -0
  90. package/rules/prompt-injection/ATR-2026-00483-garak-dan-the-user-s.yaml +141 -0
  91. package/rules/prompt-injection/ATR-2026-00484-garak-dan-and-you-will.yaml +138 -0
  92. package/rules/prompt-injection/ATR-2026-00485-garak-dan-and-does-not.yaml +141 -0
  93. package/rules/prompt-injection/ATR-2026-00486-garak-dan-t-care-about.yaml +125 -0
  94. package/rules/prompt-injection/ATR-2026-00487-garak-dan-and-nothing-else.yaml +134 -0
  95. package/rules/prompt-injection/ATR-2026-00488-garak-encoding-alert-1-script.yaml +137 -0
  96. package/rules/prompt-injection/ATR-2026-00489-garak-encoding-javascript-alert-1.yaml +158 -0
  97. package/rules/prompt-injection/ATR-2026-00490-garak-dan-in-order-to.yaml +158 -0
  98. package/rules/prompt-injection/ATR-2026-00492-garak-dan-want-you-to.yaml +156 -0
  99. package/rules/prompt-injection/ATR-2026-00493-garak-latentinjection-registrar-iana-id.yaml +158 -0
  100. package/rules/prompt-injection/ATR-2026-00495-garak-dan-insert-prompt-here.yaml +177 -0
  101. package/rules/prompt-injection/ATR-2026-00496-garak-dan-no-matter-what.yaml +148 -0
  102. package/rules/prompt-injection/ATR-2026-00497-garak-encoding-mixedunassigned.yaml +179 -0
  103. package/rules/prompt-injection/ATR-2026-00498-garak-web-injection-mixedunassigned.yaml +169 -0
  104. package/rules/prompt-injection/ATR-2026-00499-garak-dan-from-now-on.yaml +150 -0
  105. package/rules/prompt-injection/ATR-2026-00503-fake-error-state-takeover-unrestricted-replacement-bot.yaml +160 -0
  106. package/rules/prompt-injection/ATR-2026-00506-nevermind-override-goal-hijacking-in-user-input-promptinject.yaml +149 -0
  107. package/rules/prompt-injection/ATR-2026-00507-screaming-stop-goal-hijacking-in-user-input-promptinject.yaml +154 -0
  108. package/rules/prompt-injection/ATR-2026-00508-escape-delimiter-wrapped-goal-hijacking-in-user-input-prompt.yaml +154 -0
  109. package/rules/prompt-injection/ATR-2026-00509-prompt-leaking-via-ignore-previous-instructions-in-user-inpu.yaml +168 -0
  110. package/rules/prompt-injection/ATR-2026-00510-delayed-tool-invocation-injection.yaml +189 -0
  111. package/rules/prompt-injection/ATR-2026-00511-mcp-web-context-poisoning.yaml +185 -0
  112. package/rules/prompt-injection/ATR-2026-00512-rules-file-backdoor-injection.yaml +181 -0
  113. package/rules/prompt-injection/ATR-2026-00515-hidden-text-prompt-injection.yaml +194 -0
  114. package/rules/prompt-injection/ATR-2026-00518-ignore-previous-and-following-instructions-output-command-promptinject.yaml +154 -0
  115. package/rules/prompt-injection/ATR-2026-00519-tautology-logic-noise-injection-promptbench.yaml +151 -0
  116. package/rules/prompt-injection/ATR-2026-00520-nlp-task-random-token-suffix-injection-promptbench.yaml +153 -0
  117. package/rules/prompt-injection/ATR-2026-00535-windsurf-ide-zero-click-prompt-injection.yaml +199 -0
  118. package/rules/prompt-injection/ATR-2026-00550-untrusted-retrieval-to-privileged-tool.yaml +199 -0
  119. package/rules/skill-compromise/ATR-2026-00123-skill-overreach-permissions.yaml +5 -2
  120. package/rules/skill-compromise/ATR-2026-00523-claude-code-hooks-session-start-pre-trust-rce.yaml +221 -0
  121. package/rules/skill-compromise/ATR-2026-00525-mini-shai-hulud-gh-token-monitor-persistence.yaml +220 -0
  122. package/rules/skill-compromise/ATR-2026-00527-skill-silent-git-remote-mirror-exfiltration.yaml +201 -0
  123. package/rules/tool-poisoning/ATR-2026-00494-garak-exploitation-mixedunassigned.yaml +179 -0
  124. package/rules/tool-poisoning/ATR-2026-00513-package-hallucination-exploitation.yaml +167 -0
  125. package/rules/tool-poisoning/ATR-2026-00521-shell-command-injection-agent-tool-context.yaml +176 -0
  126. package/rules/tool-poisoning/ATR-2026-00522-sql-injection-natural-language-agent-interface.yaml +219 -0
  127. package/rules/tool-poisoning/ATR-2026-00526-claude-code-shell-metachar-in-double-quoted-path.yaml +167 -0
  128. package/rules/tool-poisoning/ATR-2026-00529-litellm-proxy-sqli-cisa-kev.yaml +158 -0
  129. package/rules/tool-poisoning/ATR-2026-00530-ms-agent-shell-tool-unsanitized-argv-rce.yaml +184 -0
  130. package/rules/tool-poisoning/ATR-2026-00531-praisonai-unauthenticated-agent-api.yaml +174 -0
  131. package/rules/tool-poisoning/ATR-2026-00532-apache-doris-mcp-sql-injection.yaml +155 -0
  132. package/rules/tool-poisoning/ATR-2026-00533-apache-pinot-mcp-unauthenticated-takeover.yaml +151 -0
  133. package/rules/tool-poisoning/ATR-2026-00534-alibaba-rds-mcp-unauthenticated-metadata-exfil.yaml +155 -0
  134. package/rules/tool-poisoning/ATR-2026-00536-nginx-ui-mcp-unauthenticated-command-execution.yaml +199 -0
  135. package/rules/tool-poisoning/ATR-2026-00537-fastmcp-server-name-cmd-injection-windows.yaml +226 -0
  136. package/rules/tool-poisoning/ATR-2026-00538-langchain-chatchat-mcp-stdio-unauthenticated-rce.yaml +244 -0
  137. package/rules/tool-poisoning/ATR-2026-00540-praisonai-parse-mcp-command-cli-injection.yaml +186 -0
  138. package/rules/tool-poisoning/ATR-2026-00541-agent-zero-mcp-config-command-injection.yaml +183 -0
  139. package/rules/tool-poisoning/ATR-2026-00542-upsonic-mcp-command-allowlist-bypass.yaml +166 -0
  140. package/rules/tool-poisoning/ATR-2026-00543-litellm-mcp-server-argv-injection.yaml +168 -0
  141. package/rules/tool-poisoning/ATR-2026-00544-praisonai-pth-file-path-traversal-rce.yaml +172 -0
  142. package/rules/tool-poisoning/ATR-2026-00545-praisonai-tool-override-unauth-rce.yaml +170 -0
  143. package/spec/README.md +279 -0
  144. package/spec/atr-correlation-v1.0.md +281 -0
  145. package/spec/atr-event-v1.0.md +294 -0
  146. package/spec/atr-language-detection-v1.0.md +218 -0
  147. package/spec/atr-method-v1.1.md +557 -0
  148. package/spec/atr-profile-v1.0.md +307 -0
  149. package/spec/atr-schema.yaml +279 -8
  150. package/spec/category-registry/v1.0.yaml +200 -0
  151. package/spec/conformance/README.md +244 -0
  152. package/spec/conformance/SIGNING.md +191 -0
  153. package/spec/conformance/baseline/fixtures/ATR-2026-00001-tp-001/expected.json +36 -0
  154. package/spec/conformance/baseline/fixtures/ATR-2026-00001-tp-001/input.json +16 -0
  155. package/spec/conformance/baseline/fixtures/README.md +120 -0
  156. package/spec/conformance/baseline/manifest.json +56 -0
  157. package/spec/conformance/expected-results.schema.json +121 -0
  158. package/spec/external-registries/cccs-yara.md +142 -0
  159. package/spec/internet-drafts/draft-lin-atr-core-00.html +1925 -0
  160. package/spec/internet-drafts/draft-lin-atr-core-00.md +288 -0
  161. package/spec/internet-drafts/draft-lin-atr-core-00.txt +560 -0
  162. package/spec/internet-drafts/draft-lin-atr-core-00.xml +424 -0
  163. package/spec/mappings/README.md +43 -0
  164. package/spec/mappings/atr-to-nist-csf-2.0.md +234 -0
  165. package/spec/schema/correlation.schema.json +144 -0
  166. package/spec/schema/event.schema.json +233 -0
  167. package/spec/schema/profile.schema.json +196 -0
  168. package/spec/schema/rule.schema.json +224 -0
  169. package/spec/stix-extension/README.md +76 -13
  170. package/spec/stix-extension/examples/atr-rule-trace-method-example.json +85 -0
  171. package/spec/stix-extension/extension-definition.json +23 -3
  172. package/spec/stix-extension/x-atr-rule-schema.json +107 -11
@@ -0,0 +1,288 @@
1
+ ---
2
+ title: "Agent Threat Rules (ATR): An Open Detection Standard for AI Agent Security Threats"
3
+ abbrev: "ATR Core"
4
+ docname: draft-lin-atr-core-00
5
+ category: std
6
+ ipr: trust200902
7
+ area: Security
8
+ workgroup: SECEVENT
9
+ keyword:
10
+ - AI agent
11
+ - prompt injection
12
+ - tool poisoning
13
+ - MCP
14
+ - detection rule
15
+ - YAML
16
+ stand_alone: yes
17
+ pi:
18
+ toc: yes
19
+ tocompact: yes
20
+ tocdepth: 3
21
+ author:
22
+ - ins: K-H. Lin
23
+ name: Kuan-Hsin Lin
24
+ organization: ATR Project / Panguard AI, Inc.
25
+ email: adam@agentthreatrule.org
26
+ uri: https://agentthreatrule.org
27
+ normative:
28
+ RFC2119:
29
+ RFC8174:
30
+ RFC5234:
31
+ informative:
32
+ SIGMA:
33
+ title: "Sigma Rule Specification"
34
+ target: https://github.com/SigmaHQ/sigma-specification
35
+ STIX21:
36
+ title: "STIX Version 2.1 OASIS Standard"
37
+ target: https://docs.oasis-open.org/cti/stix/v2.1/stix-v2.1.html
38
+ NIST-AI-RMF:
39
+ title: "Artificial Intelligence Risk Management Framework (AI 100-1)"
40
+ target: https://nvlpubs.nist.gov/nistpubs/ai/NIST.AI.100-1.pdf
41
+ NIST-GAI-PROFILE:
42
+ title: "NIST AI 600-1 Generative AI Profile"
43
+ target: https://nvlpubs.nist.gov/nistpubs/ai/NIST.AI.600-1.pdf
44
+ OWASP-AGENTIC:
45
+ title: "OWASP Agentic Security Initiative Top 10 (2026)"
46
+ target: https://genai.owasp.org/llm-top-10/agentic-top-10/
47
+ MITRE-ATLAS:
48
+ title: "MITRE Adversarial Threat Landscape for AI Systems"
49
+ target: https://atlas.mitre.org/
50
+ ---
51
+
52
+ --- abstract
53
+
54
+ This document specifies the Agent Threat Rules (ATR) Core Specification, an
55
+ open, vendor-neutral detection rule standard for AI agent security threats.
56
+ ATR is analogous in role to Sigma {{SIGMA}} for SIEM but applies to AI agent
57
+ artifacts (skill descriptions, MCP tool definitions, agent configurations)
58
+ and AI agent runtime events (LLM input/output, tool invocations, context
59
+ windows). The specification defines the rule wire format in YAML 1.2, the
60
+ canonical rule identifier scheme, evaluation semantics with explicit
61
+ combinator and operator vocabularies, match output structure, ten canonical
62
+ threat categories, and three conformance levels. The intent is to enable
63
+ interoperable detection across independent implementations and to provide a
64
+ machine-readable layer that operationalizes policy frameworks such as
65
+ {{NIST-AI-RMF}}, {{NIST-GAI-PROFILE}}, {{OWASP-AGENTIC}}, and {{MITRE-ATLAS}}.
66
+
67
+ --- middle
68
+
69
+ # Introduction
70
+
71
+ AI agents now browse the web, run code, and invoke external tools. The
72
+ attack surface they expose is observable: prompt injections, tool
73
+ description poisoning, context window exfiltration, credential leakage
74
+ through agent-controlled HTTP traffic, and configuration files that take
75
+ effect before any human trust dialog. Several policy frameworks describe
76
+ these risks, but none of them are directly executable by a scanner. ATR
77
+ fills that gap with a vendor-neutral rule format, a stable identifier
78
+ scheme, and a conformance test suite that lets independent implementations
79
+ agree on whether a given input matches a given rule.
80
+
81
+ ATR rules are YAML documents. Each rule has a globally unique identifier
82
+ of the form `ATR-YYYY-NNNNN` assigned by the project's Numbering Authority.
83
+ A conforming engine loads the rule corpus and emits Match outputs for
84
+ inputs that satisfy the rule's detection condition. The Specification is
85
+ intentionally narrow: it defines wire format, identifiers, evaluation
86
+ semantics, match output, and three conformance levels. Higher-level
87
+ governance (rule contribution, deprecation, trademark policy) lives in
88
+ companion documents in the project repository.
89
+
90
+ ## Relationship to Existing Standards
91
+
92
+ ATR is the executable detection layer for AI agent threats. It cites
93
+ adjacent standards rather than replacing them:
94
+
95
+ - {{NIST-AI-RMF}} and {{NIST-GAI-PROFILE}} define risk management functions
96
+ (Govern, Map, Measure, Manage). ATR provides detection rules that
97
+ populate the Measure function at scan time, with a Cross-walk in
98
+ {{cross-walk}}.
99
+ - {{OWASP-AGENTIC}} and {{MITRE-ATLAS}} categorize adversarial behaviors.
100
+ ATR rule metadata maps each rule to specific categories and techniques
101
+ in these frameworks.
102
+ - {{STIX21}} provides a CTI interchange envelope. ATR Match output can be
103
+ emitted in STIX 2.1 via the `x-atr-rule` extension defined in the
104
+ project repository.
105
+
106
+ # Conventions and Terminology
107
+
108
+ {::boilerplate bcp14-tagged}
109
+
110
+ | Term | Definition |
111
+ |------|-----------|
112
+ | Rule | A YAML document conforming to {{rule-document-structure}} that describes one detection pattern. |
113
+ | Rule ID | A globally unique identifier in the form `ATR-YYYY-NNNNN`, see {{rule-identifier}}. |
114
+ | Engine | Software that loads Rules and evaluates Inputs against them. |
115
+ | Input | A structured artifact or AgentEvent submitted for evaluation. |
116
+ | Match | An Engine's output indicating that a Rule's detection condition evaluated to true for a given Input. |
117
+ | Numbering Authority | The body authorized to assign permanent Rule IDs (see project Governance document). |
118
+ | Conformance Level | One of L1, L2, L3, see {{conformance-levels}}. |
119
+ | Corpus | The set of Rules officially published under a given ATR version. |
120
+
121
+ # Rule Identifier {#rule-identifier}
122
+
123
+ ## Format
124
+
125
+ A Rule ID conforms to the following ABNF {{RFC5234}}:
126
+
127
+ ~~~ abnf
128
+ rule-id = "ATR" "-" year "-" sequence
129
+ year = 4DIGIT
130
+ sequence = 5DIGIT
131
+ DIGIT = %x30-39
132
+ ~~~
133
+
134
+ ## Assignment Rules
135
+
136
+ 1. Rule IDs MUST be assigned by the Numbering Authority and MUST NOT be
137
+ self-assigned by contributors.
138
+ 2. Once assigned, a Rule ID MUST be considered permanent and MUST NOT be
139
+ reassigned, even if the originally-assigned Rule is deprecated.
140
+ 3. A Rule ID MUST NOT encode classification information (category,
141
+ severity, scan target). Classification is carried in metadata fields
142
+ per {{rule-document-structure}}.
143
+ 4. A Rule ID MUST be globally unique within the official Corpus.
144
+ 5. Contributors SHOULD use a placeholder identifier of the form
145
+ `ATR-YYYY-DRAFT-<hex>` in pull requests prior to merge.
146
+
147
+ # Rule Document Structure {#rule-document-structure}
148
+
149
+ A conforming Rule is a UTF-8 encoded YAML 1.2 document whose top-level
150
+ value is a mapping containing at minimum the fields defined in this
151
+ section. Engines MUST preserve unknown top-level fields when round-tripping
152
+ Rules but MUST NOT allow such fields to alter evaluation outcomes.
153
+
154
+ The full field schema, including required and optional fields with type
155
+ constraints, is given in the project's `spec/atr-schema.yaml` and tracked
156
+ in this document by reference. Required top-level keys are:
157
+
158
+ `id`, `title`, `status`, `description`, `author`, `date`, `severity`,
159
+ `tags`, `agent_source`, `detection`, `response`, `test_cases`.
160
+
161
+ # Detection Semantics
162
+
163
+ ## Match Definition
164
+
165
+ Given a Rule R and an Input I, an Engine MUST emit a Match if, and only
166
+ if, all conditions in `R.detection.condition` evaluate to true against I
167
+ per the combinator semantics in {{condition-combinators}}.
168
+
169
+ ## Condition Combinators {#condition-combinators}
170
+
171
+ `R.detection.condition` is a logical expression over named selectors
172
+ declared in `R.detection.selectors`. Engines MUST implement:
173
+
174
+ | Combinator | Semantics |
175
+ |------------|-----------|
176
+ | `S` | true iff selector S matches |
177
+ | `S1 and S2` | true iff both S1 and S2 match |
178
+ | `S1 or S2` | true iff S1 or S2 matches |
179
+ | `not S` | true iff S does not match |
180
+ | `all of S*` | true iff every selector matched by the wildcard matches |
181
+ | `1 of S*` | true iff at least one selector matched by the wildcard matches |
182
+
183
+ ## Selector Operators
184
+
185
+ Engines MUST implement the operators below with the given semantics:
186
+ `contains`, `contains_i`, `regex` (ECMAScript-compatible), `equals`,
187
+ `startswith`, `endswith`, `length_gt`, `length_lt`, `in`.
188
+
189
+ Engines SHOULD reject Rules using operators outside this set with a
190
+ clear error message. Engines MAY support additional operators but MUST
191
+ treat such Rules as non-portable.
192
+
193
+ ## Determinism
194
+
195
+ For a given Engine version, a given Rule, and a given Input, the Match
196
+ outcome MUST be deterministic. Engines MUST NOT introduce non-determinism
197
+ (e.g., sampling, time-of-day branching) into Rule evaluation.
198
+
199
+ # Match Output
200
+
201
+ An Engine MUST emit Match output that includes, at minimum, a `rule_id`,
202
+ the `rule_version` it was loaded from, a stable `input_identifier`, the
203
+ `matched_at` timestamp (ISO 8601), the rule `severity`, the rule
204
+ `category`, and the list of `matched_selectors`. Engines MAY emit
205
+ additional fields and MAY use JSON, SARIF, STIX 2.1, or other
206
+ serializations.
207
+
208
+ # Canonical Categories
209
+
210
+ The following ten categories are normative for the current Specification.
211
+ New categories are introduced only by Specification amendment.
212
+
213
+ 1. `prompt-injection`
214
+ 2. `agent-manipulation`
215
+ 3. `skill-compromise`
216
+ 4. `context-exfiltration`
217
+ 5. `tool-poisoning`
218
+ 6. `privilege-escalation`
219
+ 7. `model-abuse`
220
+ 8. `excessive-autonomy`
221
+ 9. `model-security`
222
+ 10. `data-poisoning`
223
+
224
+ # Cross-walk {#cross-walk}
225
+
226
+ A Rule MAY include a `compliance` object mapping its detection to external
227
+ frameworks. Identifiers MUST come from the authoritative source for each
228
+ framework. Where ambiguity exists, Rule authors SHOULD include a
229
+ `references` entry pointing to the source document. Cross-walks defined
230
+ for the current Specification include OWASP Agentic Top 10, OWASP LLM
231
+ Top 10, MITRE ATLAS, NIST AI RMF, ISO/IEC 42001, EU AI Act, and
232
+ SAFE-MCP.
233
+
234
+ # Conformance Levels {#conformance-levels}
235
+
236
+ | Level | Requirement |
237
+ |-------|-------------|
238
+ | L1 | Engine loads the published Corpus without parse errors and emits Match output for at least one Rule. |
239
+ | L2 | Engine passes 100 percent of the Conformance Test Suite for the declared Spec version. |
240
+ | L3 | Engine passes L2, emits Match output in at least two interchange formats (JSON plus one of SARIF, STIX 2.1, MISP, OpenCTI), and publishes its results against the public benign Corpus with documented false-positive rate. |
241
+
242
+ An implementation MAY claim "ATR-Compatible" only with a declared
243
+ Conformance Level and a reproducible test report.
244
+
245
+ # Security Considerations
246
+
247
+ Rules are content that an Engine evaluates against potentially untrusted
248
+ Inputs. An Engine MUST NOT permit a Rule's free-form metadata fields
249
+ (`description`, `references`) to alter evaluation behavior. Only fields
250
+ listed in {{rule-document-structure}}, {{detection-semantics}}, and
251
+ match-output sections affect evaluation.
252
+
253
+ A malformed `regex` selector may cause catastrophic backtracking. Engines
254
+ MUST apply a per-rule execution timeout (RECOMMENDED: 100 ms per Input
255
+ per Rule) and MUST report a timeout as a non-match rather than an error.
256
+
257
+ If a Rule's matched substring contains PII or sensitive credentials,
258
+ Engines SHOULD provide a redaction option that hashes or truncates the
259
+ matched substring before emitting Match output.
260
+
261
+ # IANA Considerations
262
+
263
+ This document requests registration of the following media types:
264
+
265
+ - `application/vnd.atr.rule+yaml` — a single ATR Rule
266
+ - `application/vnd.atr.corpus+yaml` — a corpus manifest listing multiple Rules
267
+ - `application/vnd.atr.match+json` — Match output
268
+
269
+ Registration templates are included as Appendix B of the project's
270
+ SPEC.md and will be filed with IANA on advancement of this document.
271
+
272
+ --- back
273
+
274
+ # Acknowledgments
275
+
276
+ The author acknowledges contributions from external maintainers at
277
+ Cisco AI Defense, MISP / CIRCL, Microsoft Agent Governance Toolkit,
278
+ Gen Digital Sage, and the OWASP Gen AI Security Project, as well as
279
+ researchers at NVIDIA garak and the HackAPrompt 2023 competition whose
280
+ attack payloads seeded the rule corpus.
281
+
282
+ # Editorial Notes (to be removed before publication)
283
+
284
+ This is the `-00` revision. Subsequent revisions will incorporate IETF
285
+ SECEVENT working-group feedback. The corresponding full project
286
+ specification is maintained at
287
+ https://github.com/Agent-Threat-Rule/agent-threat-rules/blob/main/SPEC.md
288
+ and tracks this document by reference until working-group adoption.