Find real vulnerabilities. Suppress false positives. Ship fixes with evidence.
BACO is a SAST scanner that combines semgrep pattern matching, LLM-powered verification, and cross-file analysis to surface vulnerabilities that matter — and filter out the noise that buries them. It runs 23 analysis phases (4 parallel, 19 sequential), checkpoints after each, and produces machine-readable and human-readable reports.
Grounded in 19 research integrations from the Awesome-LLMs-for-Vulnerability-Detection survey.
- Rust 1.85+ (
rustup) - An LLM API key — Mistral, OpenAI, or any OpenAI-compatible endpoint. Anthropic keys are not supported; only OpenAI-compatible APIs work.
- Semgrep on PATH (
pip install semgrepor see install options)
# 1. Build from source
git clone https://github.com/CodeAtCode/baco-scanner.git
cd baco-scanner
cargo build --release
# 2. Install semgrep
pip install semgrep
# 3. Set your LLM API key
export LLM_DISCOVERY_KEY="your-key-here" # or LLM_API_KEY for generic fallback
# 4. Initialize config and run pre-flight checks
./target/release/baco init /path/to/project
./target/release/baco doctor
# 5. Scan
./target/release/baco scan --config /path/to/project/baco.toml
# 6. Read the results
# baco-output/findings.json — machine-readable (all fields)
# baco-output/report.html — interactive browser reportCost note: Each scan makes multiple LLM API calls per finding. Run
baco scan --dry-runfirst to estimate token usage and cost.
See CLI Reference for all subcommands:
baco report, baco verify, baco resume, baco preset.
BACO runs a phased pipeline that progressively refines findings:
- Find — semgrep + taint rules + AST anchoring across 10 languages
- Verify — LLM verification with a skeptical self-refutation gate
- Connect — cross-file analysis + ticket cross-referencing
- Score — confidence calibration with citation verification
- Report — JSON, HTML, SARIF, Markdown outputs
Optional phases add CWE-aware MoE routing, rule synthesis, exploit synthesis, threat modeling, auto-patching, and PoC compilation. See Architecture for the full phase graph and Configuration for enabling flags.
C/C++, Rust, Python, JavaScript, TypeScript, PHP, Go, Java, C#, Ruby — all with static analysis (tree-sitter + semgrep) and LLM verification. See Supported Languages for the full matrix.
findings.json— complete vulnerability data (machine-readable)report.html— interactive report with severity filtering and code highlightingreport.sarif— SARIF 2.1 for CI/CD integration (GitHub Code Scanning, Azure DevOps)findings.md— Markdown summary of findings
- Citation verification: deterministic file existence + line range checks in the Reporting phase; failures halve confidence and add a note
- Prior-findings skip lists (
[prior_runs]): confirmed/FP findings from prior scans injected into discovery prompts to reduce redundancy - Rejected-findings persistence (
include_rejected = true): persists "rejected" array in JSON and "Investigated & Dismissed" appendix in HTML - Org-context calibration (
[org_context]): organizational policy profile injected into prompts to reduce false positives - Eval oracles: known-answer harness under
eval/with precision/recall/F1 scoring viabaco eval
BACO integrates 19 research techniques from the Awesome-LLMs-for-Vulnerability-Detection survey. Integrations span agentic workflows, context enhancement, rule synthesis, MoE routing, and confidence calibration.
See Research Integration for per-paper details and Paper Survey for the full 36-paper survey.
- Architecture — PhaseGraph pipeline, all phases, data flow
- Configuration — all config options, LLM setup, phase flags
- CLI Reference — all subcommands and options
- Supported Languages — language coverage matrix
- Research Integration — 19 integrated papers with techniques and results
- Paper Survey — full 36-paper survey
- Operator Tuning — performance flags and scenario-based tuning
- Output Interpretation — reading findings, confidence, triage verdicts
- Troubleshooting — common errors and fixes
- CI Integration — continuous integration setup
- README.md (this page) — overview, quick start
- docs/configuration.md — set up your config
- docs/architecture.md — understand the pipeline
- docs/output-interpretation.md — read your results
- docs/operator-tuning.md — tune for your scenario
Sponsored and tested with Regolo.AI — LLM API services.
