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,120 @@
1
+ # ATR L1 Baseline Conformance Fixtures
2
+
3
+ > **STATUS: PROPOSED v1.0 — populating begun 2026-05-25.** This is the
4
+ > ground-truth input/output corpus that any conformant ATR engine MUST
5
+ > reproduce. See `../README.md` for the level definitions and
6
+ > `../../README.md` for spec index.
7
+
8
+ ---
9
+
10
+ ## Directory layout
11
+
12
+ ```
13
+ fixtures/
14
+ └── <fixture_id>/
15
+ ├── input.json ← the AgentEvent fed into the engine
16
+ └── expected.json ← the ATREvent shape the engine MUST produce
17
+ ```
18
+
19
+ ## Fixture ID convention
20
+
21
+ `<rule-id>-<kind>-<seq>` where:
22
+
23
+ - `<rule-id>` is the canonical or sovereign rule identifier (e.g.,
24
+ `ATR-2026-00001`, `ATR-COR-2026-00001`, `ATR-TW-2026-00001`).
25
+ - `<kind>` is one of:
26
+ - `tp` — true positive (rule should fire)
27
+ - `tn` — true negative (rule must NOT fire)
28
+ - `evasion` — known evasion attempt (rule should still fire)
29
+ - `multi` — input that exercises multiple rules
30
+ - `<seq>` is a zero-padded sequence number within the rule + kind.
31
+
32
+ Examples:
33
+ - `ATR-2026-00001-tp-001` — rule 00001, first true-positive fixture
34
+ - `ATR-2026-00001-tn-003` — rule 00001, third true-negative fixture
35
+ - `ATR-2026-00001-evasion-001` — rule 00001, first evasion fixture
36
+
37
+ ## input.json schema
38
+
39
+ ```json
40
+ {
41
+ "fixture_id": "string (matches directory name)",
42
+ "fixture_kind": "true_positive | true_negative | evasion | multi",
43
+ "description": "string (human-readable, sources cited)",
44
+ "target_rule": "string (the primary rule this fixture exercises)",
45
+ "input_event": {
46
+ "type": "AgentEventType (per atr-event-v1.0.md)",
47
+ "timestamp": "RFC 3339",
48
+ "content": "string (optional)",
49
+ "fields": { "...": "..." },
50
+ "metadata": { "...": "..." },
51
+ "sessionId": "string",
52
+ "scanContext": "runtime | skill | agent_message | ..."
53
+ }
54
+ }
55
+ ```
56
+
57
+ ## expected.json schema
58
+
59
+ ```json
60
+ {
61
+ "fixture_id": "string (matches directory name)",
62
+ "expected_match": "bool (true if any rule should fire)",
63
+ "expected_rules_fired": ["array of rule_id strings"],
64
+ "expected_event_shape": {
65
+ "atr.rule_id": "must-match",
66
+ "atr.severity": "must-match",
67
+ "atr.category": "must-match",
68
+ "...": "engine-supplied fields use <engine-supplied> sentinel"
69
+ },
70
+ "match_tolerance": {
71
+ "min_confidence": "float 0..1",
72
+ "max_confidence": "float 0..1",
73
+ "allow_additional_rule_matches": "bool",
74
+ "additional_match_allowlist": ["array of rule_ids permitted to also fire"]
75
+ },
76
+ "notes": ["array of human-readable conformance reasoning"]
77
+ }
78
+ ```
79
+
80
+ ## Conformance verdict
81
+
82
+ For each fixture, the verdict is one of:
83
+
84
+ - **PASS** — engine fired exactly the rules in `expected_rules_fired` (or
85
+ fired those plus rules in `additional_match_allowlist`), with event
86
+ fields matching `expected_event_shape` (modulo `<engine-supplied>`
87
+ sentinels), and `confidence` within `match_tolerance`.
88
+ - **FAIL** — any required rule did not fire, OR any forbidden rule fired,
89
+ OR event shape mismatch on a MUST-match field.
90
+ - **PARTIAL** — required rules fired but field shape was off (e.g., wrong
91
+ severity). Treated as FAIL for L1 conformance claim, but reported
92
+ separately for diagnostic.
93
+
94
+ L1-baseline pass threshold is in `../manifest.json` (precision 1.00,
95
+ recall 0.95).
96
+
97
+ ## Current fixture count
98
+
99
+ | Status | Count | Note |
100
+ |---|---|---|
101
+ | Populated | 1 | ATR-2026-00001-tp-001 |
102
+ | Targeted for v1.0 ratification | ~100 | one TP + one TN per stable canonical rule |
103
+ | Targeted for L2 (profile) | TBD | covers `atr-baseline-runtime` and `atr-nist-rmf-measure` |
104
+ | Targeted for L3 (correlation) | TBD | exercises each correlation type at least once |
105
+
106
+ Contributors: open a PR adding a fixture directory. CI will validate
107
+ schema. Maintainer review confirms the test case is canonical.
108
+
109
+ ## Provenance
110
+
111
+ Fixtures are sourced from:
112
+
113
+ 1. Rule `test_cases` blocks (already-validated true positives and
114
+ negatives that ship with each rule).
115
+ 2. Public CVE reproductions where ATR rules exist (e.g., CVE-2024-5184
116
+ for ATR-2026-00001).
117
+ 3. Published academic adversarial datasets (PINT MCP, Garak, METR,
118
+ SpAIware) where licensing permits.
119
+ 4. Community-contributed adversarial inputs (under DCO sign-off per
120
+ `legal/CLA.md`).
@@ -0,0 +1,56 @@
1
+ {
2
+ "schema_version": "1.0",
3
+ "corpus_version": "1.0.0",
4
+ "spec_version": "1.0",
5
+ "level": "L1-baseline",
6
+ "description": "ATR Baseline Conformance Test Corpus v1.0. Every conformant engine must pass this corpus to claim L1 baseline conformance.",
7
+ "license": "CC0-1.0",
8
+ "build_timestamp": "2026-05-25T00:00:00Z",
9
+ "rule_corpus_version_required": "agent-threat-rules>=3.1.0",
10
+ "fixture_sources": {
11
+ "attack-fixtures": {
12
+ "path": "attack-fixtures/",
13
+ "format": "JSON files, one event per file conforming to spec/schema/event.schema.json input form",
14
+ "expected_count_at_v1_0_0": "≥50 (initial corpus seeded from existing tests/attack-corpus/)",
15
+ "expected_fires": "non-empty set of rule IDs per fixture"
16
+ },
17
+ "benign-fixtures": {
18
+ "path": "benign-fixtures/",
19
+ "format": "SKILL.md text files, one fixture per file",
20
+ "expected_count_at_v1_0_0": "432 (sourced from data/skill-benchmark/benign/)",
21
+ "expected_fires": "EMPTY SET — any rule fire is a false positive"
22
+ },
23
+ "language-detection-fixtures": {
24
+ "path": "language-detection-fixtures/v1.0.json",
25
+ "format": "JSON array of {text, expected_language_code}",
26
+ "expected_count_at_v1_0_0": "≥200",
27
+ "expected_match": "exact ISO 639-1 / 639-3 code per spec/atr-language-detection-v1.0.md"
28
+ },
29
+ "research-mentions": {
30
+ "path": "research-mentions/corpus.jsonl",
31
+ "format": "JSONL, one record per line",
32
+ "expected_count_at_v1_0_0": "sourced from data/research-mentions/corpus.jsonl",
33
+ "expected_fires": "EMPTY SET — text MENTIONS attacks (papers, READMEs, blogs) but is not an attack"
34
+ }
35
+ },
36
+ "conformance_thresholds": {
37
+ "precision_min": 1.00,
38
+ "recall_min": 0.95,
39
+ "language_detection_accuracy_min": 1.00,
40
+ "fp_count_max": 0
41
+ },
42
+ "linked_references": [
43
+ "../README.md",
44
+ "../SIGNING.md",
45
+ "../expected-results.schema.json",
46
+ "../../atr-event-v1.0.md",
47
+ "../../atr-language-detection-v1.0.md",
48
+ "../../atr-schema.yaml"
49
+ ],
50
+ "build_provenance": {
51
+ "builder": "Adam Lin <adam@agentthreatrule.org>",
52
+ "bootstrap_phase": true,
53
+ "tsc_ratified": false,
54
+ "notes": "v1.0.0 manifest is the bootstrap fixture before TSC seating per governance/CHARTER.md § 11. Source-of-truth fixtures reference the existing data/skill-benchmark/ and data/research-mentions/ paths to avoid duplication during bootstrap. On TSC ratification + Phase 2 completion, fixtures will be COPIED (not referenced) into spec/conformance/baseline/ so the corpus is self-contained."
55
+ }
56
+ }
@@ -0,0 +1,121 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://spec.agentthreatrule.org/conformance/v1.0/expected-results.schema.json",
4
+ "title": "ATR Conformance Expected Results v1.0",
5
+ "description": "Schema for the canonical expected-results.json file shipped with each conformance level (baseline, profiles, correlation), AND for engine-results.json reports produced by implementations under test.",
6
+ "type": "object",
7
+ "required": [
8
+ "schema_version",
9
+ "corpus_version",
10
+ "spec_version",
11
+ "level",
12
+ "fixtures"
13
+ ],
14
+ "additionalProperties": false,
15
+ "properties": {
16
+ "schema_version": {
17
+ "const": "1.0"
18
+ },
19
+ "corpus_version": {
20
+ "type": "string",
21
+ "pattern": "^\\d+\\.\\d+\\.\\d+$"
22
+ },
23
+ "spec_version": {
24
+ "type": "string",
25
+ "pattern": "^\\d+\\.\\d+$"
26
+ },
27
+ "level": {
28
+ "type": "string",
29
+ "enum": ["L1-baseline", "L2-profile", "L3-correlation"]
30
+ },
31
+ "engine_id": {
32
+ "type": "string",
33
+ "description": "Only present in engine-results.json reports. Format: <vendor>/<product>/<version>."
34
+ },
35
+ "engine_run_timestamp": {
36
+ "type": "string",
37
+ "format": "date-time",
38
+ "description": "Only present in engine-results.json reports."
39
+ },
40
+ "rule_corpus_version_used": {
41
+ "type": "string",
42
+ "description": "ATR rule corpus version the engine loaded (e.g., agent-threat-rules@3.1.0)."
43
+ },
44
+ "fixtures": {
45
+ "type": "array",
46
+ "minItems": 1,
47
+ "items": {
48
+ "type": "object",
49
+ "required": ["fixture_id", "fixture_path"],
50
+ "properties": {
51
+ "fixture_id": {
52
+ "type": "string",
53
+ "description": "Unique identifier within this corpus, typically slug of fixture filename."
54
+ },
55
+ "fixture_path": {
56
+ "type": "string",
57
+ "description": "Path relative to spec/conformance/<level>/ root."
58
+ },
59
+ "input_summary": {
60
+ "type": "string",
61
+ "description": "1-line description of what this fixture exercises."
62
+ },
63
+ "expected_rules": {
64
+ "type": "array",
65
+ "items": {
66
+ "type": "string",
67
+ "pattern": "^ATR-(?:COR-)?(?:[A-Z]{2}-)?[0-9]{4}-[0-9]{5}$"
68
+ },
69
+ "description": "Rule IDs that MUST fire on this fixture. Empty array = MUST NOT fire any rule (TN fixture)."
70
+ },
71
+ "expected_event_partial": {
72
+ "type": "object",
73
+ "description": "Optional partial event match — engine output must contain these key-value pairs. Useful for asserting matched_field, category, severity uplift."
74
+ },
75
+ "expected_language_code": {
76
+ "type": "string",
77
+ "pattern": "^([a-z]{2}(?:-[A-Z][a-z]{3}|-[A-Z]{2})?|und)$",
78
+ "description": "For language-detection fixtures only: the expected ISO 639-1 / 639-3 code."
79
+ },
80
+ "engine_observed": {
81
+ "type": "object",
82
+ "description": "Only present in engine-results.json reports. The actual observation from the engine under test.",
83
+ "properties": {
84
+ "rules_fired": {
85
+ "type": "array",
86
+ "items": {
87
+ "type": "string",
88
+ "pattern": "^ATR-(?:COR-)?(?:[A-Z]{2}-)?[0-9]{4}-[0-9]{5}$"
89
+ }
90
+ },
91
+ "language_detected": {
92
+ "type": "string"
93
+ },
94
+ "pass": {"type": "boolean"},
95
+ "miss_reason": {
96
+ "type": "string",
97
+ "description": "Human-readable reason if pass=false."
98
+ }
99
+ }
100
+ }
101
+ }
102
+ }
103
+ },
104
+ "summary": {
105
+ "type": "object",
106
+ "description": "Only present in engine-results.json reports.",
107
+ "properties": {
108
+ "total_fixtures": {"type": "integer", "minimum": 0},
109
+ "passed": {"type": "integer", "minimum": 0},
110
+ "failed": {"type": "integer", "minimum": 0},
111
+ "precision": {"type": "number", "minimum": 0.0, "maximum": 1.0},
112
+ "recall": {"type": "number", "minimum": 0.0, "maximum": 1.0},
113
+ "language_detection_accuracy": {"type": "number", "minimum": 0.0, "maximum": 1.0},
114
+ "conformance_claim": {
115
+ "type": "string",
116
+ "enum": ["pass", "fail", "partial"]
117
+ }
118
+ }
119
+ }
120
+ }
121
+ }
@@ -0,0 +1,142 @@
1
+ # ATR ↔ CCCS-Yara Cross-Reference Convention
2
+
3
+ Version: 1.0.0
4
+ Status: Draft
5
+ Date: 2026-05-29
6
+ Editor: Adam Lin (林冠辛) <adam@agentthreatrule.org>
7
+ Trigger: CybercentreCanada/CCCS-Yara#100 closing comment (2026-05-26)
8
+ by cccs-rs: "better to handle the cross-reference on the ATR side at
9
+ this time... we can revisit later if we want to standardize across
10
+ the board"
11
+
12
+ ---
13
+
14
+ ## 1. Purpose
15
+
16
+ CCCS-Yara is the Canadian Centre for Cyber Security's public YARA rule
17
+ collection. Some ATR Rules cover threats that overlap with CCCS-Yara
18
+ rules — for example, an ATR rule detecting a malicious agent skill
19
+ package may share a SHA-256 indicator with a CCCS-Yara rule detecting
20
+ the dropper binary that delivered it.
21
+
22
+ When such overlap exists, ATR uses `references.external_references.cccs_yara`
23
+ to cite the corresponding CCCS-Yara rule name. ATR does NOT execute or
24
+ validate the CCCS-Yara rule; the reference is evidence only.
25
+
26
+ ## 2. Format
27
+
28
+ ATR rule YAML carries the cross-reference under the existing
29
+ `references.external_references.cccs_yara` field (per
30
+ `spec/atr-schema.yaml`):
31
+
32
+ ```yaml
33
+ references:
34
+ external_references:
35
+ cccs_yara:
36
+ - "APT_CN_BEACON_2024"
37
+ - "Malware_RAT_AsyncRAT"
38
+ ```
39
+
40
+ Values are opaque strings matching the `rule` keyword in the upstream
41
+ `.yar` file at https://github.com/CybercentreCanada/CCCS-Yara. ATR
42
+ authors SHOULD verify the rule name exists in the upstream repository
43
+ at authoring time and SHOULD pin the CCCS-Yara commit hash in
44
+ `references.research` if long-term stability matters:
45
+
46
+ ```yaml
47
+ references:
48
+ external_references:
49
+ cccs_yara: ["APT_CN_BEACON_2024"]
50
+ research:
51
+ - "CCCS-Yara@5d2f8a (https://github.com/CybercentreCanada/CCCS-Yara/blob/5d2f8a/...)"
52
+ ```
53
+
54
+ ## 3. Semantics
55
+
56
+ The cross-reference is non-normative in either direction:
57
+
58
+ - ATR engines MUST NOT load, parse, or execute CCCS-Yara rules.
59
+ - CCCS-Yara engines MUST NOT load, parse, or execute ATR rules.
60
+ - The cross-reference is data flowing through SIEM / SOAR / OSCAL
61
+ pipelines so analysts can pivot between ecosystems.
62
+
63
+ When an ATR Rule fires and emits a Match (SPEC.md §7), engines MAY
64
+ include the cited `external_references.cccs_yara` entries in the
65
+ Match output to help downstream correlation. The reference does NOT
66
+ guarantee that running CCCS-Yara on the same Input would also fire.
67
+
68
+ ## 4. Versioning
69
+
70
+ CCCS-Yara rule names are NOT versioned in the upstream repository.
71
+ A rule's content may change while keeping the same name. ATR Rule
72
+ authors SHOULD:
73
+
74
+ - Pin a commit hash in `references.research` when first authoring the
75
+ cross-reference.
76
+ - Re-verify the cross-reference annually as part of rule maintenance.
77
+ - Drop the cross-reference (do NOT silently update) if the upstream
78
+ CCCS-Yara rule changes scope.
79
+
80
+ ## 5. Reverse-direction convention
81
+
82
+ If CCCS-Yara contributors later choose to cite ATR Rule IDs from their
83
+ side, the recommended field is `metadata.atr_rule_ids` on the upstream
84
+ `.yar` rule. This convention is documented here as a courtesy; the
85
+ authoritative source is CCCS-Yara's own metadata conventions if and
86
+ when they choose to adopt it.
87
+
88
+ ## 6. Example worked cross-reference
89
+
90
+ A future ATR Rule covering skill-package supply-chain compromise via
91
+ known-malicious SHA-256 indicators:
92
+
93
+ ```yaml
94
+ id: ATR-2026-DRAFT-cccs-cross-ref-example
95
+ title: "Skill package matching CCCS-Yara dropper signature"
96
+ status: draft
97
+ severity: critical
98
+ description: >
99
+ Detects skill packages whose content hash matches a CCCS-Yara
100
+ rule for a known dropper. Cross-references the CCCS-Yara rule
101
+ name as evidence that the indicator is also recognised by the
102
+ Canadian Cybercentre's public corpus.
103
+ tags:
104
+ category: skill-compromise
105
+ scan_target: skill
106
+ detection:
107
+ method: signature
108
+ signature:
109
+ indicators:
110
+ - type: sha256
111
+ value: "<hash>"
112
+ target_field: skill.content
113
+ references:
114
+ external_references:
115
+ cccs_yara: ["Malware_Dropper_GenericLoader_2024"]
116
+ research:
117
+ - "CCCS-Yara@<commit-hash>"
118
+ response:
119
+ actions: [block_request, log_alert]
120
+ ```
121
+
122
+ When a Match fires, the Match output (SPEC.md §7) can carry
123
+ `external_references.cccs_yara` so a SOC analyst pivoting from the
124
+ ATR-side detection can immediately query the same SHA-256 against
125
+ the CCCS-Yara corpus.
126
+
127
+ ## 7. Open Items
128
+
129
+ - No reciprocity yet from CCCS-Yara side. Per cccs-rs's 2026-05-26
130
+ comment, they may revisit standardization "across the board" once
131
+ ATR has shipped worked examples. Aim: accumulate ≥10 cross-ref
132
+ examples over 3-6 months, then re-engage cccs-rs with adoption
133
+ evidence.
134
+ - Schema slot is intentionally generic. If CCCS-Yara later publishes
135
+ formal rule IDs (UUIDs / hashes), this convention extends naturally;
136
+ authors simply use the new identifier format.
137
+
138
+ ## 8. References
139
+
140
+ - Schema field: `spec/atr-schema.yaml` → `references.external_references.cccs_yara`
141
+ - Closing comment: https://github.com/CybercentreCanada/CCCS-Yara/pull/100
142
+ - ATR ↔ external registry convention: this document