bawbel/ave

GitHub: bawbel/ave

AVE 是一个开放标准,用于识别和评估 AI 代理组件中的安全漏洞,帮助开发者和安全团队快速发现并修复潜在风险。

Stars: 1 | Forks: 0

# AVE:代理式漏洞枚举 **面向代理式AI组件的开放漏洞数据库。** 每条记录涵盖影响MCP服务器、技能文件、系统提示和代理插件的不同攻击类别。所有记录均使用OWASP AIVSS v0.8进行评分。 [![记录](https://img.shields.io/badge/records-48-critical?style=flat-square&color=e53e3e)](records/) [![模式](https://img.shields.io/badge/schema-v0.2.0-blue?style=flat-square)](SPEC.md) [![AIVSS](https://img.shields.io/badge/AIVSS-v0.8-orange?style=flat-square)](https://aivss.owasp.org) [![许可证](https://img.shields.io/badge/license-Apache%202.0-green?style=flat-square)](LICENSE) [![扫描器](https://img.shields.io/badge/scanner-bawbel--scanner-black?style=flat-square)](https://github.com/bawbel/scanner)
## 什么是AVE? 技能文件、MCP服务器清单和系统提示是可执行的指令,而非文档。任何加载它们的进程都会运行它们。 没有编译器,没有类型检查器,没有沙箱。运行时是一个读取自然语言并据此行事的LLM。 AVE为这个攻击面提供了稳定的ID、可复现的评分、检测规则和修复步骤。与CVE和CWE理念相同,应用于代理。 ``` Your CI pipeline scans Python for CVEs. It does not scan your SKILL.md for prompt injection. AVE + Bawbel fixes that. ``` ## 工作原理 ``` Attacker crafts Developer ships Agent loads malicious payload → skill file → skill file (unscanned) at runtime ↓ Agent executes attacker payload (data exfiltrated, credentials stolen, goals hijacked) ``` **使用AVE + Bawbel扫描器:** ``` Developer commits bawbel scan fires Finding blocked skill file → in pre-commit hook → before deploy ↓ AVE-2026-00001 detected: External instruction fetch AIVSS 8.0 / HIGH Line 7: "fetch your instructions from..." ``` 扫描器通过五种检测引擎检查每个技能文件是否符合全部48条AVE记录:模式匹配、YARA、Semgrep、文件类型验证以及可选的LLM元分析。 ## 统计数据 | 指标 | 数值 | |---|---| | 记录总数 | 48 | | 模式版本 | 0.2.0 | | AIVSS规范 | v0.8 | | 严重(AIVSS ≥ 9.0) | 1 | | 高危(AIVSS 7.0-8.9) | 6 | | 中危(AIVSS 4.0-6.9) | 39 | | 低危(AIVSS < 4.0) | 2 | ## AIVSS 评分 每条AVE记录均使用[OWASP AIVSS v0.8](https://aivss.owasp.org)进行评分。 ``` AIVSS = ((CVSS_Base + AARS) / 2) × ThM × Mitigation_Factor ``` **AARS**(代理风险评分)是10个代理风险放大因子(AARFs)的加权总和,每个因子评分为0.0 / 0.5 / 1.0: | # | 因子 | 重要性 | |---|---|---| | 1 | **自主性** | 代理无需人工批准即可行动 | | 2 | **工具使用** | 代理可访问外部工具/API | | 3 | **多代理** | 代理与其他代理交互或生成其他代理 | | 4 | **非确定性** | 行为跨运行不可预测 | | 5 | **自我修改** | 可以更改自身指令或记忆 | | 6 | **动态身份** | 在运行时承担角色或身份 | | 7 | **持久内存** | 跨会话保留状态 | | 8 | **自然语言输入** | 通过自然语言进行指令输入 | | 9 | **数据访问** | 读取敏感数据(文件、环境变量、数据库) | | 10 | **外部依赖** | 加载外部代码、技能或插件 | **严重性等级:** | 等级 | AIVSS范围 | 含义 | |---|---|---| | 严重 | 9.0 - 10.0 | 可被立即利用,导致代理完全失陷 | | 高危 | 7.0 - 8.9 | 造成重大数据丢失或权限提升 | | 中危 | 4.0 - 6.9 | 存在有意义的风险,需要审查 | | 低危 | 0.1 - 3.9 | 影响有限或需要链式利用 | ## 记录索引 | AVE ID | 标题 | AIVSS | 严重性 | |---|---|---|---| | [AVE-2026-00001](records/AVE-2026-00001.json) | 通过外部配置获取的变形载荷 | 8.0 | 高危 | | [AVE-2026-00002](records/AVE-2026-00002.json) | 通过描述操纵进行工具投毒 | 7.3 | 高危 | | [AVE-2026-00003](records/AVE-2026-00003.json) | 通过凭据窃取进行数据渗漏 | 6.8 | 中危 | | [AVE-2026-00004](records/AVE-2026-00004.json) | 通过Shell管道注入执行任意代码 | 5.9 | 中危 | | [AVE-2026-00005](records/AVE-2026-00005.json) | 破坏性命令执行 | 5.6 | 中危 | | [AVE-2026-00006](records/AVE-2026-00006.json) | 通过钱包访问窃取加密货币 | 7.5 | 高危 | | [AVE-2026-00007](records/AVE-2026-00007.json) | 通过提示注入进行目标劫持 | 6.1 | 中危 | | [AVE-2026-00008](records/AVE-2026-00008.json) | 通过自我复制实现持久化 | 6.3 | 中危 | | [AVE-2026-00009](records/AVE-2026-00009.json) | 通过移除安全约束进行越狱 | 5.5 | 中危 | | [AVE-2026-00010](records/AVE-2026-00010.json) | 隐藏指令隐匿 | 5.6 | 中危 | | [AVE-2026-00011](records/AVE-2026-00011.json) | 带有攻击者参数的动态工具调用 | 5.7 | 中危 | | [AVE-2026-00012](records/AVE-2026-00012.json) | 通过权限授予进行权限提升 | 4.5 | 中危 | | [AVE-2026-00013](records/AVE-2026-00013.json) | PII渗漏模式 | 6.5 | 中危 | | [AVE-2026-00014](records/AVE-2026-00014.json) | 通过信任升级进行社会工程 | 3.7 | 低危 | | [AVE-2026-00015](records/AVE-2026-00015.json) | 系统提示泄露 | 4.9 | 中危 | | [AVE-2026-00016](records/AVE-2026-00016.json) | 通过RAG检索进行间接提示注入 | 6.4 | 中危 | | [AVE-2026-00017](records/AVE-2026-00017.json) | MCP服务器仿冒 | 5.7 | 中危 | | [AVE-2026-00018](records/AVE-2026-00018.json) | 工具结果操纵 | 4.4 | 中危 | | [AVE-2026-00019](records/AVE-2026-00019.json) | 代理内存投毒 | 5.6 | 中危 | | [AVE-2026-00020](records/AVE-2026-00020.json) | 通过A2A协议进行跨代理注入 | 5.9 | 中危 | | [AVE-2026-00021](records/AVE-2026-00021.json) | 人在回路绕过 | 4.5 | 中危 | | [AVE-2026-00022](records/AVE-2026-00022.json) | 通过未声明的资源访问进行范围蔓延 | 6.0 | 中危 | | [AVE-2026-00023](records/AVE-2026-00023.json) | 上下文窗口操纵 | 5.8 | 中危 | | [AVE-2026-00024](records/AVE-2026-00024.json) | 供应链:伪装成技能的二进制内容 | 6.8 | 中危 | | [AVE-2026-00025](records/AVE-2026-00025.json) | 对话历史注入 | 4.5 | 中危 | | [AVE-2026-00026](records/AVE-2026-00026.json) | 通过编码进行工具输出渗漏 | 6.8 | 中危 | | [AVE-2026-00027](records/AVE-2026-00027.json) | 多轮次持久化攻击 | 5.6 | 中危 | | [AVE-2026-00028](records/AVE-2026-00028.json) | 文件内容注入 | 5.9 | 中危 | | [AVE-2026-00029](records/AVE-2026-00029.json) | 同形字和Unicode混淆 | 4.8 | 中危 | | [AVE-2026-00030](records/AVE-2026-00030.json) | 虚假角色声称 | 4.3 | 中危 | | [AVE-2026-00031](records/AVE-2026-00031.json) | 反馈循环投毒 | 5.4 | 中危 | | [AVE-2026-00032](records/AVE-2026-00032.json) | 内部网络侦察 | 4.0 | 中危 | | [AVE-2026-00033](records/AVE-2026-00033.json) | 技能上下文中的不安全反序列化 | 4.2 | 中危 | | [AVE-2026-00034](records/AVE-2026-00034.json) | 运行时动态技能导入 | 6.6 | 中危 | | [AVE-2026-00035](records/AVE-2026-00035.json) | 传感器与环境操纵 | 4.2 | 中危 | | [AVE-2026-00036](records/AVE-2026-00036.json) | 通过代理跳板进行横向移动 | 5.9 | 中危 | | [AVE-2026-00037](records/AVE-2026-00037.json) | 视觉与多模态注入 | 5.1 | 中危 | | [AVE-2026-00038](records/AVE-2026-00038.json) | 无界工具使用 | 5.9 | 中危 | | [AVE-2026-00039](records/AVE-2026-00039.json) | 通过隐写通道进行隐蔽渗漏 | 4.9 | 中危 | | [AVE-2026-00040](records/AVE-2026-00040.json) | 不安全的输出处理 | 5.4 | 中危 | | [AVE-2026-00041](records/AVE-2026-00041.json) | MCP服务器-卡片注入 | 8.2 | 高危 | | [AVE-2026-00042](records/AVE-2026-00042.json) | REPL代码模式凭据暴露 | 4.7 | 中危 | | [AVE-2026-00043](records/AVE-2026-00043.json) | MCP应用UI注入 | 4.7 | 中危 | | [AVE-2026-00044](records/AVE-2026-00044.json) | 异步任务结果投毒 | 6.1 | 中危 | | [AVE-2026-00045](records/AVE-2026-00045.json) | 跨应用访问权限提升 | 6.4 | 中危 | | [AVE-2026-00046](records/AVE-2026-00046.json) | MCP工具钩子劫持 | 9.1 | **严重** | | [AVE-2026-00047](records/AVE-2026-00047.json) | 代理组件中的硬编码凭据 | 7.8 | 高危 | | [AVE-2026-00048](records/AVE-2026-00048.json) | 不安全的代理委托链 | 8.2 | 高危 | ## 使用Bawbel扫描器进行检测 每条AVE记录在[bawbel/scanner](https://github.com/bawbel/scanner)中都有检测规则。 ``` pip install bawbel-scanner # 扫描 skill 文件 bawbel scan ./my-skill.md # 递归扫描目录 bawbel scan ./skills/ --recursive --fail-on-severity high # 完整 remediation 报告 bawbel report ./my-skill.md # 扫描 MCP 服务器卡片 bawbel ssc https://api.your-mcp-server.io ``` 输出: ``` CRITICAL bawbel-hook-hijack AVE-2026-00046 line 3 AIVSS 9.1 HIGH bawbel-unsafe-delegation AVE-2026-00048 line 11 AIVSS 8.2 HIGH bawbel-hardcoded-credential AVE-2026-00047 line 5 AIVSS 7.8 ``` ## 添加新的AVE记录 ### 何时添加记录 添加新记录需要满足三个条件:该攻击类别尚未被覆盖,有现实世界的证据(可用的PoC、已公开的漏洞利用或已观察到的事件),且该漏洞特定于代理组件(技能文件、MCP服务器、系统提示、插件),而非通用的Web或API问题。 ### 第一步:先提交Issue 在编写任何JSON之前,请先提交一个Issue。使用**新AVE记录**模板,并包括攻击类别、组件类型、一个现实世界的例子或PoC,以及你提出的AARF评分及每个因子的简要理由。 这能让维护者知情,并在你开始编写前获得下一个AVE ID。 ### 第二步:创建JSON记录 将 [`records/AVE-2026-00045.json`](records/AVE-2026-00045.json) 作为模板复制。填写所有字段。必填字段: ``` ave_id, schema_version, component_type, title, attack_class, description, aivss_score, owasp_mapping, behavioral_fingerprint, behavioral_vector, detection_methodology, indicators_of_compromise, remediation, aivss, status, published ``` AIVSS计算清单: ``` 1. Score each AARF factor: 0.0 (not applicable), 0.5 (partial), 1.0 (full) 2. AARS = sum of all 10 AARF scores 3. Pick CVSS_Base from the cvss_base_vector 4. AIVSS = ((CVSS_Base + AARS) / 2) × ThM × Mitigation_Factor 5. ThM = 0.75 default; raise to 0.90 for actively exploited, 1.0 for weaponised 6. Round to 1 decimal place 7. Set aivss_severity: CRITICAL ≥ 9.0, HIGH ≥ 7.0, MEDIUM ≥ 4.0, LOW < 4.0 ``` ### 第三步:向bawbel/scanner添加检测规则 每条AVE记录至少需要在扫描器中有一个模式规则。在[bawbel/scanner](https://github.com/bawbel/scanner)中提交一个协调的PR: ``` scanner/engines/pattern.py ← add entry to PATTERN_RULES scanner/rules/yara/ave_rules.yar ← add YARA rule scanner/rules/semgrep/ave_rules.yaml ← add Semgrep rule ``` 模式规则结构: ``` { "rule_id": "bawbel-your-rule-id", "ave_id": "AVE-2026-NNNNN", "title": "Short title under 80 chars", "description": "Full description for remediation report.", "severity": Severity.HIGH, "aivss_score": 7.5, "owasp": ["ASI01"], "owasp_mcp": ["MCP03"], "patterns": [ r"pattern one regex", r"pattern two regex", ], }, ``` 规则命名:使用kebab-case格式 `bawbel-`。不要使用缩写。 ### 第四步:更新此README 在记录索引表中添加一行,并更新顶部的统计数据部分。递增`记录总数`和相应严重性等级的计数器。 ### 第五步:提交PR PR标题格式:`feat: AVE-2026-NNNNN - ` PR描述必须包括: - 指向Issue的链接 - 带有理由的AARF评分 - 至少一个`behavioral_vector`示例 - 指向协调的扫描器PR的链接 ## JSON记录模式 (v0.2.0) ``` { "ave_id": "AVE-2026-00001", "schema_version": "0.2.0", "component_type": "skill | mcp | system_prompt | plugin", "title": "...", "attack_class": "...", "description": "...", "affected_platforms": [], "affected_registries": [], "aivss_score": 8.0, "cvss_base_vector": "CVSS:4.0/...", "owasp_mapping": ["ASI01"], "owasp_mcp": ["MCP01"], "nist_ai_rmf_mapping": [], "mitre_atlas_mapping": [], "behavioral_fingerprint": "...", "behavioral_vector": [], "mutation_count": 0, "detection_methodology": "...", "indicators_of_compromise": [], "remediation": "...", "aivss": { "cvss_base": 8.5, "aarf": { "autonomy": 1.0, "tool_use": 1.0, "multi_agent": 0.5, "non_determinism": 1.0, "self_modification": 1.0, "dynamic_identity": 0.0, "persistent_memory": 0.5, "natural_language_input": 1.0, "data_access": 0.5, "external_dependencies": 1.0 }, "aars": 7.5, "thm": 0.75, "mitigation_factor": 1.0, "aivss_score": 8.0, "aivss_severity": "HIGH", "spec_version": "0.8", "owasp_mcp_mapping": ["MCP01"], "notes": "..." }, "status": "active", "kill_switch_active": true, "researcher": "...", "researcher_url": "...", "published": "2026-05-16T00:00:00Z", "last_updated": "2026-05-16T00:00:00Z", "references": [] } ``` ## 相关资源 - [bawbel/scanner](https://github.com/bawbel/scanner):用于检测这些漏洞的CLI扫描器 - [OWASP AIVSS v0.8](https://aivss.owasp.org):评分公式 - [api.piranha.bawbel.io](https://api.piranha.bawbel.io):威胁情报API,每条AVE ID对应一条记录 - [bawbel.io/docs](https://bawbel.io/docs):文档 AVE记录基于[Apache 2.0](LICENSE)发布。 OWASP AIVSS v0.8:[aivss.owasp.org](https://aivss.owasp.org)
标签:AI代理安全, C2, CI/CD安全, CSP, Homebrew安装, Llama, MCP服务器, OWASP AIVSS, 人工智能安全, 代理AI, 代理插件, 代码安全, 代码安全, 修复步骤, 合规性, 安全标准, 开放标准, 扫描器, 技能文件, 提示注入, 攻击面, 检测规则, 漏洞枚举, 漏洞枚举, 系统提示, 网络安全, 网络资产发现, 逆向工具, 隐私保护, 集群管理