mantis is a free, open source version control & collaboration project written in Python and released under Apache-2.0. It has 1,574 GitHub stars, 154 forks and 1 open issues, and was last pushed 5 days ago. On this registry it ranks #22 of 30 tracked projects in Version Control & Collaboration, with 5 head-to-head comparisons available. It gained 31 stars over the last 3 tracked days.

What is mantis?

What it is

Mantis is a modular, stack-agnostic toolkit of security review skills for AI coding agents, and it includes an ADK reference harness for building secure software. It lives in the developer-tools, AI coding-agent, and application-security ecosystem, with topics such as code review, DevSecOps, multi-agent systems, and hardware security. The project helps agents autonomously find, reproduce, and patch vulnerabilities while giving humans a structured way to review results.

The concrete problem it addresses is the gap between AI-assisted code generation and reliable security review. A codebase may contain old vulnerabilities that should not return, complex code paths that need semantic indexing, and findings that an AI model can hallucinate or overstate. Mantis gives the agent a workflow for threat modeling, hypothesis research, deduplication, triage, reproduction, chaining, patching, and calibration.

Key capabilities

  • Mantis reviews codebase history to identify historical vulnerabilities that should not be repeated.
  • It builds a semantic index or summaries, generates a threat model, and creates research hypotheses for individual agents.
  • It executes plans, deduplicates findings, triages or critiques results to combat hallucination, and statically verifies production viability.
  • It reproduces vulnerabilities from a static exploit guess to a unit test or mock server, looks across known vulnerabilities for impactful chains, and patches them with an adversarial verification loop.
  • It calibrates findings against an established rubric to reduce severity inflation, reflects on each iteration, and uses /mantis-advise to apply learnings to future development.

Who uses it and how

  • Users run vulnerability review campaigns against a file or directory with ./run.sh path/to/code.
  • Reviewers can add a focused objective, such as auditing for Server-Side Request Forgery and SSRF in webhook handlers, through research graph synthesis.
  • Teams can adapt the ADK reference harness, including reference/workflow.json, to build agentic deep-dive security review workflows for their own software or hardware stack.

Getting started

The README says to install python3-venv with apt, run reference/install.sh, authenticate Google Cloud Application Default Credentials if using Vertex AI, configure with scripts/configure.py --auto, validate with scripts/configure.py --test --probe, and launch ./run.sh path/to/code.

When to use it — and when not to

Use Mantis when a team can operate it in an isolated, restricted environment and has security experts to verify every finding before reporting. It is less suitable for fully autonomous vulnerability disclosure or machines with production access, because the AI models are non-deterministic and can hallucinate findings or generate incorrect patches. A self-hoster must provide a Python virtual environment and, when using Vertex AI, Google Cloud Application Default Credentials.

project readme (upstream, from github) — read inline

Mantis: Portable Toolkit for Building Secure Software

[!CAUTION] USE AT YOUR OWN RISK. BE EXTREMELY CAREFUL. This suite is designed to generate and execute autonomously generated code that may be unstable or perform unexpected actions. USE THIS ONLY IN ISOLATED, RESTRICTED ENVIRONMENTS. Never run this suite on a machine with access to production systems, sensitive data, or internal networks.

[!IMPORTANT] RESPONSIBLE USE AI models are non-deterministic and can hallucinate findings or generate incorrect patches. All findings must be manually verified by a security expert before being reported. Do not mass-file unverified, AI-generated reports to open-source maintainers. A failure to automatically reproduce a vulnerability does not definitively mean it is a false positive, nor does a successful reproducer guarantee the bug is exploitable in all contexts. Use Mantis responsibly.

Mantis is a set of skills along with an ADK reference harness for building secure software in the new AI era of software development.

Getting Started

First, install python3-venv such as with sudo apt install python3-venv, then run the install script. Mantis comes with automated configuration and launcher tools (mantis-configure and mantis-launch):

cd reference && ./install.sh

# 0. Authenticate Google Cloud Application Default Credentials (ADC) if using Vertex AI
gcloud auth application-default login

# 1. Fast Configuration & Capability Auto-Detection (or --interactive wizard)
python3 scripts/configure.py --auto

# 2. Fast Preflight Validation (~1s) & Live Reachability Probe
python3 scripts/configure.py --test --probe

# 3. Launch Vulnerability Review Campaign (file or repository)
./run.sh path/to/code            # a file or a directory

# 4. (Optional) Run Research Graph Synthesis for a Specific Objective
./run.sh path/to/code --objective "Audit for Server-Side Request Forgery and SSRF in webhook handlers"

Overview of Mantis

Mantis is roughly designed to:

  • Review history of a codebase to look for historical vulnerabilities we do not wish to repeat
  • Build a semantic index (and/or summaries) of the codebase for efficient code navigation
  • Automatically generate a threat model
  • Build up a set of hypotheses for individual agents to research (or simply "scan every file")
  • Execute on those research plans
  • Deduplicate existing findings
  • Triage/critique findings to combat hallucination and statically verify production viability
  • Reproduce the vulnerability to varying degrees, depending on available environments, anywhere from a static guess at what an exploit might look up up to a unit test or even spinning up a mock server to attempt to exploit
  • Look across known vulnerabilities to attempt to build more impactful chains
  • Patch discovered vulnerabilities, using an adversarial loop to verify the vulnerability is really fixed
  • Calibrate all findings based on an established rubric to combat LLM inflation of severity (surfacing the most critical risks to humans instead of spewing thousands of "criticals")
  • Reflect on each iteration of the loop to look for things we've learned in the now completed round of research
  • Based on all of the collected learnings, threat model, and knowledge base, use the /mantis-advise skill to develop code more securely and ensure that during development you do not repeat prior mistakes or trigger edge cases in code that were previously protected by some guard that was removed

Additionally, the ADK reference harness shows some of the neat ways in which we can build agentic workflows. Specifically, reference/workflow.json shows how a deep review is done, and research graph synthesis (./run.sh target --objective "...") allows generating custom graph topologies on the fly. This is a very powerful construct because you can use this to build any kind of agentic deep dive security review you might imagine.

Mantis is intended to be a starting point rather than a rigid set of instructions. You should adapt, tune, and extend this harness to fit your organization's specific software or hardware stack. We provide an ADK-based reference harness which works out of the box, but any competent coding agent should be able to convert this to use your framework of choice.

The Mantis skills can be adapted to specialized domains (such as Hardware/RTL, Infrastructure as Code, ML pipelines, or compiled firmware).

We strongly recommend using AI to iterate on these skills and using your internal documentation, coding standards, and build systems to augment the threat models you use for scanning. We also strongly recommend adapting risk calibration to your environment and risk tolerance.

Above all, while orchestrated vulnerability discovery is incredibly powerful and useful, it is even more important to use this in a suitably isolated environment to prevent impacting production systems. The ADK reference harness provides some example sandboxes for testing, but if you use the most advanced frontier models you should go beyond this and additionally set up an additional sandboxing layer that itself contains very strong monitoring to look for escape attempts.

Disclaimers

This is not an officially supported Google product. This project is not eligible for the Google Open Source Software Vulnerability Rewards Program.

This project is intended for demonstration purposes only. It is not intended for use in a production environment.

Frequently asked questions

Is mantis free to use?

mantis is open source under the Apache-2.0 licence. There is no licence fee and no seat count — you can self-host it or, where the project offers one, pay a vendor for a managed version instead.

What does mantis do?

A modular, stack-agnostic toolkit of security review skills for AI coding agents to autonomously find, reproduce, and patch vulnerabilities.

What is mantis written in?

mantis is primarily written in Python. Its source is publicly available at https://github.com/google/mantis, and it has 1,574 GitHub stars.