WARNING: AUTHORIZED TARGETS ONLY
This tool is designed exclusively for security research on code you own, authorized bug-bounty programs, and controlled test environments. Do NOT use it against any system without explicit written permission. Unauthorized scanning, exploitation, or data exfiltration is illegal and strictly prohibited. The authors accept no liability for misuse.
LLM Agent-based Vulnerability Detection & Automated PoC/Triage Platform (Research/Defense)
ZeroMint automates the vulnerability research workflow:
- Code Indexing - Parse & build call/data-flow graphs (tree-sitter)
- Static Analysis - Narrow candidates via Semgrep / CodeQL
- Hypothesis Generation - LLM reasons about potential vulnerabilities
- Harness Generation - LLM creates non-destructive PoC test harnesses
- Sandbox Execution - Run in Docker (network=none, resource limits, ASan/UBSan)
- Self-Correction - Feed errors back to LLM for iterative repair
- Triage - Validate evidence, deduplicate, assign severity
- Reporting - Generate CVE-draft-ready REPORT.md + evidence bundle
# Install
pip install -e ".[dev]"
# Create config from template
zeromint init
# Check tool availability
zeromint doctor
# Index a repo and find hotspots
zeromint recon -c config.yaml
# Run full analysis pipeline
zeromint run -c config.yamlIndex a local repository, catalogue files by language, and score security-relevant hotspot candidates.
zeromint recon -c config.yaml
zeromint recon -c config.yaml --run-id recon-001 --verboseOutputs (runs/<run_id>/artifacts/):
repo_index.json- file catalogue with language guess, size, countshotspots.json- top-50 candidates scored by keyword signals
Hotspot scoring considers:
- Filename signals:
auth,jwt,token,session,crypto,deserialize,eval,exec,shell,sql,upload, ... - Code content keywords:
eval(),exec(),subprocess,pickle,os.system,strcpy,innerHTML, SQL keywords, ...
Parse source files with tree-sitter, extract function/class code units, and build a call graph.
zeromint graph -c config.yaml
zeromint graph -c config.yaml --run-id graph-001 --verboseOutputs (runs/<run_id>/artifacts/):
code_units.json- extracted functions/classes with signatures, text, locationcall_graph.json- nodes + directed edges (caller -> callee symbol)
Supported languages: Python, JavaScript/TypeScript.
Run static analysis using Semgrep and/or CodeQL.
zeromint static -c config.yaml
zeromint static -c config.yaml --run-id static-001 --verboseOutputs (runs/<run_id>/artifacts/):
semgrep_raw.json/semgrep_candidates.json- raw + normalized Semgrep findingscodeql_raw.json/codeql_candidates.json- raw SARIF + normalized CodeQL findings
Normalisation rules:
Finding.status = "candidate"(never auto-confirmed)Finding.id= stable SHA-256 hash offile + rule + line- Severity mapping: ERROR -> HIGH, WARNING -> MEDIUM, INFO -> LOW
- Confidence is conservative (0.2-0.7 depending on tool severity)
Generate vulnerability hypotheses from hotspots + static analysis results.
zeromint hypothesize -c config.yaml
zeromint hypothesize -c config.yaml --verbose| Mode | Config | Description |
|---|---|---|
| Offline | llm.enabled: false |
Keyword + hotspot scoring -> hypothesis (conservative) |
| LLM | llm.enabled: true |
Retriever gathers code context -> LLM produces JSON hypothesis |
Outputs: hypotheses.json - Finding[] with hypothesis field populated
Generate verification tests and harnesses from hypotheses.
zeromint generate-tests -c config.yaml
zeromint generate-tests -c config.yaml --dry-run- pytest test files with boundary/encoding/length/null/unicode inputs
- libFuzzer harness template for C/C++ targets
- Self-correction loop (up to 3 retries)
- No network calls - local execution only
Run generated tests in a sandbox and produce validation results.
zeromint execute -c config.yaml
zeromint execute -c config.yaml --dry-runSandbox safety: --network=none, CPU/mem limits, hard timeout, read-only mount, --cap-drop=ALL
Outputs: validation_results.json - per-finding outcome (success/failure/crash/timeout)
Assess findings conservatively.
zeromint triage -c config.yaml
zeromint triage -c config.yaml --dry-runDecision rules (very conservative):
confirmed- ONLY with dynamic crash evidence (sanitizer, signal, exit < 0)potential- security hypothesis is plausible but no dynamic prooffalse_positive- environment error, unknown vuln_type, or all tests pass cleanlycandidate- insufficient data (no validation ran)
Outputs: triage.json + findings.json
Generate the final REPORT.md and evidence bundle.
zeromint report -c config.yaml
zeromint report -c config.yaml --dry-runREPORT.md sections:
- Executive Summary (finding counts, severity distribution)
- Findings Table (sorted by status/severity)
- Finding Details (evidence, hypothesis, reproduction, mitigation)
- CVE Draft Templates (confirmed + potential only)
- Responsible Disclosure guidance
Evidence bundle (evidence_bundle.zip): REPORT.md + all JSON artifacts + logs + harnesses
Run the full 8-stage pipeline end-to-end.
zeromint run -c config.yamlrecon -> graph -> static -> hypothesize -> generate -> execute -> triage -> report
Pipeline features:
- Checkpointing: if an artifact exists, the stage is skipped
- continue_on_fail: errors in one stage don't abort the pipeline
- Budget management: token/cost limits enforced before LLM stages
- State persistence:
pipeline_state.jsonrecords per-stage status/error
See zeromint --help for all commands including init and doctor.
cve_agent/
cli.py # Typer CLI
config.py # YAML + .env config loading
pipeline.py # State-machine pipeline (8 stages, checkpointing)
run_context.py # Run ID, directory setup, logging
logging.py # Structured dual logging (console + file)
agents/
hypothesis_agent.py # Hypothesis generation (offline + LLM)
llm_clients/
base.py # Abstract LLM client interface
dummy.py # Deterministic placeholder LLM
analyzers/
repo_indexer.py # File indexing + hotspot scoring
semgrep_scanner.py # Semgrep integration
codeql_runner.py # CodeQL integration
normalize_findings.py # Raw -> Finding normalisation
execution.py # Validation runner + sanitizer logic
fuzz/
test_generator.py # pytest test generation
harness_generator.py # libFuzzer harness generation
self_correction.py # Run -> parse -> fix loop (max 3 iterations)
graph/
code_parser.py # tree-sitter AST parsing
code_units.py # CodeUnit / CallGraph schemas
call_graph.py # Graph builder
retriever.py # Keyword + TF-IDF code retrieval
reporting/
report_md.py # REPORT.md generator
bundler.py # evidence_bundle.zip creator
sandbox/
docker_runner.py # Docker container execution
triage/
triage_agent.py # Conservative triage assessment
schemas/
config.py # RunConfig pydantic schema
findings.py # CodeLocation, EvidenceItem, Hypothesis, Finding
run.py # RunResult
utils/
fs.py # Filesystem helpers
hashing.py # Hashing utilities
Edit config.yaml (generated via zeromint init):
target:
type: repo
path_or_url: ./my-project
languages_hint: [python]
ignore_patterns: []
features:
enable_graph: true
enable_semgrep: false
enable_codeql: false
enable_fuzz: true
enable_sanitizers: false
sandbox:
enabled: true
network_off: true
cpu: 1.0
mem_mb: 512
timeout_sec: 60
llm:
enabled: false
provider: null
model: null
budget:
max_tokens: null
max_cost_usd: null
retriever:
top_k: 10
max_snippet_len: 500
continue_on_fail: falsepytest
pytest --cov=cve_agentMIT - Research and authorized security testing only.