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), позволяющий ИИ-агентам для кодинга автономно находить, воспроизводить, триажить и патчить уязвимости в кодовой базе.
Это готовый сканер безопасности или то, что мне нужно адаптировать?Это явно отправная точка, а не готовый продукт: набор скиллов и референсный харнесс на базе ADK, предназначенные для адаптации, настройки и расширения под свой стек, и любой компетентный агент для кодинга может портировать его на другой фреймворк.
Как его запустить?Установите python3-venv (например, 'sudo apt install python3-venv'), затем запустите установочный скрипт репозитория; после этого Mantis предоставляет инструменты mantis-configure и mantis-launch для автоматизации настройки и запуска.
Что нужно установить перед запуском установщика?Помимо модуля venv из Python 3, проект опирается на референсный харнесс на базе ADK; mantis-configure делает остальную настройку, как только доступен venv.
Безопасно ли просто направить это на мою кодовую базу?Нет — README предупреждает, что он исполняет автономно сгенерированный код, который может быть нестабильным или делать неожиданные вещи, и настаивает на запуске только в изолированных, ограниченных средах, никогда на машинах с доступом к production, чувствительными данными или внутренними сетями.
Предполагает ли настройка конкретную ОС?Команда быстрого старта использует apt ('sudo apt install python3-venv'), что подразумевает Linux-окружение в стиле Debian/Ubuntu; шаги настройки для macOS или Windows не задокументированы.
Это официальный продукт Google, на поддержку которого можно рассчитывать?Нет — несмотря на то что он из организации google и лицензирован под Apache-2.0, это явно не официально поддерживаемый продукт Google, он не участвует в программе Google OSS Vulnerability Rewards и предназначен только для демонстрации.
Можно ли доверять его находкам уязвимостей без самостоятельной проверки?Нет. В README сказано, что ИИ-модели могут галлюцинировать находки или генерировать неверные патчи, поэтому каждую находку должен вручную проверять эксперт по безопасности, и вас просят не заваливать мейнтейнеров массой непроверенных ИИ-отчётов.
Это готово к встраиванию в production-конвейер безопасности?Нет, проект явно предназначен только для демонстрации и не рассчитан на использование в production-окружении.
Что конвейер на самом деле делает с кодовой базой, шаг за шагом?Он изучает историю коммитов и строит семантический индекс, генерирует модель угроз и исследовательские гипотезы, запускает агентов для их проверки, дедуплицирует и триажит находки, воспроизводит эксплойты (вплоть до поднятия мок-серверов), выстраивает цепочки уязвимостей для большего эффекта, патчит баги через adversarial-цикл «исправь и проверь» и калибрует критичность, чтобы люди видели только самые важные проблемы.
Можно ли использовать Mantis вне типичного кода веб и приложений, например для железа или инфраструктуры?Да — в README сказано, что скиллы можно адаптировать к специализированным областям, таким как Hardware/RTL, Infrastructure as Code, ML-конвейеры или компилируемая прошивка, хотя модели угроз предполагается настраивать самостоятельно.
Creator
google
Size
4 MB
Stars
2.5K
Updated
CommitOct 17
Age
4mo
Commits · 90 Days