Skip to content
Integrate

四條路徑。同一個終點。

427 條規則,隨時可整合。跟 Cisco 走的同一條路。

選擇你的整合程度
L1掃描
個人開發者
一行指令或 GitHub Action
即時知道你的 AI 工具有沒有被下毒
更新方式: 每次 npx 自動拉最新規則
L2嵌入
平台方(IDE、agent 框架)
npm install + 呼叫 ATR engine
你的用戶自動受到 427 條規則保護
更新方式: npm update 或 lockfile + CI
L3雙向
安全平台、企業 SOC
嵌入 + 上報威脅到 Threat Cloud
你的端點變成全球感測器,你也收到全球情報
更新方式: TC 即時推送 + npm update

30 秒試用

不需要註冊、不需要 API key。一行指令掃描你的 SKILL.md 或 MCP config。

掃描一個 SKILL.md 檔案
$ npx agent-threat-rules scan your-skill.md
掃描整個目錄
$ npx agent-threat-rules scan ./my-mcp-skills/
安裝為 Claude Code 即時防護
$ npx agent-threat-rules init --global

427 條規則 · 8 個威脅類別 · < 5ms 延遲 · 零依賴 · MIT 授權

SDK 整合

TypeScript / Node.js

文件
$ npm install agent-threat-rules
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)

文件
$ pip install pyatr
from pyatr import ATREngine

engine = ATREngine()
result = engine.evaluate(event={
    "type": "llm_input",
    "content": user_message,
})

if result.outcome == "deny":
    # Block the request

Raw YAML (any language)

文件
$ git submodule add https://github.com/Agent-Threat-Rule/agent-threat-rules.git
# 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/
  ... (8 categories)

GitHub Action (CI/CD)

文件
$ # Add to .github/workflows/atr-scan.yml
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 tab

SIEM Integration

文件
$ atr convert splunk --output splunk-queries.txt
# 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 格式整合 287 條規則並每週自動同步;Gen Digital Sage (PR #33) 整套規則包進 agentic-AI 風險評分層。這三筆算「上游採用」,不屬於 Action 使用統計。

Schema 穩定性保證

如果你把 ATR 當作上游依賴,你需要確保格式不會壞掉。以下是我們的承諾:

ATR-SPEC-v1 (穩定版)

已發布且穩定。所有新增欄位皆為選填。現有欄位不會在主版本升級前被移除或重新命名。

向後相容

破壞性變更只會發生在主版本轉換時(v1 → v2)。我們提供遷移指南,並至少有 6 個月的重疊期同時支援兩個版本。

更新頻率

持續新增規則(活躍期平均每週 2-5 條)。每條規則在合併前都通過 CI 驗證 + precision 測試。訂閱 GitHub Releases 取得更新日誌。

同步方式
git submodule鎖定 tag,按你的節奏更新
npm install語意版本控制,lockfile 鎖定版本
GitHub ActionCI 自動使用最新規則掃描

為什麼用 ATR 而不是自己寫?

覆蓋範圍
ATR427 條規則,39 個 CVE 對應,8 個威脅類別
自建需要自行建立規則庫
新攻擊反應
ATRThreat Cloud 結晶,目標數小時內產出規則
自建取決於你團隊的頻寬
繞過測試
ATR64 種已記錄的繞過技術,每個 PR 都測試
自建需要額外投入時間建立
OWASP / MITRE 對應
ATR內建。Agentic 10/10 + 每條規則對應 MITRE ATLAS
自建數小時的手動對應工作
維護成本
ATR社群維護。MIT 授權。零成本。
自建需要持續的人力投入
生態系
ATRCisco 已整合,OWASP 和 OpenSSF PR 審查中
自建獨立維護,無共享規則
 ATR自建規則

授權與法律

MIT License

可商用、修改、分發、再授權。無任何限制。

無 CLA

無貢獻者授權協議。所有貢獻皆以 MIT 授權,屬於社群所有。

廠商中立

ATR 不屬於任何公司。它是社群治理的開放標準。

已被採用
Cisco AI Defense

完整 ATR 規則包 · skill-scanner production (PR #99)

427 條偵測規則

8 個威脅類別

96,096 已掃描

6 個 registry · 751 惡意軟體

30 個生態系整合

11 merged · 19 under review

上報威脅 — 讓你的端點成為全球感測器

你的掃描器發現了新威脅?上報到 Threat Cloud,ATR 會自動結晶成偵測規則,審核通過後分發給全世界。你發現的威脅,保護所有人。

方式 1:CLI(最簡單)
$ npx agent-threat-rules scan . --report-to-cloud
方式 2:程式庫(平台整合)
// 你的平台發現威脅時自動上報
import { ATREngine, createTCReporter } from 'agent-threat-rules';
const engine = new ATREngine({
reporter: createTCReporter(), // 匿名,不需 API key
});
// 偵測結果自動批次上報 TC
方式 3:API(完全自訂)
# 直接呼叫 TC API
curl -X POST https://tc.agentthreatrule.org/api/threats \
-H 'Content-Type: application/json' \
-d '{"ruleId":"ATR-2026-00121","severity":"critical",
"contentHash":"abc123","scanTarget":"my-skill"}
上報後會發生什麼
1. 聚合
TC 收集多個端點的訊號
2. 結晶
AI 分析模式,產出規則草稿
3. 審核
人工審核 FP + 攻擊類型分類
4. 分發
合併到 ATR → npm publish → 全球更新

案例:Cisco 怎麼做的

完整規則包
在 skill-scanner production
2 PR
PoC (#79) → production (#99)
3 天
首次提交到合併

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 生產環境。