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,234 @@
1
+ # ATR → NIST Cybersecurity Framework 2.0 Mapping
2
+
3
+ Version: 1.0.0
4
+ Status: Draft for NIST IR 8596 Informative Reference submission
5
+ Date: 2026-05-28
6
+ Editor: Adam Lin (林冠辛) <adam@agentthreatrule.org>
7
+ Mapped corpus: Agent Threat Rules v3.0.x (449 rules / 10 categories)
8
+ Reference framework: NIST CSF 2.0 (NIST CSWP 29, February 2024)
9
+
10
+ ---
11
+
12
+ ## 1. Purpose
13
+
14
+ This document maps the Agent Threat Rules (ATR) detection corpus to the NIST
15
+ Cybersecurity Framework 2.0 subcategory taxonomy. It is intended as an
16
+ Informative Reference submission per [NIST IR 8596 Cyber AI Profile][nist-ir-8596].
17
+
18
+ For each of the 10 ATR attack-class categories and each of the 5 detection
19
+ methods (atr-method-v1.1.md §4), this mapping enumerates the CSF 2.0
20
+ subcategories whose implementation guidance can cite ATR Rules as runtime
21
+ evidence.
22
+
23
+ ## 2. Background
24
+
25
+ NIST CSF 2.0 organizes cybersecurity outcomes under six Functions:
26
+
27
+ | Function | Code | Scope |
28
+ |----------|------|-------|
29
+ | GOVERN | GV | Cybersecurity governance, risk management strategy, policy |
30
+ | IDENTIFY | ID | Asset inventory, risk assessment, supply chain |
31
+ | PROTECT | PR | Access control, awareness training, data security |
32
+ | DETECT | DE | Continuous monitoring, adverse event detection |
33
+ | RESPOND | RS | Incident response, communications, mitigation |
34
+ | RECOVER | RC | Recovery planning, communications |
35
+
36
+ ATR Rules supply primarily **DETECT** outcomes (continuous monitoring of AI
37
+ agent runtime events) with secondary contributions to **PROTECT** (preventive
38
+ controls expressed as block actions in `detection.response`) and **GOVERN**
39
+ (governance over agent autonomy and human-in-the-loop policy).
40
+
41
+ ## 3. Method-to-Function Mapping
42
+
43
+ Each ATR detection method contributes primarily to one or two CSF Functions:
44
+
45
+ | ATR Method (atr-method-v1.1.md §4) | Primary Function | Secondary | Rationale |
46
+ |------------------------------------|------------------|-----------|-----------|
47
+ | `pattern` (regex match) | DETECT | PROTECT | Match-and-block at input boundary; analyst-tractable signatures |
48
+ | `signature` (hash / name / URL exact match) | DETECT | PROTECT | Known-bad blocking; sub-millisecond hot-path enforcement |
49
+ | `semantic` (LLM-as-judge) | DETECT | — | Intent classification beyond regex; produces analyst-reviewable verdicts |
50
+ | `behavioral` (metric threshold) | DETECT | — | Statistical anomaly over time windows |
51
+ | `trace` (declarative assertion over span DAG) | DETECT | GOVERN | Silent-failure / scope-drift detection; surfaces policy violations for human review |
52
+
53
+ ## 4. Category-to-Subcategory Mapping
54
+
55
+ For each of the 10 ATR attack-class categories (SPEC.md §8), the table lists
56
+ the CSF 2.0 subcategories the rule corpus supplies evidence for.
57
+
58
+ ### 4.1 prompt-injection (174 rules)
59
+
60
+ | CSF 2.0 Subcategory | Outcome | ATR Evidence | Rules (examples) |
61
+ |---------------------|---------|--------------|------------------|
62
+ | DE.CM-09 | Computing hardware and software, runtime environments, and their data are monitored for adverse events | Pattern + trace rules detect direct & indirect prompt injection at LLM I/O boundary and across retrieved-content-to-tool causal chains | ATR-2026-00001 (direct PI), ATR-2026-00550 (untrusted retrieval → privileged tool, trace) |
63
+ | DE.AE-02 | Potentially adverse events are analyzed to better understand associated activities | Each Rule's `detection.condition` produces a structured Match output (SPEC.md §7) with rule_id, severity, matched_selectors | All prompt-injection rules |
64
+ | PR.IR-01 | Networks and environments are protected from unauthorized logical access and usage | `response.actions: [block_input]` enforces preventive control when Pattern matches | ATR-2026-00001, -00440, -00441 |
65
+
66
+ ### 4.2 tool-poisoning (43 rules)
67
+
68
+ | CSF 2.0 Subcategory | Outcome | ATR Evidence | Rules (examples) |
69
+ |---------------------|---------|--------------|------------------|
70
+ | DE.CM-09 | Computing hardware and software monitored | MCP tool description and tool-call argument inspection | ATR-2026-00415, -00529 |
71
+ | ID.RA-08 | Processes for receiving, analyzing, and responding to vulnerabilities disclosed are established | CVE-mapped rules (CVE-2026-26030, CVE-2026-2275, CVE-2026-30617, ...) provide runtime detection for known tool-poisoning CVEs | ATR-2026-00529 (litellm SQL), -00538 (langchain-chatchat), -00543 (litellm MCP argv) |
72
+ | PR.IR-01 | Networks/environments protected from unauthorized access | `block_tool` action prevents tool execution when poisoned MCP message detected | All tool-poisoning rules with `block_tool` |
73
+
74
+ ### 4.3 context-exfiltration (42 rules)
75
+
76
+ | CSF 2.0 Subcategory | Outcome | ATR Evidence | Rules (examples) |
77
+ |---------------------|---------|--------------|------------------|
78
+ | DE.CM-09 | Continuous monitoring for adverse events | Pattern rules detect credential / API key / system prompt leakage attempts | ATR-2026-00076, -00086 |
79
+ | DE.CM-01 | Networks and network services are monitored | Trace rule 00548 detects cross-agent session leakage across delegation chains | ATR-2026-00548 (cross-agent context leak, trace) |
80
+ | PR.DS-01 | The confidentiality, integrity, and availability of data-at-rest are protected | Block actions prevent exfiltration when triggered | All context-exfil rules with `block_*` |
81
+
82
+ ### 4.4 agent-manipulation (106 rules)
83
+
84
+ | CSF 2.0 Subcategory | Outcome | ATR Evidence | Rules (examples) |
85
+ |---------------------|---------|--------------|------------------|
86
+ | DE.AE-02 | Adverse events analyzed | Goal drift, persona switching, role-impersonation pattern detection | ATR-2026-00032, -00074, -00552 (trace) |
87
+ | DE.AE-03 | Information is correlated from multiple sources | Trace rule 00552 correlates RETRIEVER / TOOL_RESPONSE pressure spans with AGENT goal-change spans | ATR-2026-00552 (goal drift, composite trace) |
88
+ | GV.RM-01 | Cybersecurity risk management strategy is established | Authorization for autonomous goal changes requires policy; trace rules surface deviations | ATR-2026-00552 |
89
+
90
+ ### 4.5 privilege-escalation (18 rules)
91
+
92
+ | CSF 2.0 Subcategory | Outcome | ATR Evidence | Rules (examples) |
93
+ |---------------------|---------|--------------|------------------|
94
+ | PR.AC-04 | Access permissions and authorizations are managed | Require-primitive trace rule 00549 enforces human-approval predecessor for destructive tools | ATR-2026-00549 (require, trace) |
95
+ | PR.IR-01 | Unauthorized access protection | Cross-conversation memory write rule blocks tenant-boundary escapes | ATR-2026-00551 (forbid + cross-attribute, trace) |
96
+ | GV.PO-01 | Policy for managing cybersecurity risks is established | Rules surface destructive autonomy that policy did not authorize | ATR-2026-00549, -00551 |
97
+
98
+ ### 4.6 excessive-autonomy (8 rules)
99
+
100
+ | CSF 2.0 Subcategory | Outcome | ATR Evidence | Rules (examples) |
101
+ |---------------------|---------|--------------|------------------|
102
+ | GV.PO-01 | Policy for cybersecurity risks established | Rules detect runaway loops, resource exhaustion patterns | ATR-2026-00045, -00046 |
103
+ | DE.AE-02 | Adverse events analyzed | Behavioral-method rules (placeholder in v1.1) will use metric thresholds over windows | (behavioral plane, §7 placeholder) |
104
+
105
+ ### 4.7 skill-compromise (43 rules)
106
+
107
+ | CSF 2.0 Subcategory | Outcome | ATR Evidence | Rules (examples) |
108
+ |---------------------|---------|--------------|------------------|
109
+ | GV.SC-04 | Suppliers are known and prioritized by criticality | Signature-method rules block known-malicious skill packages by hash / registry URL / package name | ATR-2026-DRAFT-skill-malware (template example in atr-method-v1.1.md §5.5) |
110
+ | ID.AM-08 | Systems, hardware, software, services, and data are managed throughout their life cycle | Signature rules supply skill provenance binding | All signature-method rules in skill-compromise |
111
+ | DE.CM-09 | Computing software monitored | Static skill scan (`scan_target: skill`) on every SKILL.md ingest | ATR-2026-00451, -00452 |
112
+
113
+ ### 4.8 model-abuse (10 rules)
114
+
115
+ | CSF 2.0 Subcategory | Outcome | ATR Evidence | Rules (examples) |
116
+ |---------------------|---------|--------------|------------------|
117
+ | DE.CM-09 | Computing software monitored | Detection of model extraction, fine-tuning abuse | ATR-2026-00072, -00073 |
118
+ | ID.RA-01 | Vulnerabilities in assets are identified, validated, and recorded | Known model-abuse CVEs covered | (subset of model-abuse rules) |
119
+
120
+ ### 4.9 model-security (3 rules)
121
+
122
+ | CSF 2.0 Subcategory | Outcome | ATR Evidence | Rules (examples) |
123
+ |---------------------|---------|--------------|------------------|
124
+ | PR.PS-04 | Log records are generated and made available for continuous monitoring | Model-security rules emit Match output for downstream SIEM consumption | ATR-2026-00433 (modelcache deserialization RCE) |
125
+ | ID.RA-08 | Vulnerability disclosure processes | CVE-mapped model-security rules | ATR-2026-00433 |
126
+
127
+ ### 4.10 data-poisoning (2 rules)
128
+
129
+ | CSF 2.0 Subcategory | Outcome | ATR Evidence | Rules (examples) |
130
+ |---------------------|---------|--------------|------------------|
131
+ | GV.SC-08 | Relevant suppliers and other third parties are included in incident planning, response, and recovery activities | Data-poisoning detection feeds supplier-incident coordination | ATR-2026-00073 |
132
+ | DE.CM-09 | Continuous monitoring | Training-data corruption pattern detection | (data-poisoning rules) |
133
+
134
+ ## 5. Detect-Plane Coverage Summary
135
+
136
+ Aggregating across all 10 categories, the ATR corpus contributes to the
137
+ following CSF 2.0 DETECT subcategories (the primary contribution area):
138
+
139
+ | DETECT Subcategory | Coverage | Notes |
140
+ |--------------------|----------|-------|
141
+ | DE.AE-02 (events analyzed) | Universal | Every Match output is a structured analyzed event |
142
+ | DE.AE-03 (info correlated) | High | Composite trace rules correlate multi-span signals |
143
+ | DE.AE-04 (events characterized) | High | severity + category + confidence on each Match |
144
+ | DE.AE-06 (impact and scope estimated) | Medium | severity rubric per SPEC.md §4; scope inferred from trace |
145
+ | DE.AE-08 (incidents declared) | Medium | response.actions includes `escalate` |
146
+ | DE.CM-01 (networks monitored) | Partial | OpenInference trace ingest provides network-adjacent view |
147
+ | DE.CM-03 (personnel activity monitored) | Partial | Human-approval signals tracked in trace rules |
148
+ | DE.CM-06 (external service providers monitored) | High | MCP server monitoring covers external services |
149
+ | DE.CM-09 (computing hardware/software monitored) | Universal | Core ATR scope |
150
+
151
+ ## 6. PROTECT-Plane Contribution
152
+
153
+ The `response.actions` vocabulary (SPEC.md Appendix A) maps onto CSF PROTECT
154
+ preventive controls:
155
+
156
+ | ATR Action | CSF 2.0 Subcategory |
157
+ |------------|---------------------|
158
+ | `block_input` / `block_output` / `block_request` | PR.IR-01 (unauthorized access protection) |
159
+ | `block_tool` | PR.IR-01 + PR.AC-04 (access permissions) |
160
+ | `quarantine_session` / `quarantine_artifact` | PR.IR-04 (asset segregation) |
161
+ | `redact_match` | PR.DS-02 (data-in-transit protected) |
162
+ | `revoke_credential` | PR.AA-02 (credentials issued, managed, revoked) |
163
+ | `rate_limit_source` | PR.IR-03 (mechanisms to achieve resilience) |
164
+
165
+ ## 7. GOVERN-Plane Contribution
166
+
167
+ Trace-method rules surface policy violations that require GOVERN-Function
168
+ attention:
169
+
170
+ | ATR Trace Rule Pattern | CSF 2.0 Subcategory |
171
+ |------------------------|---------------------|
172
+ | Missing human-approval predecessor (require primitive) | GV.PO-01 (policy established), PR.AC-04 |
173
+ | Cross-tenant scope drift (invariant primitive) | GV.SC-04 (supplier criticality), GV.OC-04 (legal/regulatory requirements understood) |
174
+ | Goal drift / autonomy escape (composite) | GV.RM-01 (risk management strategy), GV.SC-07 (risks from suppliers monitored) |
175
+
176
+ ## 8. Implementation Guidance (for NIST IR 8596 reviewers)
177
+
178
+ An organization seeking to use ATR as an Informative Reference for CSF 2.0
179
+ implementation:
180
+
181
+ 1. **Deploy an ATR-conformant engine.** Reference TypeScript engine at
182
+ `npm:agent-threat-rules`. Engines declare conformance per SPEC.md §11
183
+ (L1 = parses corpus; L2 = passes conformance test suite; L3 = emits
184
+ match output in 2+ interchange formats).
185
+
186
+ 2. **Select a Runtime Profile** (atr-method-v1.1.md §4.1):
187
+ - `deterministic` (pattern + signature only) for in-line hot path.
188
+ - `assisted` (semantic + behavioral + trace) for async sidecar.
189
+ - Both for full coverage.
190
+
191
+ 3. **Configure response actions** per organizational risk tolerance. The
192
+ `response.actions` field is a RECOMMENDATION; engines do NOT execute
193
+ automatically without explicit operator policy (SPEC.md §5.5).
194
+
195
+ 4. **Emit Match output to existing SIEM / SOAR / OSCAL pipelines.** The
196
+ `compliance.oscal_assessment_objective` field (atr-method-v1.1.md §9.1)
197
+ lets each Match attach as observation evidence beneath an OSCAL
198
+ Assessment Plan / Result.
199
+
200
+ 5. **Measure coverage** via the conformance test suite (
201
+ `conformance/v1.0/`) and report the suite version in any conformance
202
+ claim (SPEC.md §12).
203
+
204
+ ## 9. Open Items
205
+
206
+ - Behavioral-method (CSF DE.CM continuous monitoring) is a normative
207
+ placeholder in atr-method-v1.1.md §7. Full specification pending v1.2.
208
+ - The mapping above lists subcategories where ATR Rules supply evidence;
209
+ it does NOT claim full CSF subcategory coverage. CSF subcategories not
210
+ listed are not in scope for AI agent runtime detection.
211
+ - ATR currently maps to CSF 2.0 (Feb 2024 baseline). When NIST IR 8596
212
+ publishes the Cyber AI Profile with AI-specific subcategory guidance,
213
+ this document will be updated to align.
214
+
215
+ ## 10. References
216
+
217
+ ### 10.1 Normative
218
+
219
+ - [NIST CSF 2.0 / NIST CSWP 29][nist-csf-2] (Feb 2024)
220
+ - [NIST IR 8596: Cyber AI Profile Concept Paper][nist-ir-8596]
221
+ - [SPEC.md][atr-spec] — ATR Core Specification v1.0.0
222
+ - [atr-method-v1.1.md][atr-method] — ATR Method Extensions v1.1.0
223
+
224
+ ### 10.2 Cross-references
225
+
226
+ - ATR rules referencing this mapping carry the field
227
+ `references.nist_csf: [<subcategory-id>...]` per atr-method-v1.1.md §9.3.
228
+ - The STIX 2.1 x-atr-rule extension v1.1 carries the same data under
229
+ `compliance_refs.nist_csf` (spec/stix-extension/x-atr-rule-schema.json).
230
+
231
+ [nist-csf-2]: https://www.nist.gov/cyberframework
232
+ [nist-ir-8596]: https://csrc.nist.gov/pubs/ir/8596/ipd
233
+ [atr-spec]: ../../SPEC.md
234
+ [atr-method]: ../atr-method-v1.1.md
@@ -0,0 +1,144 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://spec.agentthreatrule.org/correlation/v1.0/schema.json",
4
+ "title": "ATR Correlation Rule v1.0",
5
+ "description": "Machine-readable schema for ATR correlation rule format. Normative spec at spec/atr-correlation-v1.0.md. License: CC BY 4.0.",
6
+ "type": "object",
7
+ "required": ["correlation", "source_rules", "correlation_logic", "response"],
8
+ "additionalProperties": false,
9
+ "properties": {
10
+ "correlation": {
11
+ "type": "object",
12
+ "required": [
13
+ "schema_version",
14
+ "id",
15
+ "title",
16
+ "description",
17
+ "status",
18
+ "severity",
19
+ "author",
20
+ "date",
21
+ "license"
22
+ ],
23
+ "properties": {
24
+ "schema_version": {"const": "1.0"},
25
+ "id": {
26
+ "type": "string",
27
+ "pattern": "^ATR-COR-(?:[A-Z]{2}-)?[0-9]{4}-[0-9]{5}$"
28
+ },
29
+ "title": {"type": "string", "minLength": 3},
30
+ "description": {"type": "string", "minLength": 20},
31
+ "status": {
32
+ "type": "string",
33
+ "enum": ["draft", "experimental", "stable", "deprecated"]
34
+ },
35
+ "severity": {
36
+ "type": "string",
37
+ "enum": ["critical", "high", "medium", "low", "informational"]
38
+ },
39
+ "author": {"type": "string"},
40
+ "date": {"type": "string", "format": "date"},
41
+ "license": {"type": "string"},
42
+ "references": {
43
+ "type": "object",
44
+ "additionalProperties": true
45
+ }
46
+ }
47
+ },
48
+ "source_rules": {
49
+ "type": "array",
50
+ "minItems": 1,
51
+ "items": {
52
+ "type": "object",
53
+ "required": ["alias"],
54
+ "oneOf": [
55
+ {"required": ["rule_id"], "properties": {"alias": {"type": "string"}, "rule_id": {"type": "string", "pattern": "^ATR-(?:[A-Z]{2}-)?[0-9]{4}-[0-9]{5}$"}}, "additionalProperties": false},
56
+ {"required": ["rule_id_pattern"], "properties": {"alias": {"type": "string"}, "rule_id_pattern": {"type": "string"}}, "additionalProperties": false},
57
+ {"required": ["category"], "properties": {"alias": {"type": "string"}, "category": {"type": "string"}}, "additionalProperties": false}
58
+ ]
59
+ }
60
+ },
61
+ "correlation_logic": {
62
+ "type": "object",
63
+ "required": ["type"],
64
+ "properties": {
65
+ "type": {
66
+ "type": "string",
67
+ "enum": [
68
+ "temporal_sequence",
69
+ "temporal_unordered",
70
+ "count_threshold",
71
+ "value_overlap",
72
+ "chain_propagation"
73
+ ]
74
+ },
75
+ "sequence": {
76
+ "type": "array",
77
+ "items": {"type": "object", "required": ["alias"], "properties": {"alias": {"type": "string"}}}
78
+ },
79
+ "count": {
80
+ "type": "object",
81
+ "properties": {
82
+ "rule_alias": {"type": "string"},
83
+ "threshold": {"type": "integer", "minimum": 1}
84
+ }
85
+ },
86
+ "value_overlap_field": {"type": "string"},
87
+ "join_keys": {
88
+ "type": "array",
89
+ "items": {"type": "string"},
90
+ "minItems": 1
91
+ },
92
+ "window": {
93
+ "type": "object",
94
+ "oneOf": [
95
+ {"required": ["type", "duration"], "properties": {"type": {"const": "wall_time"}, "duration": {"type": "string", "pattern": "^[0-9]+[smhd]$"}}, "additionalProperties": false},
96
+ {"required": ["type", "max_session_count"], "properties": {"type": {"const": "session_chain"}, "max_session_count": {"type": "integer", "minimum": 2}, "max_wall_time": {"type": "string", "pattern": "^[0-9]+[smhd]$"}}, "additionalProperties": false},
97
+ {"required": ["type", "max_depth"], "properties": {"type": {"const": "chain_depth"}, "max_depth": {"type": "integer", "minimum": 2}}, "additionalProperties": false},
98
+ {"required": ["type"], "properties": {"type": {"const": "unbounded"}}, "additionalProperties": false}
99
+ ]
100
+ }
101
+ }
102
+ },
103
+ "response": {
104
+ "type": "object",
105
+ "required": ["severity_uplift", "actions"],
106
+ "properties": {
107
+ "severity_uplift": {
108
+ "type": "string",
109
+ "enum": ["critical", "high", "medium", "low", "informational"]
110
+ },
111
+ "actions": {
112
+ "type": "array",
113
+ "items": {
114
+ "type": "string",
115
+ "enum": [
116
+ "block_input",
117
+ "block_output",
118
+ "redact",
119
+ "alert",
120
+ "snapshot",
121
+ "quarantine",
122
+ "terminate_session"
123
+ ]
124
+ },
125
+ "minItems": 1
126
+ },
127
+ "message_template": {"type": "string"}
128
+ }
129
+ },
130
+ "test_cases": {
131
+ "type": "object",
132
+ "properties": {
133
+ "true_positive_streams": {
134
+ "type": "array",
135
+ "items": {"type": "string", "description": "Path to JSONL fixture stream (positive case)"}
136
+ },
137
+ "true_negative_streams": {
138
+ "type": "array",
139
+ "items": {"type": "string", "description": "Path to JSONL fixture stream (negative case)"}
140
+ }
141
+ }
142
+ }
143
+ }
144
+ }
@@ -0,0 +1,233 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://spec.agentthreatrule.org/event/v1.0/schema.json",
4
+ "title": "ATR Event v1.0",
5
+ "description": "Machine-readable schema for ATR detection events. Normative spec at spec/atr-event-v1.0.md. License: CC BY 4.0.",
6
+ "type": "object",
7
+ "required": [
8
+ "@timestamp",
9
+ "atr.event_id",
10
+ "atr.spec_version",
11
+ "atr.engine_id",
12
+ "atr.rule_id",
13
+ "atr.rule_version",
14
+ "atr.rule_status",
15
+ "atr.severity",
16
+ "atr.category",
17
+ "atr.confidence",
18
+ "atr.matched_field",
19
+ "atr.matched_value_redacted",
20
+ "atr.response_action",
21
+ "agent.id",
22
+ "agent.platform",
23
+ "session.id",
24
+ "service.name"
25
+ ],
26
+ "additionalProperties": true,
27
+ "properties": {
28
+ "@timestamp": {
29
+ "type": "string",
30
+ "format": "date-time",
31
+ "description": "RFC 3339 UTC timestamp of when the rule fired."
32
+ },
33
+ "atr.event_id": {
34
+ "type": "string",
35
+ "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$",
36
+ "description": "UUID v7 (time-ordered) globally unique event identifier per RFC 9562."
37
+ },
38
+ "atr.spec_version": {
39
+ "type": "string",
40
+ "pattern": "^\\d+\\.\\d+$",
41
+ "description": "ATR spec version this event conforms to."
42
+ },
43
+ "atr.engine_id": {
44
+ "type": "string",
45
+ "pattern": "^[a-z0-9.-]+/[a-z0-9.-]+/[a-zA-Z0-9.+-]+$",
46
+ "description": "Engine identifier in form <vendor>/<product>/<version>."
47
+ },
48
+ "atr.rule_id": {
49
+ "type": "string",
50
+ "pattern": "^ATR-(?:[A-Z]{2}-)?[0-9]{4}-[0-9]{5}$",
51
+ "description": "Rule ID per ATR Rule Format Spec § 2. Canonical: ATR-YYYY-NNNNN. Sovereign-prefixed: ATR-XX-YYYY-NNNNN."
52
+ },
53
+ "atr.rule_version": {
54
+ "type": "integer",
55
+ "minimum": 1
56
+ },
57
+ "atr.rule_status": {
58
+ "type": "string",
59
+ "enum": ["draft", "experimental", "stable", "deprecated"]
60
+ },
61
+ "atr.rule_maturity": {
62
+ "type": "string",
63
+ "enum": ["draft", "experimental", "test", "stable", "deprecated"]
64
+ },
65
+ "atr.rule_review_status": {
66
+ "type": "string",
67
+ "enum": ["unreviewed", "community_reviewed", "tsc_approved"]
68
+ },
69
+ "atr.severity": {
70
+ "type": "string",
71
+ "enum": ["critical", "high", "medium", "low", "informational"]
72
+ },
73
+ "atr.category": {
74
+ "type": "string",
75
+ "description": "Top-level category from spec/category-registry/v1.0.yaml, OR 'unknown' for forward-compat with future registry versions."
76
+ },
77
+ "atr.subcategory": {
78
+ "type": ["string", "null"]
79
+ },
80
+ "atr.confidence": {
81
+ "type": "number",
82
+ "minimum": 0.0,
83
+ "maximum": 1.0
84
+ },
85
+ "atr.matched_field": {
86
+ "type": "string",
87
+ "enum": [
88
+ "user_input",
89
+ "agent_output",
90
+ "tool_call",
91
+ "tool_response",
92
+ "skill_content",
93
+ "mcp_exchange",
94
+ "memory_write",
95
+ "multi_agent_message"
96
+ ]
97
+ },
98
+ "atr.matched_value_redacted": {
99
+ "type": "string",
100
+ "description": "Redacted match. Sensitive content (api keys, PII) replaced with [REDACTED:type:length]. forensic_mode deployments MAY emit unredacted."
101
+ },
102
+ "atr.response_action": {
103
+ "type": "array",
104
+ "items": {
105
+ "type": "string",
106
+ "enum": [
107
+ "block_input",
108
+ "block_output",
109
+ "redact",
110
+ "alert",
111
+ "snapshot",
112
+ "quarantine",
113
+ "terminate_session"
114
+ ]
115
+ },
116
+ "minItems": 0
117
+ },
118
+ "atr.response_taken": {
119
+ "type": "array",
120
+ "items": {
121
+ "type": "string",
122
+ "enum": [
123
+ "block_input",
124
+ "block_output",
125
+ "redact",
126
+ "alert",
127
+ "snapshot",
128
+ "quarantine",
129
+ "terminate_session"
130
+ ]
131
+ }
132
+ },
133
+ "atr.response_threshold_met": {
134
+ "type": "boolean"
135
+ },
136
+ "atr.sovereign_attestation": {
137
+ "type": "object",
138
+ "description": "Required when rule ID is sovereign-prefixed per CHARTER § 8.2.",
139
+ "required": ["signer", "signature", "ca_chain"],
140
+ "properties": {
141
+ "signer": {"type": "string"},
142
+ "signature": {"type": "string", "contentEncoding": "base64"},
143
+ "ca_chain": {"type": "array", "items": {"type": "string"}}
144
+ }
145
+ },
146
+ "agent.id": {
147
+ "type": "string",
148
+ "minLength": 1
149
+ },
150
+ "agent.platform": {
151
+ "type": "string"
152
+ },
153
+ "agent.platform_version": {
154
+ "type": ["string", "null"]
155
+ },
156
+ "agent.from_id": {
157
+ "type": "string"
158
+ },
159
+ "agent.to_id": {
160
+ "type": "string"
161
+ },
162
+ "agent.delegation_chain": {
163
+ "type": "array",
164
+ "items": {
165
+ "type": "object",
166
+ "required": ["agent_id", "capability_grant", "granted_by"],
167
+ "properties": {
168
+ "agent_id": {"type": "string"},
169
+ "capability_grant": {"type": "string"},
170
+ "granted_by": {"type": "string"}
171
+ }
172
+ }
173
+ },
174
+ "agent.identity_assertion": {
175
+ "type": ["string", "null"],
176
+ "description": "JWT-format identity assertion per IETF AI agent auth drafts (when finalized)."
177
+ },
178
+ "session.id": {
179
+ "type": "string",
180
+ "minLength": 1
181
+ },
182
+ "service.name": {
183
+ "type": "string"
184
+ },
185
+ "service.version": {
186
+ "type": "string"
187
+ },
188
+ "tool.name": {
189
+ "type": "string"
190
+ },
191
+ "tool.args": {
192
+ "type": "object",
193
+ "description": "Redacted tool arguments."
194
+ },
195
+ "tool.privilege_class": {
196
+ "type": "string"
197
+ },
198
+ "tool.target_jurisdiction": {
199
+ "type": "string",
200
+ "pattern": "^([A-Z]{2}|und)$",
201
+ "description": "ISO 3166-1 alpha-2 country code or 'und' if unknown."
202
+ },
203
+ "memory.store_id": {
204
+ "type": "string"
205
+ },
206
+ "memory.write_key": {
207
+ "type": "string"
208
+ },
209
+ "memory.persistence_scope": {
210
+ "type": "string",
211
+ "enum": ["session", "user", "agent_global"]
212
+ },
213
+ "evidence.observation_id": {
214
+ "type": "string",
215
+ "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
216
+ },
217
+ "evidence.signature": {
218
+ "type": "string",
219
+ "contentEncoding": "base64",
220
+ "description": "Ed25519 signature over the canonical JSON encoding of this event."
221
+ },
222
+ "evidence.signature_key_id": {
223
+ "type": "string"
224
+ },
225
+ "evidence.upstream_chain": {
226
+ "type": ["array", "null"],
227
+ "items": {
228
+ "type": "string",
229
+ "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
230
+ }
231
+ }
232
+ }
233
+ }