mantis README

The project's README from github.com/google/mantis. As one markdown file: README.md.

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) Tell the planner what to hunt for, in plain language (standard pipeline)
./run.sh path/to/code --focus "look for IDOR"

# 5. (Optional) Remove spend limits for long unattended runs
./run.sh path/to/code --no-budget --parallel 32

# 6. (Optional) Research Graph Synthesis: designs a new agent-graph topology for your 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:

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.

mantis (google/mantis)

Searching Database…

2.5K ·GitHub
这是什么?Mantis 是一套技能工具箱外加一个参考智能体框架(基于 Google 的 ADK 构建),让 AI 编程智能体能够自主发现、复现、分诊并修补代码库中的漏洞。
这是现成的安全扫描器,还是需要我自己改造的东西?它明确只是一个起点,而非成品:一组技能和一个基于 ADK 的参考框架,供你适配、调整并扩展到自己的技术栈,任何称职的编程智能体都能把它移植到其他框架。
怎么让它跑起来?安装 python3-venv(例如“sudo apt install python3-venv”),然后运行仓库的安装脚本;Mantis 提供 mantis-configure 和 mantis-launch 工具,可在此之后自动完成设置和启动。
运行安装程序前需要先装好什么?除了 Python 3 的 venv 模块外,该项目还依赖一个基于 ADK 的参考框架;venv 可用之后,其余设置由 mantis-configure 处理。
直接把它指向我的代码库安全吗?不安全——README 警告它会执行自主生成的代码,这些代码可能不稳定或做出意料之外的事,并坚持要求只在隔离受限的环境中运行,绝不能在能访问生产环境、敏感数据或内部网络的机器上运行。
安装过程是否假定特定的操作系统?快速上手命令使用 apt(“sudo apt install python3-venv”),这意味着它面向 Debian/Ubuntu 风格的 Linux 环境;文档中没有 macOS 或 Windows 的安装步骤。
这是我可以依赖其官方支持的 Google 产品吗?不是——尽管它来自 google 组织并采用 Apache-2.0 许可,但它明确不是 Google 官方支持的产品,不符合 Google 开源漏洞奖励计划的资格,仅用于演示目的。
我可以不加自查就相信它报告的漏洞吗?不能。README 指出 AI 模型可能凭空捏造发现或生成错误的补丁,因此每条发现都必须由安全专家人工核实,并且要求不要把未经核实的 AI 生成报告批量提交给维护者。
它能直接投入生产安全流水线使用吗?不能,该项目明确仅用于演示目的,不打算在生产环境中使用。
这条流水线对一个代码库具体按什么步骤处理?它会审查提交历史并构建语义索引,生成威胁模型和研究假设,运行智能体进行调查,对发现去重和分诊,复现漏洞利用(甚至包括启动模拟服务器),串联漏洞以放大影响,通过对抗性的修复-验证循环修补 bug,并校准严重程度,让人类只需要看到最关键的问题。
Mantis 能用在典型 Web/应用代码之外的领域吗,比如硬件或基础设施?可以——README 称这些技能可以适配到 Hardware/RTL、Infrastructure as Code、ML 流水线或编译后的固件等专门领域,不过威胁模型需要你自己调整。
Creator
google
Size
3.5 MB
Stars
2.5K
Updated
CommitOct 16
Age
4mo
Commits · 90 Days