agent-threat-rules 2.2.1 → 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.
- package/README.md +365 -327
- package/dist/engine.d.ts +46 -1
- package/dist/engine.d.ts.map +1 -1
- package/dist/engine.js +242 -1
- package/dist/engine.js.map +1 -1
- package/dist/eval/eval-harness.d.ts.map +1 -1
- package/dist/eval/eval-harness.js +9 -0
- package/dist/eval/eval-harness.js.map +1 -1
- package/dist/eval/run-hackaprompt-benchmark.js +9 -0
- package/dist/eval/run-hackaprompt-benchmark.js.map +1 -1
- package/dist/eval/run-pint-benchmark.js +9 -0
- package/dist/eval/run-pint-benchmark.js.map +1 -1
- package/dist/eval/skill-benchmark.d.ts +11 -0
- package/dist/eval/skill-benchmark.d.ts.map +1 -1
- package/dist/eval/skill-benchmark.js +57 -0
- package/dist/eval/skill-benchmark.js.map +1 -1
- package/dist/measurement/from-eval-harness.d.ts +70 -0
- package/dist/measurement/from-eval-harness.d.ts.map +1 -0
- package/dist/measurement/from-eval-harness.js +49 -0
- package/dist/measurement/from-eval-harness.js.map +1 -0
- package/dist/measurement/schema.d.ts +152 -0
- package/dist/measurement/schema.d.ts.map +1 -0
- package/dist/measurement/schema.js +178 -0
- package/dist/measurement/schema.js.map +1 -0
- package/dist/measurement/write.d.ts +64 -0
- package/dist/measurement/write.d.ts.map +1 -0
- package/dist/measurement/write.js +163 -0
- package/dist/measurement/write.js.map +1 -0
- package/dist/semantic-evaluator.d.ts +48 -0
- package/dist/semantic-evaluator.d.ts.map +1 -0
- package/dist/semantic-evaluator.js +107 -0
- package/dist/semantic-evaluator.js.map +1 -0
- package/dist/trace-evaluator.d.ts +22 -0
- package/dist/trace-evaluator.d.ts.map +1 -0
- package/dist/trace-evaluator.js +249 -0
- package/dist/trace-evaluator.js.map +1 -0
- package/dist/types.d.ts +143 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +5 -3
- package/rules/agent-manipulation/ATR-2026-00552-goal-drift-after-pressure-injection.yaml +216 -0
- package/rules/context-exfiltration/ATR-2026-00524-claude-code-anthropic-base-url-credential-exfil.yaml +257 -0
- package/rules/context-exfiltration/ATR-2026-00548-cross-agent-session-context-leak.yaml +177 -0
- package/rules/excessive-autonomy/ATR-2026-00553-runaway-tool-loop-behavioral.yaml +174 -0
- package/rules/privilege-escalation/ATR-2026-00528-praisonai-auth-disabled-default.yaml +192 -0
- package/rules/privilege-escalation/ATR-2026-00539-crewai-codeinterpreter-sandbox-escape-rce.yaml +292 -0
- package/rules/privilege-escalation/ATR-2026-00546-crewai-json-loader-local-file-read.yaml +162 -0
- package/rules/privilege-escalation/ATR-2026-00547-crewai-rag-url-ssrf-bypass.yaml +167 -0
- package/rules/privilege-escalation/ATR-2026-00549-destructive-tool-without-human-approval.yaml +193 -0
- package/rules/privilege-escalation/ATR-2026-00551-cross-conversation-memory-write.yaml +198 -0
- package/rules/prompt-injection/ATR-2026-00535-windsurf-ide-zero-click-prompt-injection.yaml +199 -0
- package/rules/prompt-injection/ATR-2026-00550-untrusted-retrieval-to-privileged-tool.yaml +199 -0
- package/rules/skill-compromise/ATR-2026-00123-skill-overreach-permissions.yaml +5 -2
- package/rules/skill-compromise/ATR-2026-00523-claude-code-hooks-session-start-pre-trust-rce.yaml +221 -0
- package/rules/skill-compromise/ATR-2026-00525-mini-shai-hulud-gh-token-monitor-persistence.yaml +220 -0
- package/rules/skill-compromise/ATR-2026-00527-skill-silent-git-remote-mirror-exfiltration.yaml +201 -0
- package/rules/tool-poisoning/ATR-2026-00526-claude-code-shell-metachar-in-double-quoted-path.yaml +167 -0
- package/rules/tool-poisoning/ATR-2026-00529-litellm-proxy-sqli-cisa-kev.yaml +158 -0
- package/rules/tool-poisoning/ATR-2026-00530-ms-agent-shell-tool-unsanitized-argv-rce.yaml +184 -0
- package/rules/tool-poisoning/ATR-2026-00531-praisonai-unauthenticated-agent-api.yaml +174 -0
- package/rules/tool-poisoning/ATR-2026-00532-apache-doris-mcp-sql-injection.yaml +155 -0
- package/rules/tool-poisoning/ATR-2026-00533-apache-pinot-mcp-unauthenticated-takeover.yaml +151 -0
- package/rules/tool-poisoning/ATR-2026-00534-alibaba-rds-mcp-unauthenticated-metadata-exfil.yaml +155 -0
- package/rules/tool-poisoning/ATR-2026-00536-nginx-ui-mcp-unauthenticated-command-execution.yaml +199 -0
- package/rules/tool-poisoning/ATR-2026-00537-fastmcp-server-name-cmd-injection-windows.yaml +226 -0
- package/rules/tool-poisoning/ATR-2026-00538-langchain-chatchat-mcp-stdio-unauthenticated-rce.yaml +244 -0
- package/rules/tool-poisoning/ATR-2026-00540-praisonai-parse-mcp-command-cli-injection.yaml +186 -0
- package/rules/tool-poisoning/ATR-2026-00541-agent-zero-mcp-config-command-injection.yaml +183 -0
- package/rules/tool-poisoning/ATR-2026-00542-upsonic-mcp-command-allowlist-bypass.yaml +166 -0
- package/rules/tool-poisoning/ATR-2026-00543-litellm-mcp-server-argv-injection.yaml +168 -0
- package/rules/tool-poisoning/ATR-2026-00544-praisonai-pth-file-path-traversal-rce.yaml +172 -0
- package/rules/tool-poisoning/ATR-2026-00545-praisonai-tool-override-unauth-rce.yaml +170 -0
- package/spec/README.md +279 -0
- package/spec/atr-correlation-v1.0.md +281 -0
- package/spec/atr-event-v1.0.md +294 -0
- package/spec/atr-language-detection-v1.0.md +218 -0
- package/spec/atr-method-v1.1.md +557 -0
- package/spec/atr-profile-v1.0.md +307 -0
- package/spec/atr-schema.yaml +279 -8
- package/spec/category-registry/v1.0.yaml +200 -0
- package/spec/conformance/README.md +244 -0
- package/spec/conformance/SIGNING.md +191 -0
- package/spec/conformance/baseline/fixtures/ATR-2026-00001-tp-001/expected.json +36 -0
- package/spec/conformance/baseline/fixtures/ATR-2026-00001-tp-001/input.json +16 -0
- package/spec/conformance/baseline/fixtures/README.md +120 -0
- package/spec/conformance/baseline/manifest.json +56 -0
- package/spec/conformance/expected-results.schema.json +121 -0
- package/spec/external-registries/cccs-yara.md +142 -0
- package/spec/internet-drafts/draft-lin-atr-core-00.html +1925 -0
- package/spec/internet-drafts/draft-lin-atr-core-00.md +288 -0
- package/spec/internet-drafts/draft-lin-atr-core-00.txt +560 -0
- package/spec/internet-drafts/draft-lin-atr-core-00.xml +424 -0
- package/spec/mappings/README.md +43 -0
- package/spec/mappings/atr-to-nist-csf-2.0.md +234 -0
- package/spec/schema/correlation.schema.json +144 -0
- package/spec/schema/event.schema.json +233 -0
- package/spec/schema/profile.schema.json +196 -0
- package/spec/schema/rule.schema.json +224 -0
- package/spec/stix-extension/README.md +76 -13
- package/spec/stix-extension/examples/atr-rule-trace-method-example.json +85 -0
- package/spec/stix-extension/extension-definition.json +23 -3
- 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
|