National Cyber Warfare Foundation (NCWF)login

Agent Threat Rules for standardized detection of AI agent attacks


0 user ratings
2026-11-02 21:26:07
milo
Red Team (CNA)
"Agent

ATR (agent-threat-rules) is an open, vendor-neutral YAML rule format for detecting threats against AI agents — prompt injection, tool poisoning, config abuse — aimed at defenders and authorized security teams.








ToolAgent-Threat-Rule/agent-threat-rules — open detection-rule standard for AI agent security threats, with a TypeScript reference engine and Python wrapper
CategoryDetection engineering / threat-detection rule format and engine
Primary UseWriting, validating, and evaluating YAML detection rules over agent runtime events (llm_input, tool-call arguments, SKILL.md files, mcp-config.json) in authorized environments
Safe UseDefensive detection engineering for authorized security teams: CI scanning of agent configurations, lab evaluation of agent telemetry, and SIEM rule export for owned infrastructure
Telemetry NotePurely a defensive detection tool — it emits rule_id and severity on matches, exports SARIF v2.1.0 for the GitHub Security tab, and converts rules to Splunk SPL and Elasticsearch Query DSL; it leaves no offensive footprint

ATR (Agent Threat Rules) positions itself as the missing detection layer for a surface that most security tooling still does not model natively: AI agent runtimes. The project's framing is explicit and well chosen — it wants to be to AI-agent threat detection what Sigma is to SIEM detection and YARA is to malware signatures. Both of those formats succeeded because they decoupled the description of a detection from any particular engine, and ATR copies that playbook: rules are versioned YAML documents conforming to a schema, identified under the public ATR-YYYY-NNNNN scheme, and evaluated by any conforming engine. The repository ships a reference TypeScript engine plus a Python wrapper (pyatr on PyPI, agent-threat-rules on npm), all under MIT.


The README's background section makes the gap argument precisely. Sigma describes log-based detections for SIEM ingestion but has no native model for LLM I/O, tool-call arguments, or agent context windows; YARA matches file artifacts, not runtime agent events; and taxonomies like the OWASP Agentic Top 10 and MITRE ATLAS enumerate risks without producing executable detections. ATR sits deliberately between taxonomy and deployable rule: each rule declares the attack pattern it matches, the input field it inspects (LLM I/O, tool-call args, SKILL.md content, agent config), how to test itself, and how it maps back to OWASP, MITRE, SAFE-MCP, and NIST AI RMF. That last mapping is what makes it usable in a compliance-driven workflow, not just an engineering curiosity.


Scale claims are concrete rather than hand-wavy. The README cites 844 rules across 10 categories, with coverage badges asserting 10/10 against the OWASP Agentic Top 10, and all numbers traced to a canonical data/stats.json that the project declares authoritative over the README itself — a small but telling governance detail. Adoption is claimed through merges into open-source repositories at Microsoft, Cisco, and Gen Digital, plus community integrations from MISP/CIRCL, the OWASP Agent Security Regression Harness, SigmaHQ, and FINOS Common Cloud Controls. Treat those as self-reported until you verify the linked PRs, but the breadth is unusual for a project of this age.


What stands out architecturally is the scan_target discipline baked into the conformance model. A conforming engine MUST parse every field in spec/atr-schema.yaml, evaluate detection.conditions per the semantics in SPEC.md, honor scan_target (a rule with scan_target: skill MUST NOT fire against mcp_exchange events and vice versa), respect rule status so deprecated and draft rules stay out of production unless explicitly opted in, and emit rule_id and severity on every match. Rules in turn MUST carry conforming IDs, at least one detection condition, mandatory true_positives and true_negatives test cases (one each minimum at maturity: experimental, five each at maturity: stable), and a severity from informational through critical. This is RFC 2119 language applied seriously, and the test-case requirement is the kind of constraint that keeps a rule corpus from rotting.


The tooling around the format is where daily value lives. The atr CLI supports atr scan against a SKILL.md, an mcp-config.json, or a tools.json (MCP tools/list results, one event per tool), with --sarif output; atr validate runs schema plus safety validation on a rule; atr test executes a rule's own embedded test cases; atr scaffold generates rules interactively; and atr stats reports corpus statistics. The export path matters most for detection teams: atr convert generic-regex, atr convert splunk, and atr convert elastic turn the corpus into JSON patterns, Splunk SPL, or Elasticsearch Query DSL, meaning ATR can feed an existing SOC stack without forcing a new pipeline.


Installation is straightforward on both major ecosystems: npm install agent-threat-rules for the Node.js engine and CLI, or pip install pyatr for the Python wrapper. There is also a GitHub Action (Agent-Threat-Rule/agent-threat-rules@v3) that gates PRs with SARIF v2.1.0 results in the GitHub Security tab, and a Docker zero-install variant that bundles the CLI and pulls the latest published rules. The integration-shapes table in the README is honest about which consumer should pick which path — regex JSON export for tools that already do pattern matching, the engine APIs for new runtimes and proxies, pyATR for Python red-team harnesses, and the MCP server mode for live use with MCP clients like Claude Code, Cursor, and Windsurf.


The enforcement model shows mature design thinking. ATR separates detection lanes from blocking behavior: a lane selects which rules may fire, trading recall for precision, while blocking decides whether ATR may act on what fired — and, as the README stresses, neither implies the other. The narrowest lane, enforce, fires only stable rules and is described as the highest-precision set to run against benign traffic, which is the right default posture for a corpus that inevitably contains experimental patterns. Full details live in docs/ENFORCEMENT-MODEL.md.


A companion knowledge layer, ATD (Agentic Threat Detection), enumerates the techniques themselves — the "what" to ATR's "how" — with 80 techniques across 9 tactics, each mapped to MITRE ATLAS, OWASP ASI, and CWE. Every PR runs scripts/validate-atd.ts against a normative JSON schema, and scripts/atd/verify-atd-mappings.ts cross-checks every cited ATLAS identifier against the authoritative catalog. Notably, a technique needs verifiable provenance rather than an executable rule, so the catalog deliberately documents threats that no rule covers yet — a useful gap map for anyone prioritizing detection engineering work.


Governance and standardization deserve attention before you bet infrastructure on this. The current state is a Working Draft at version 4.1.5, governed single-maintainer (BDFL) under GOVERNANCE.md while transitioning toward a Technical Steering Committee. The repository also carries clearly labeled proposal-stage scaffolding for OASIS Open Project submission — a 9-seat TSC charter, spec/ layer documents like atr-event-v1.0.md and atr-correlation-v1.0.md, a conformance corpus structure, and legal artifacts — all explicitly tagged PROPOSED and NOT ratified, with the README stating the TSC has not formed and trust marks are not registered. The existing rule format, npm package, engine API, and rule corpus are unchanged and production-stable, but read STANDARDIZATION-STATUS.md before citing the v1.0 layer as settled.


For authorized defensive workflows, ATR fits three clear niches: CI-time scanning of agent configuration and SKILL.md artifacts before they ship, runtime evaluation of agent telemetry through the engine APIs or SIEM exports, and purple-team validation where you run known technique patterns against your own agent stack in a lab and measure whether detections fire. It is a detection and documentation tool, not an exploitation framework — nothing in the corpus or CLI facilitates compromise, and the mandatory test-case structure makes every rule auditable by a reviewer who did not write it.


Caveats worth flagging: the corpus's real-world precision is unproven outside the project's own test harness, the bilingual README's normative content is English-only but some scaffolding is aspirational, and the governance transition means the format could evolve under OASIS in ways that fork the current schema. Watch the maturity and lane fields in any rule you deploy, pin your rule corpus version, and treat the adoption list as an encouraging signal rather than a guarantee. As a defensive primitive for a surface growing faster than the tooling that protects it, ATR is one of the more credible attempts at standardization currently shipping.



Official project repository for Agent-Threat-Rule/agent-threat-rules.

Download Tool

Educational analysis for authorized security professionals. Use only in controlled, authorized environments.






Source: OffensiveSec
Source Link: https://www.offsecblog.com/2026/11/agent-threat-rules-for-standardized.html


Comments
new comment
Nobody has commented yet. Will you be the first?
 
Forum
Red Team (CNA)



Copyright 2012 through 2026 - National Cyber Warfare Foundation - All rights reserved worldwide.