Google开源Mantis:让编码Agent自主发现与修复漏洞的模块化工具包
Google Open-Sources Mantis: A Modular Skills Toolkit That Lets Coding Agents Find, Reproduce and Patch Vulnerabilities
Agent安全领域的硬核实操工具,提供从发现到修复的完整闭环工作流,值得做Agent开发的同学参考其模块化设计思路。
Google has open-sourced Mantis, a stack-agnostic toolkit of security review skills that lets an AI coding agent run the whole vulnerability lifecycle. It finds a suspected flaw, strips the false positives, reproduces the bug inside a sandbox, writes a minimal patch, re-attacks that patch, and scores the residual risk.
Google 已开源 Mantis,这是一个与堆栈无关的安全审查技能工具包,允许 AI 编码代理运行整个漏洞生命周期。它能发现疑似缺陷、剔除误报、在沙箱中复现 bug、编写最小化补丁、对补丁进行再攻击,并评估剩余风险。
Mantis is not a scanner you aim at a repository and walk away from. It is a set of slash commands your existing coding agent loads, plus a strict set of rules about where that agent is allowed to execute code.
Mantis 不是那种你指向一个仓库然后就可以走人的扫描器。它是一组斜杠命令,供你现有的编码代理加载,以及一套严格的规则,规定该代理可以在何处执行代码。
Is it deployable? Yes for local and internal evaluation, not yet for production. You can clone it today and run it with Gemini CLI, Antigravity CLI, the Google ADK, or any comparable agent framework.
可以部署吗?对于本地和内部评估来说可以,但尚未用于生产环境。你今天就可以克隆它,并使用 Gemini CLI、Antigravity CLI、Google ADK 或任何类似的代理框架来运行它。
The pipeline
流水线
Mantis publishes each stage as a separate skill directory, invoked as a slash command and chained sequentially. A supervisor skill, /mantis-meta-agent, can drive the whole loop in a long-lived session.
Mantis 将每个阶段发布为单独的技能目录,作为斜杠命令调用并按顺序链接。一个主管技能 /mantis-meta-agent 可以在长期会话中驱动整个循环。
The early stages learn the target: /mantis-history mines version control history for past security fixes, /mantis-summarize writes the directory maps, /mantis-architecture builds a Markdown knowledge base, /mantis-threat-model derives trust boundaries, and /mantis-plan produces a targeted roadmap.
早期阶段学习目标:/mantis-history 挖掘版本控制历史以查找过去的修复方案,/mantis-summarize 编写目录映射,/mantis-architecture 构建 Markdown 知识库,/mantis-threat-model 推导信任边界,/mantis-plan 生成有针对性的路线图。
The middle stages find and filter: /mantis-researcher sweeps files against the plan, then /mantis-dedupe, /mantis-review and /mantis-critic collapse duplicates, apply negative rules, and drop issues that cannot occur in a release build.
中期阶段查找和过滤:/mantis-researcher 根据计划扫描文件,然后 /mantis-dedupe、/mantis-review 和 /mantis-critic 合并重复项、应用负面规则,并丢弃在发布版中不可能出现的问题。
The late stages prove and fix: /mantis-reproduce executes payloads in gVisor or a VM with networking disabled, /mantis-chain assembles multi-step exploit chains from individually confirmed findings, /mantis-patch applies and verifies the fix, /mantis-calibrate assigns a risk score from 1 to 10, /mantis-reflect writes learnings back for the next pass, and /mantis-report produces the human-readable review packet.
后期阶段验证和修复:/mantis-reproduce 在禁用网络的 gVisor 或虚拟机中执行有效载荷,/mantis-chain 从单独确认的发现中组装多步利用链,/mantis-patch 应用并验证修复方案,/mantis-calibrate 分配 1 到 10 的风险评分,/mantis-reflect 将学习结果写回以供下一轮使用,/mantis-report 生成人类可读的审查数据包。
A newer skill, /mantis-advise, inverts the flow. It queries the accumulated threat model, past bug lineages and verified patch patterns before you write code, so the same class of bug does not land twice.
一个较新的技能 /mantis-advise 反转了流程。它在编写代码之前查询累积的威胁模型、过去的 bug 谱系和已验证的补丁模式,从而确保同一类 bug 不会再次出现。
But why?
但为什么呢?
Most agentic security tooling stops at generating findings. Mantis is interesting because it treats the reproducer and the re-attack as the trust boundary, and because it publishes the inter-stage contracts so teams can wrap the skills in a deterministic harness instead of trusting an LLM to orchestrate shell commands.
大多数代理式安全工具仅在生成发现时停止。Mantis 之所以有趣,是因为它将复现器和再攻击视为信任边界,并且发布了阶段间的契约,以便团队可以将技能包装在确定性框架中,而不是依赖 LLM 来编排 shell 命令。
Key Takeaways
关键要点
- Mantis is a modular skills toolkit for coding agents, not a standalone scanner or a supported Google product.
- Its differentiator is grounding: sandboxed reproduction and patch re-attack, not model confidence.
- A hierarchical summary tree cuts token overhead by over 85 percent, per Google.
- Google cites sub-7 percent true-positive rates for naive AI code scanning as the problem Mantis targets.
- Deployable locally under Apache 2.0 but not recommended yet for production.
- Mantis 是一个面向编码代理的模块化技能工具包,而非独立的扫描器或受支持的 Google 产品。
- 其差异化优势在于基于事实:沙盒化复现与补丁重攻击,而非模型置信度。
- 据 Google 称,分层摘要树可将令牌开销降低超过 85%。
- Google 引用了原始 AI 代码扫描中低于 7% 的真阳性率作为 Mantis 旨在解决的问题。
- 可在本地依据 Apache 2.0 许可证部署,但尚不推荐用于生产环境。
Check out the google/mantis on GitHub, Agent Reference Guide, Cloud CISO Perspectives, and Getting started with Mantis. Also, feel free to follow us on Twitter and don’t forget to join our 150k+ML SubReddit and Subscribe to our Newsletter. Wait! are you on telegram? now you can join us on telegram as well.
查看 GitHub 上的 google/mantis、Agent 参考指南、Cloud CISO 观点以及 Mantis 入门指南。此外,欢迎在 Twitter 上关注我们,别忘了加入我们拥有 15 万+成员的 ML SubReddit 并订阅我们的新闻通讯。等等!你在 Telegram 上吗?现在你也可以在 Telegram 上加入我们。
Need to partner with us for promoting your GitHub Repo OR Hugging Face Page OR Product Release OR Webinar etc.? Connect with us
需要与我们合作推广你的 GitHub 仓库、Hugging Face 页面、产品发布或网络研讨会等?请与我们联系
The post Google Open-Sources Mantis: A Modular Skills Toolkit That Lets Coding Agents Find, Reproduce and Patch Vulnerabilities appeared first on MarkTechPost.
文章“Google 开源 Mantis:一个让编码代理发现、复现和修补漏洞的模块化技能工具包”首发于 MarkTechPost。
更进一步:量化金融体系
看懂新闻只是起点——沿量化金融路径,把它变成能交付的工程能力