Google Open-Sources Mantis: A Modular Skills Toolkit That Lets Coding Agents Find, Reproduce and Patch Vulnerabilities
Google open-sourced Mantis, a modular, stack-agnostic security review toolkit that enables AI coding agents to execute the full vulnerability lifecycle from detection to patch verification Mantis operates as a chain of slash-command skills rather than a standalone scanner, integrating with frameworks like Gemini CLI, Antigravity CLI, and Google ADK Its key differentiator is sandboxed reproduction and patch re-attack as the trust boundary, addressing the sub-7% true-positive rate of naive AI code
Analysis
TL;DR
- Google open-sourced Mantis, a modular, stack-agnostic security review toolkit that enables AI coding agents to execute the full vulnerability lifecycle from detection to patch verification
- Mantis operates as a chain of slash-command skills rather than a standalone scanner, integrating with frameworks like Gemini CLI, Antigravity CLI, and Google ADK
- Its key differentiator is sandboxed reproduction and patch re-attack as the trust boundary, addressing the sub-7% true-positive rate of naive AI code scanning
- A hierarchical summary tree reduces token overhead by over 85%, and a newer /mantis-advise skill enables proactive prevention by querying threat models before code is written
- Currently deployable for local and internal evaluation under Apache 2.0, but not yet recommended for production use
Why It Matters
Mantis represents a significant shift in agentic security tooling by moving beyond passive vulnerability scanning to active, sandboxed proof-and-fix workflows that dramatically improve signal quality. For AI practitioners building coding agents, it provides a modular, interoperable framework that can be integrated into existing development pipelines without requiring a proprietary scanner. The emphasis on deterministic inter-stage contracts over LLM-driven orchestration offers a pragmatic path toward trustworthy automated security review.
Technical Details
- Mantis is structured as a sequence of modular skill directories invoked as slash commands, orchestrated either sequentially or by a supervisor skill (/mantis-meta-agent) in long-lived sessions
- The pipeline is divided into three phases: early stages (/mantis-history, /mantis-summarize, /mantis-architecture, /mantis-threat-model, /mantis-plan) learn the codebase and produce a targeted roadmap; middle stages (/mantis-researcher, /mantis-dedupe, /mantis-review, /mantis-critic) sweep files, collapse duplicates, and filter false positives; late stages (/mantis-reproduce, /mantis-chain, /mantis-patch, /mantis-calibrate, /mantis-reflect, /mantis-report) execute payloads in gVisor or VMs with disabled networking, assemble exploit chains, verify patches, and score residual risk from 1 to 10
- /mantis-advise inverts the traditional flow by querying accumulated threat models, past bug lineages, and verified patch patterns proactively before code is written, preventing recurrence of known vulnerability classes
- The toolkit enforces strict execution rules about where the coding agent is allowed to run code, and publishes inter-stage contracts to enable deterministic harness wrapping instead of relying on LLMs to orchestrate shell commands
- Compatible with Gemini CLI, Antigravity CLI, Google ADK, and comparable agent frameworks; released under Apache 2.0
Industry Insight
- The sub-7% true-positive rate cited for naive AI code scanning highlights a critical industry pain point; Mantis's sandboxed reproduction and re-attack methodology offers a blueprint for turning noisy AI-generated findings into actionable, verified security intelligence
- The modular slash-command architecture and published inter-stage contracts enable organizations to adopt incremental security automation without vendor lock-in, making it easier to integrate agentic security workflows into existing CI/CD pipelines
- The proactive /mantis-advise skill signals a broader industry shift from reactive vulnerability scanning to preventive security guidance embedded directly in the coding agent workflow, which could become a standard expectation for AI-assisted development tools
Disclaimer: The above content is generated by AI and is for reference only.