Threat Rules

io.github.GuardBee由 GitHub 账号 GuardBee 发布v0.5.1更新于 Nov 3, 2026

GuardBee MCP bridge to Agent Threat Rules (ATR) for runtime agent/MCP threat detection

已验证STDIO仅桌面安全与监控AI 与机器学习

概览

AI 生成的概览

本地 MCP 桥接 Agent Threat Rules(ATR),让助手对文本、文件和代理事件做提示注入、工具投毒等威胁检测。

可以做什么
  • 对自由文本、本地文件和结构化 AgentEvent JSON 按 ATR 与 GuardBee 规则评分,返回命中结果与后续扫描器提示
  • 列出已加载的检测规则,并按类别与来源(ATR 或 GuardBee)统计规则数量
  • 说明 ATR 运行时规则如何补充 GuardBee 静态 MCP 审计器
  • 把运行时发现映射到 OWASP LLM 应用十大风险(2025)与 MITRE ATLAS
适用场景
适合需要让助手在运行时检查提示词、工具输出、文件或代理事件是否命中已知 AI 代理威胁模式,并据此找到对应 GuardBee 审计器做进一步审查的场景。
运行要求
以本地 stdio 进程运行,来自 npm 包 @guardbee/mcp-threat-rules(需 Node.js/npx)。未声明认证、环境变量或请求头。可通过项目规则目录中的 YAML 或 GUARDBEE_ATR_RULES_DIR 变量添加自定义规则。
安装前请注意
evaluate_file 会读取本地文件内容并送入规则评估,请只指向愿意被处理的文件。遥测默认关闭;设置 GUARDBEE_TELEMETRY=1 后会向第三方发送服务器、工具、成功状态、耗时以及文件路径等短参数值,较长字符串和 content、token、password 等字段会被替换为占位符。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Threat Rules,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

@guardbee/mcp-threat-rules

🇬🇧 English | 🇹🇷 Türkçe | 🇨🇳 中文 | 🇯🇵 日本語 | 🇰🇷 한국어 | 🇧🇷 Português | 🇪🇸 Español | 🇩🇪 Deutsch

[npm version] [npm downloads] [License: MIT]

GuardBee MCP bridge to Agent Threat Rules (ATR) — the open, Sigma-like detection standard for AI agent threats (prompt injection, tool poisoning, context exfiltration, MCP attacks).

ATR evaluates runtime events. GuardBee’s other packages mostly scan source/catalogs. This package connects both: run ATR plus GuardBee rules (KVKK / Turkish & Chinese injection / Chinese ID / lethal-trifecta intent), then jump to the matching GuardBee auditor.

Custom project rules: drop YAML into .guardbee/atr-rules/ or set GUARDBEE_ATR_RULES_DIR.

Telemetry is off by default. With GUARDBEE_TELEMETRY=1 it sends the server, tool, success, duration and short parameter values such as a file path; longer strings and fields like content, token or password are replaced with a placeholder. See @guardbee/mcp-telemetry.

Claude ──► threat-rules (ATR) ──► matches + GuardBee follow-up hints              │              ├─ evaluate_text / evaluate_file / evaluate_event              ├─ list_rules / rule_stats              └─ explain_bridge

Built-in GuardBee rules include KVKK TC Kimlik, Turkish & Chinese injection, Chinese national ID, and lethal-trifecta intent (GB-ATR-2026-00001 … 00005).

Upstream ATR is MIT-licensed and already used across the industry. We depend on agent-threat-rules rather than forking it.

Tools

ToolPurpose
evaluate_textScore free text against ATR + GuardBee rules
evaluate_fileScore a local file
evaluate_eventScore a structured ATR AgentEvent JSON
list_rulesList loaded rules (source=atr|guardbee)
rule_statsCounts by category/source
explain_bridgeHow ATR maps onto GuardBee scanners
framework_mapHow GuardBee runtime findings map to OWASP LLM Top 10 (2025) and MITRE ATLAS — the mapping guardbee-proxy report uses

CLI

npx @guardbee/mcp-threat-rules eval "…" --format=json --fail-on=highnpx @guardbee/mcp-threat-rules scan ./prompt.txt --format=sarifnpx @guardbee/mcp-threat-rules list --source=guardbeenpx @guardbee/mcp-threat-rules stats

Related GuardBee packages

ATR categoryGuardBee follow-up
prompt-injection@guardbee/mcp-prompt-injection-scanner
tool-poisoning@guardbee/mcp-tool-poisoning-scanner
context-exfiltration@guardbee/mcp-toxic-flow-auditor, @guardbee/mcp-prompt-leak-scanner
privilege-escalation@guardbee/mcp-oauth-auditor, @guardbee/mcp-server-auditor

Feedback

Questions, ideas, or a false positive? Start a thread in GitHub Discussions or open an issue. If GuardBee is useful to you, a ⭐ on the repository helps others find it.

来源:packages/threat-rules/README.md,提交 bc5997d

工具

7

evaluate_text

Evaluate free text against Agent Threat Rules (ATR) plus GuardBee KVKK/TR rules. Returns matches with follow-up scanner hints.

输入参数lanetypeformatcontent必填scanContext

evaluate_file

Read a local file and evaluate its contents against ATR + GuardBee rules

输入参数lanepath必填typeformat

evaluate_event

Evaluate a structured ATR AgentEvent JSON (type, content, fields, sessionId, …).

输入参数laneevent必填format

list_rules

List loaded ATR + GuardBee detection rules (optionally filter by category or source).

输入参数lanesourcecategory

rule_stats

Summarize loaded rule counts by category and source (ATR vs GuardBee)

输入参数lane

explain_bridge

Explain how Agent Threat Rules (ATR) complements GuardBee static MCP auditors

无需输入参数。

framework_map

Show how GuardBee's runtime findings map to OWASP Top 10 for LLM Applications (2025) and MITRE ATLAS — the mapping guardbee-proxy report uses

无需输入参数。

版本历史

9
  1. v0.5.1最新Oct 30, 2026
  2. v0.4.2Oct 22, 2026
  3. v0.3.7Oct 21, 2026
  4. v0.3.6Oct 20, 2026
  5. v0.3.4Oct 19, 2026
  6. v0.3.3Oct 16, 2026
  7. v0.3.2Oct 15, 2026
  8. v0.3.0Oct 14, 2026
  9. v0.2.1Oct 13, 2026

评分

已满足适用检查项的 90%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分
  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具必需15 分
  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分