四條路徑。同一個終點。
708 條規則,寫一次,任何地方都能跑。同一份規則集,接進 TypeScript、Python、CI 或 SIEM——Cisco、Microsoft、MISP 已經走過的路。
30 秒試用
不需要註冊、不需要 API key。一行指令掃描你的 SKILL.md 或 MCP config——你在本機跑的這份 YAML,正是 Cisco 與 Microsoft 在 production 跑的同一份規則。
708 條規則 · 10 個威脅類別 · < 5ms 延遲 · 零依賴 · MIT 授權
TypeScript / Node.js
文件→import { ATREngine } from 'agent-threat-rules';
const engine = new ATREngine();
const matches = engine.evaluate({
type: 'tool_response',
content: toolOutput,
timestamp: new Date().toISOString(),
});
if (matches.length > 0) {
// Threat detected — block or alert
}Python (pyATR)
文件→from pyatr import ATREngine
engine = ATREngine()
result = engine.evaluate(event={
"type": "llm_input",
"content": user_message,
})
if result.outcome == "deny":
# Block the requestRaw YAML (any language)
文件→# Point your scanner at rules/ directory # Each .yaml file follows ATR-SPEC-v1 schema # Parse with any YAML library # Schema: spec/atr-schema.yaml rules/ prompt-injection/ tool-poisoning/ agent-manipulation/ ... (10 categories)
GitHub Action (CI/CD)
文件→name: ATR Scan
on: [push, pull_request]
jobs:
scan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: Agent-Threat-Rule/agent-threat-rules@main
with:
path: '.' # Scan entire repo
severity: 'medium' # Minimum severity
fail-on-finding: 'true'
upload-sarif: 'true' # Results in GitHub Security tabSIEM Integration
文件→# Convert ATR rules to SIEM query language atr convert splunk # Output SPL queries atr convert elastic # Output Elasticsearch Query DSL atr convert sarif # Output SARIF v2.1.0 for CI/CD
GitHub Action 採用者
把 ATR 掛進任何 GitHub repo 的 CI。結果寫入 SARIF,出現在 GitHub Security 分頁——跟 CodeQL / dependabot 同一個位置。
# .github/workflows/atr-scan.yml
on: [push, pull_request]
jobs:
scan:
runs-on: ubuntu-latest
permissions:
security-events: write # for SARIF upload
steps:
- uses: actions/checkout@v4
- uses: Agent-Threat-Rule/agent-threat-rules@main
with:
severity: medium
fail-on-finding: true目前尚無公開採用紀錄。如果你在 repo 使用 ATR Action,請透過 GitHub issue 告訴我們,我們會列在這裡。
採用形式不只 GitHub Action——Cisco AI Defense (PR #79 PoC + PR #99 production) 以 rule-packs CLI 整合完整規則集;Microsoft AGT (PR #908 PoC + PR #1277 production) 以 PolicyDocument 格式整合規則(提 PR 時為 287 條,後續每週自動同步至 ATR main);Gen Digital Sage (PR #33) 整套規則包進 agentic-AI 風險評分層。這三筆算「上游採用」,不屬於 Action 使用統計。
Schema 穩定性保證
如果你把 ATR 當作上游依賴,你需要確保格式不會壞掉。以下是我們的承諾:
已發布且穩定。所有新增欄位皆為選填。現有欄位不會在主版本升級前被移除或重新命名。
破壞性變更只會發生在主版本轉換時(v1 → v2)。我們提供遷移指南,並至少有 6 個月的重疊期同時支援兩個版本。
持續新增規則(活躍期平均每週 2-5 條)。每條規則在合併前都通過 CI 驗證 + precision 測試。訂閱 GitHub Releases 取得更新日誌。
npm install — 語意版本控制,lockfile 鎖定版本
GitHub Action — CI 自動使用最新規則掃描
為什麼用 ATR 而不是自己寫?
授權與法律
可商用、修改、分發、再授權。無任何限制。
無貢獻者授權協議。所有貢獻皆以 MIT 授權,屬於社群所有。
ATR 不屬於任何公司。它是社群治理的開放標準。
完整 ATR 規則包 · skill-scanner production (PR #99)
10 個威脅類別
6 個 registry · 552 確認惡意軟體
20 merged · 14 under review
Threat Cloud — 選用參考服務
Threat Cloud 是 ATR 維護者運營的選用參考服務,並非標準的一部分。標準本體是規格加上 MIT 授權的規則,透過 npm / PyPI / 純 YAML 完全可離線使用;Threat Cloud 只提供 hosted 便利(規則同步、威脅提交),不用它也能達到同樣結果。
若你選擇接上:掃描器發現新威脅時可上報到 Threat Cloud,維護者會將其結晶成偵測規則,審核通過後合併進 MIT 規則集分發。以下是接上的技術文件——完全選用。
案例:Cisco 怎麼做的
Cisco 的 AI Defense 團隊把 ATR 規則整合為上游依賴。第一個 PR #79(2026-04-03)合併 34 條 PoC 規則,3 天內 merge。隨後 PR #80 建置 --rule-packs CLI 把 ATR 作為第一級規則來源。production PR #99(2026-04-22)把完整 ATR 規則集送進 Cisco AI Defense 的 skill-scanner 生產環境。
- 1
卡住了?開 Integration Request
spec walkthrough、design review、你的語言的 sample code。維護者七天內回覆。
開 issue → - 2
上線了?自己列進 ADOPTERS.md
採用者自行提 PR,維護者不預先審核——schema 對、附公開可驗證的證據連結就 merge。你的 PR 本身就是紀錄。
adopter PR 模板 → - 3
進採用者牆,證據週週重驗
生態頁直接讀 ADOPTERS.md 渲染,CI 每週對 GitHub 重驗每個證據連結並蓋上日期。
看採用者牆 →