Google has released details on 'Mantis,' an open-source framework that automates vulnerability discovery, reproduction, and remediation, showing that it reduces token overhead by over 85% even in massive repositories.



On September 2, 2026, Google published an article explaining the mechanisms and usage of 'Mantis,' an open-source framework that uses AI to discover software vulnerabilities and handle everything from narrowing down candidates to reproducing and fixing them.

Getting started with the Mantis harness to find and fix bugs | Google Cloud Blog

https://cloud.google.com/blog/products/identity-security/getting-started-with-the-mantis-harness-to-find-and-fix-bugs?hl=en



AI models are not only improving their ability to write programs, but also their ability to find vulnerabilities in source code and determine if they can actually be exploited. According to Google, AI models have demonstrated the ability to discover and exploit vulnerabilities with little to no human assistance. Mantis was developed as an initiative to enable the use of AI on the defense side, where vulnerabilities are searched.

However, simply having AI read source code and list potential problems can lead to 'hallucination,' where vulnerabilities that don't actually exist are reported. Google points out that inaccurate AI code scans, the 'true positive rate,' which indicates the percentage of detected vulnerabilities that were actually present, can be less than 7%. If a large number of candidates are output and humans have to check each one individually, it adds an extra burden to security personnel.

Mantis employs a mechanism to reduce false positives by using multiple AI agents to verify potential vulnerabilities after they are discovered. After searching for potential vulnerabilities, review agents and agents that critically verify the candidates confirm the conditions under which the problem occurs, and then the vulnerability is reproduced in an isolated sandbox environment. If the problem is actually confirmed, the process moves on to creating corrective code.

Furthermore, before starting its analysis, Mantis examines the repository's change history, gathering information from previously fixed vulnerabilities and security issues. In addition, it analyzes the source code to organize the software's structure and automatically constructs documents such as a 'threat model' that summarizes potential attack locations and targets to be protected. Even in projects where the developers have not prepared detailed design documents or threat models, Mantis can assemble the background information necessary to search for vulnerabilities.



When using AI models to perform security analysis on large-scale software, the number of input tokens increases and the processing burden becomes greater if the AI model tries to read a large amount of source code at once.

Mantis employs a method to create a hierarchical security summary by aggregating information from each file at the directory level and then building upon that to create a summary of the entire repository. The AI can grasp the overall picture from the summary and then examine the detailed code only where necessary. According to Google, this reduced token overhead by more than 85% while maintaining important structural information.

Mantis can be used with Gemini CLI, Antigravity CLI, and other tools. You can start the analysis by specifying the location of Mantis obtained from GitHub and the code to be investigated to the AI coding agent. There is also 'mantis-advise' which utilizes previously found vulnerabilities and fixes to provide advice during development.

On the other hand, Google states that AI-generated vulnerability reports and patch code are not always accurate and urges security experts to manually verify them. They also recommend that AI-generated code be executed in an environment isolated from production systems and internal networks.

Furthermore, Google strongly recommends two things to maximize the benefits of AI-based vulnerability detection: providing AI with appropriate information, such as the knowledge possessed by developers, and establishing a secure sandbox environment with clearly defined criteria for identifying vulnerabilities.

in AI,   Security, Posted by log1d_ts