四家AI安全Agent对比:Claude Codex Mantis
AI Security Agents Compared: Claude, Codex, Mantis, Cloudflare
深度横向评测了四大厂最新AI安全Agent,提炼出通用的“发现-证伪”设计范式,对构建或选型安全Agent极具参考价值。
Anthropic, OpenAI, Cloudflare and Google now each ship an AI agent that hunts security bugs in source code. We checked the repos, docs and technical details behind each one.
Anthropic、OpenAI、Cloudflare 和 Google 现在各自推出了一款在源代码中搜寻安全漏洞的 AI 智能体。我们检查了每个工具背后的仓库、文档和技术细节。
The key finding: all 4 tools converge on one design. One agent finds a bug, a separate agent tries to disprove it, and only survivors get a patch. The differences are in where they run, who can use them and how much proof they demand.
关键发现:这 4 款工具在设计上趋于一致。一个智能体负责发现漏洞,另一个独立智能体尝试证伪该发现,只有幸存下来的结果才会生成补丁。差异在于它们的运行位置、使用者以及所需的验证程度。
Key Takeaways
关键要点
- 4 labs, 1 pattern: find, independently disprove, then patch.
- Claude Security runs inside Claude Code; no extra API key needed.
- Codex Security’s CLI is Apache-2.0, but scanning still needs OpenAI access.
- Cloudflare’s skill is MIT, model-agnostic and the most-starred at 47.5K.
- Google’s Mantis reproduces bugs in a sandbox; Google says isolate it.
- 4 个实验室,1 种模式:发现、独立证伪,然后打补丁。
- Claude Security 运行在 Claude Code 内部;无需额外的 API 密钥。
- Codex Security 的 CLI 采用 Apache-2.0 许可证,但扫描功能仍需 OpenAI 访问权限。
- Cloudflare 的技能包采用 MIT 许可证,支持任意模型,且星标数最高,达 47.5K。
- Google 的 Mantis 在沙箱中复现漏洞;Google 建议将其隔离使用。
Why 4 labs shipped the same thing in 2026
为何 4 家实验室在 2026 年推出了相同的产品
The problem every one of them is solving is noise. Google’s security team writes that sloppy AI code scanning produces hallucinated bugs and true-positive rates under 7%. A scanner that is wrong 93% of the time costs reviewers more than it saves.
它们共同解决的问题是噪音。Google 的安全团队指出,粗制滥造的 AI 代码扫描会产生幻觉漏洞,且真正阳性率低于 7%。一个误报率高达 93% 的扫描器给审查者带来的成本远高于其节省的成本。
The shared fix is separation of duties. The agent that reports a finding never gets to confirm it. Cloudflare states the rule directly in its README: the verifier is never the agent that found the bug. Anthropic, OpenAI and Google each describe a similar validation step before anything reaches a report.
共同的解决方案是职责分离。报告发现的智能体永远无法确认该发现。Cloudflare 在其 README 中直接规定了这一规则:验证者绝不能是发现漏洞的智能体。Anthropic、OpenAI 和 Google 均在任何内容上报之前描述了类似的验证步骤。
The second driver is offense. Anthropic team states that it built its scanner partly because attackers were already using AI models to find exploitable flaws, per The Hacker News. Google opens its Mantis post by noting that models can now discover and exploit bugs with little human help.
第二个驱动因素是进攻性。Anthropic 团队表示,他们构建扫描器部分是因为攻击者已经在使用 AI 模型来寻找可利用的缺陷,据《The Hacker News》报道。Google 在 Mantis 博客文章的开头指出,模型现在可以在极少人工帮助的情况下发现和利用漏洞。
1. Claude Security by Anthropic
1. Anthropic 的 Claude Security
What it is: A multi-agent vulnerability scanner that runs inside a Claude Code session. It is the local version of Anthropic’s hosted Claude Security product, per the plugin README.
它是什么:一种多智能体漏洞扫描器,运行在 Claude Code 会话内部。根据插件 README,它是 Anthropic 托管版 Claude Security 产品的本地版本。
How it works: Agents map the architecture, build a threat model, hunt across every component and verify each finding independently. The plugin offers 3 jobs from one menu: scan the codebase, scan changes, or suggest patches, per Claude Code docs.
工作原理:智能体映射架构、构建威胁模型、遍历所有组件并独立验证每个发现。根据 Claude Code 文档,该插件从菜单提供 3 项任务:扫描整个代码库、扫描变更或建议补丁。
Output: A Markdown report along with a SARIF 2.1.0 file for GitHub code scanning. Each finding carries severity, a CWE category, impact and reproduction steps. Patches are drafted in a scratch copy and land as F<n>.patch files. The plugin never commits, pushes or opens a pull request on its own.
输出:一份 Markdown 报告和一份用于 GitHub 代码扫描的 SARIF 2.1.0 文件。每个发现都包含严重性等级、CWE 类别、影响范围和复现步骤。补丁在临时副本中起草,并以 F<n>.patch 文件形式落地。该插件不会自行提交、推送或打开拉取请求。
Cost and access: It makes no model calls of its own, so there is no separate API key. Scans count against your Claude plan’s usage limits.
成本与访问权限:它不自行发起模型调用,因此没有单独的 API 密钥。扫描次数会计入您的 Claude 计划的使用限额。
/plugin install claude-security@claude-plugins-official
/claude-securityTimeline: Anthropic opened a limited preview called Claude Code Security in February 2026. The hosted product reached public beta for Enterprise customers on Claude Opus 4.7. The Claude Code plugin entered beta on July 22, 2026, per Cybersecurity News. In August, the hosted scanner moved to Claude Mythos 5, per Dataconomy.
时间线:Anthropic 于 2026 年 2 月推出了名为 Claude Code Security 的有限预览版。托管产品于 Claude Opus 4.7 面向企业客户进入公开测试阶段。据 Cybersecurity News 报道,Claude Code 插件于 2026 年 7 月 22 日进入测试阶段。据 Dataconomy 报道,8 月份托管扫描器迁移至 Claude Mythos 5。
Where it fits: Anthropic positions it as one layer. The security-guidance plugin checks code as Claude writes it, and /security-review does a single pass on a branch. Claude Security is the on-demand deep scan.
定位:Anthropic 将其定位为其中一层。安全指导插件在 Claude 编写代码时进行检查,/security-review 对分支进行一次扫描。Claude Security 则是按需进行的深度扫描。
2. Codex Security by OpenAI
2. OpenAI 的 Codex Security
What it is: A CLI and TypeScript SDK, published as @openai/codex-security, for finding, validating and fixing vulnerabilities.
是什么:一个 CLI 和 TypeScript SDK,发布为 @openai/codex-security,用于发现、验证和修复漏洞。
How it works: It scans a whole repo, selected paths, or a Git diff. A –mode deep flag runs parallel discovery workers. It validates candidate findings, generates patches and can verify existing fixes. A cs policy command drafts a SECURITY.md that tells future scans what counts as a vulnerability in your project.
工作原理:它扫描整个仓库、选定路径或 Git diff。使用 –mode deep 标志运行并行发现工作进程。它验证候选发现结果,生成补丁,并可以验证现有修复措施。cs policy 命令会起草一份 SECURITY.md 文件,告知未来的扫描哪些内容算作项目中的漏洞。
Output: Threat models, SARIF, JSON or CSV exports, plus publishing to Linear. It can import GitHub code-scanning alerts and suggest owners from Git history. A GitHub Action runs scheduled or pull-request scans; findings are report-only by default.
输出:威胁模型、SARIF、JSON 或 CSV 导出,以及发布到 Linear。它可以导入 GitHub 代码扫描警报,并从 Git 历史记录中建议所有者。GitHub Action 运行定时或拉取请求扫描;默认情况下,发现结果仅用于报告。
npm install --global @openai/codex-security
cs login
cs scanCost and access: The client is Apache-2.0, but the scanner behind it is not. DevOps.com notes the CLI and SDK stay in limited beta for approved customers. The README lists OpenAI, Amazon Bedrock, OpenRouter and Fireworks AI as providers. Requires Node.js 22.13+ and Python 3.10+.
成本与访问权限:客户端采用 Apache-2.0 许可证,但其背后的扫描器并非如此。DevOps.com 指出,CLI 和 SDK 仍针对获批客户处于有限测试阶段。README 列出了 OpenAI、Amazon Bedrock、OpenRouter 和 Fireworks AI 作为提供商。需要 Node.js 22.13+ 和 Python 3.10+。
3. Security Audit Skill by Cloudflare
3. Cloudflare 的安全审计技能
What it is: An MIT-licensed skill that turns any capable coding agent into a security auditor.
是什么:一项 MIT 许可的技能,可将任何具备能力的编码代理转变为安全审计员。
How it works: A 6-phase audit:
工作原理:分为 6 个阶段的审计:
- Reconnaissance: map architecture, trust boundaries and input surfaces into architecture.md and a coverage ledger.
- Coverage-led hunting: isolated hunters each take ledger units; coverage critics look for gaps.
- Candidate validation: a fresh verifier tries to disprove every unique candidate.
- Structured output: confirmed, needs_validation and rejected records go to findings.json, checked against a schema.
- Independent record verification: new agents re-verify every final source claim.
- Target-neutral reporting: REPORT.md and detail files are derived from the verified records.
- 侦察:将架构、信任边界和输入表面映射到 architecture.md 和覆盖范围账本中。
- 基于覆盖范围的狩猎:隔离的猎人各自领取账本单位;覆盖范围审查者寻找差距。
- 候选验证:新的验证器尝试反驳每一个唯一的候选项。
- 结构化输出:已确认、需验证和已拒绝的记录写入 findings.json,并与模式进行核对。
- 独立记录验证:新代理重新验证每一个最终来源声明。
- 目标中立报告:REPORT.md 和详细文件由经过验证的记录衍生而来。
Requirements: A coding agent that supports tool use and parallel sub-agents, plus Node.js for the validators. It also wants an OS-enforced sandbox with no external network. Without one, leads stay needs_validation instead of being executed.
要求:一个支持工具使用和并行子代理的编码代理,以及用于验证器的 Node.js。它还需要一个由操作系统强制执行的沙箱,且无外部网络访问权限。如果没有这样的沙箱,审查结果将保持在 needs_validation(待验证)状态,而不会被执行。
npx skills add https://github.com/cloudflare/security-audit-skill –skill security-audit
Then ask the agent: “security audit this codebase.” Output defaults to ~/security-audit-skill/<repo-name>/run-<N>, outside your repo.
然后向代理发出指令:“security audit this codebase.”(对此代码库进行安全审计)。输出默认位于 ~/security-audit-skill/<repo-name>/run-<N>,即你的代码库之外。
The data behind it: Cloudflare published the skill on June 18, 2026, with its post Build your own vulnerability harness. The roughly 450-line skill seeded an internal harness that now scans 128 repos. Cloudflare reports these lifetime numbers:
其背后的数据:Cloudflare 于 2026 年 6 月 18 日发布了该技能,并附带了一篇题为 Build your own vulnerability harness(构建你自己的漏洞测试平台)的文章。这个大约 450 行的技能为一个内部测试平台提供了种子,该平台现在扫描 128 个代码库。Cloudflare 报告了这些累计数据:
- 20,799 raw candidates from discovery, about 12,057 of which survived validation.
- 13,841 findings in the shared triage pool across 145 repos, including another harness’s output.
- 5,442 folded away as duplicates and 1,154 routed out as wrong-repo or low-risk.
- 7,245 actionable findings sent to engineering teams.
- 发现阶段共产生 20,799 个原始候选项,其中约 12,057 个通过了验证。
- 在 145 个代码库的共享分类池中发现了 13,841 个问题,其中包括另一个测试平台的输出结果。
- 5,442 个被折叠为重复项,1,154 个因属于错误代码库或风险较低而被排除。
- 7,245 个可操作的问题已发送给工程团队。
Better recon context cut the first-pass rejection rate from 40% to 11%. Cloudflare also uses one model for discovery and a different model for triage, so models check each other.
更好的侦察上下文将首轮拒绝率从 40% 降低至 11%。Cloudflare 还使用一个模型进行发现,使用另一个不同的模型进行分类,从而实现模型间的相互校验。
4. Mantis by Google
What it is: An Apache-2.0 set of security-review skills plus an ADK reference harness for AI coding agents. Google team states that it is part of how it finds and fixes bugs internally.
它是什么:一套基于 Apache-2.0 许可证的安全审查技能,以及一个面向 AI 编码代理的 ADK 参考测试平台。Google 团队表示,这是他们内部发现和修复 bug 的方式之一。
How it works: Mantis reads the repo’s history to learn from past security fixes. It builds a hierarchical summary tree, condensing files into directory and root summaries. Google team states that this cut token overhead by over 85%. It then generates a threat model and hypotheses, hunts, deduplicates and critiques findings.
工作原理:Mantis 读取代码库的历史记录以从过去的修复中学习。它构建分层摘要树,将文件压缩为目录和根目录摘要。Google 团队指出,这使令牌开销减少了 85% 以上。随后,它会生成威胁模型和假设,进行搜索、去重并对发现的问题进行批判性评估。
What sets it apart: Reproduction and patch verification. Mantis tries to reproduce each bug, from a static exploit sketch up to a unit test or mock server. It patches with an adversarial loop that attacks the fix. It also calibrates severity against a rubric to stop “thousands of criticals.” A mantis-advise skill then feeds what it learned back into code generation.
独特之处:复现与补丁验证。Mantis 尝试复现每个 bug,从静态利用脚本草图到单元测试或模拟服务器。它通过对抗循环对补丁发起攻击以检验其有效性。它还根据评分标准校准严重程度,以避免出现“成千上万个严重问题”。随后,mantis-advise 技能会将所学内容反馈回代码生成过程。
Setup: Clone the repo and point any coding agent at it, or run the ADK harness directly. The harness supports a –focus prompt such as “look for IDOR” and a –max-tokens spend ceiling.
设置:克隆代码库并将任何编码代理指向它,或直接运行 ADK 测试平台。测试平台支持如 “look for IDOR”(查找 IDOR 漏洞)之类的 –focus 提示,以及 –max-tokens 令牌消耗上限。
git clone https://github.com/google/mantis.git
cd mantis/reference && ./install.sh
./run.sh path/to/codeSide-by-side
并列对比
更进一步:量化金融体系
看懂新闻只是起点——沿量化金融路径,把它变成能交付的工程能力