Google's Mantis: an open AI toolkit that finds and fixes security bugs
ShiniFrontiers · Source: Google
What problem does it solve?
Does your team build software? Google's Mantis is a free toolkit that uses AI to find the security holes in your code and draft the fixes — but it's a lab tool, not a product: run it in a sandbox and have an expert check every result.
What it is: Mantis is a free, public toolkit from Google — a set of agent skills plus a reference harness built on Google's Agent Development Kit (ADK, a framework for building AI agents). You point it at a codebase and it runs AI agents that build a threat model, hunt for vulnerabilities across every file, try to reproduce each one, rank them by severity, and propose patches it then checks by attacking its own fix.
Who it's for: Teams that write and maintain software and want AI help finding and fixing security flaws before attackers do, and the security leaders weighing whether AI vulnerability-finding is ready to lean on.
The catch: Google labels Mantis "demonstration purposes only" — not supported, not for production — and requires a human expert to verify every finding, because the models hallucinate. It must run in an isolated sandbox. (Google's strongest security-tuned model, Gemini 3.8 Flash Cyber, is gated to vetted defenders through its Fairwind Program; Mantis itself runs on a model you can access, such as the general Gemini 3.8 Flash.)
An AI harness that reviews your code for security flaws — for teams that build and maintain software
Problem: Finding security flaws in a large codebase is slow and expensive: a few experts read code by hand and still miss things, while pattern-based scanners flag thousands of issues, most of them noise. A software vulnerability — a flaw an attacker can exploit — can hide in logic no rule-based scanner models.
What it does: You point Mantis at a copy of your code and it runs a chain of AI agents — programs that use a language model to plan and act. They build a threat model (a map of what could go wrong), hunt across every file, try to reproduce each suspected flaw, rank them so the real criticals surface instead of thousands, and propose a patch they then attack to check it holds. You supply the AI model that drives them. Think of it as a tireless review team that drafts findings and fixes for your experts to check — never one that ships them on its own.
Note: It finds and drafts; it does not decide. Google is explicit that a security expert must verify every finding, and that it must run in an isolated sandbox.
a sealed space for running untrusted code
A sandbox is an isolated environment where code runs without reaching the rest of a system. It is used to test programs, run outsiders' code or evaluate AI agents safely. Its safety depends on every allowed exit being secure. A sandbox that can be escaped, or that runs anyone's code publicly, becomes a launchpad for attacks.
THINK OF IT ASA sandpit with walls: play freely inside, but nothing should get out.
Read the lesson →packaged instructions an AI coding assistant can follow
An agent skill is a written, step-by-step procedure — often with scripts — that an AI coding assistant can load and carry out, such as setting up a development environment or converting old code to a new interface. Publishing skills in an open format means assistants from different providers can use the same instructions. The quality of the result still depends on the assistant and on review by an engineer.
THINK OF IT ASA recipe card left in the kitchen for a capable temp cook: they can follow it, but the head chef still tastes the dish.
Read the lesson →An AI model that can take actions to finish a task, not just answer a question.
A chat assistant answers and stops. An AI agent is given a goal and works towards it in steps. It decides what to do next, uses software tools, checks the result and carries on. It stops when the task is done or it needs help. The model is the brain; the agent is the brain plus hands.
THINK OF IT ASLike the difference between asking a colleague for advice and asking them to sort the problem out for you.
Read the lesson →a map of what could go wrong and what to protect
A threat model lays out what a system is worth protecting, who might attack it, and how — so effort goes to the real risks rather than everything at once. Building one is usually expert work done up front; here, the AI drafts one automatically from the code so its search for flaws is guided rather than blind.
THINK OF IT ASA building's security plan: which doors matter, who might try them, and where to put the cameras.
Read the lesson →small specialist parts inside a large AI model
Some large AI models are built as many small specialists, called experts. For each word, only a few of them are used. Because most experts sit idle at any moment, they do not all need the fastest memory, which lets such a model be split across a graphics card, ordinary memory and the processor.
THINK OF IT ASA hospital with hundreds of specialists: each patient sees only two or three of them, so not every doctor needs to be on the ward.
Read the lesson →a flaw in code an attacker can exploit
A software vulnerability is a mistake in a program — a missing check, a bad assumption, a logic gap — that lets an attacker do something they should not: read data, run commands, or take over a system. Finding them before attackers do is the core of defensive security work, and the harder ones hide in logic rather than in obvious bad patterns.
THINK OF IT ASAn unlocked back window on a building: harmless-looking until someone who is looking for a way in finds it.
Read the lesson →A program that has learned patterns from examples, so it can make predictions on new input.
An AI model is software that learned a skill from many examples instead of being given step-by-step rules. Shown millions of emails marked spam or not spam, it learns the patterns that separate them. Afterwards it can judge a new email it has never seen. The model itself is a large file of numbers that captures those learned patterns.
THINK OF IT ASLike an apprentice who has watched thousands of repairs. Nobody wrote them a rulebook, but they can now look at a new fault and make a good guess.
Read the lesson →See the difference
| The situation | Today (a typical team) | With Mantis |
|---|---|---|
| A large codebase to audit for security flaws | A few experts review by hand, slowly, and miss things | AI agents review every file and build a threat model, surfacing candidate findings |
| A possible vulnerability is flagged | It sits in a queue; sorting real from false eats expert time | Mantis tries to reproduce it (even spinning up a mock server) and critiques itself to cut false alarms — a human still confirms each |
| A flood of "critical" alerts | Alert fatigue; the real risks hide among thousands | Findings are calibrated against a rubric so the few true criticals surface, not thousands |
| A confirmed vulnerability needs fixing | An engineer writes and tests the patch | Mantis proposes a patch and attacks its own fix to check it closes the hole, for a human to review |
From the Mantis README. Mantis is demonstration-grade; a security expert must verify every finding before it is trusted, patched or reported.
- What it saves
A whole-codebase AI review that reproduces bugs to cut false alarms, calibrates severity so the real criticals surface, and proposes fixes it adversarially checks — coverage a small expert team cannot match by hand.
- What it costs
Free and public, but demonstration-grade: it must run in an isolated sandbox, every finding needs expert review, and you supply the AI model that drives it (for example the general Gemini 3.8 Flash, $0.75 / $3.75 per million input/output tokens, introductory to 31 Dec 2026).
- How ready
- Proven in the lab
Open and runnable now, but Google calls it demonstration-only, not for production; it needs an isolated sandbox and a human to verify every finding.
Join free to unlock: how it works, a step-by-step setup with its costs, what you gain, and where it falls short, for every Friday idea.
Join free to read it all →