Common issues and solutions for the Baco SAST scanner.
| Symptom | Cause | Fix |
|---|---|---|
No API key configured - skipping ... |
Missing API key | Add api_key inside each [llm.phases.<slot>] (discovery, verification, aggregation, static_analysis) or set per-slot env vars (LLM_DISCOVERY_KEY, LLM_VERIFICATION_KEY, LLM_AGGREGATION_KEY, etc.) |
| Phases show "No API key configured - skipping" | LLM API key not set | Set per-phase API keys via [llm.phases.discovery.api_key] or env vars (LLM_DISCOVERY_KEY, LLM_VERIFICATION_KEY, etc.) |
| Duplicate LLM API calls during scan | Cache disabled by default | Set enable_llm_cache = true in [llm] section of config.toml |
| Symptom | Cause | Fix |
|---|---|---|
| Scan takes unusually long | Large codebase, no caching | Enable enable_llm_cache = true to avoid duplicate API calls |
| Symptom | Cause | Fix |
|---|---|---|
| Scan fails mid-way, can't resume | No checkpoint created | Re-run the scan from scratch. To enable checkpointing for future runs, ensure the output directory is writable. |
| checkpoint.json not found | Output directory cleared | Re-run full scan; checkpoint is written to output dir |
| Symptom | Cause | Fix |
|---|
| Symptom | Cause | Fix |
|---|---|---|
| Config parse errors at startup | Malformed TOML | Validate config.toml syntax; check for missing brackets or quotes |
| Config parse errors at startup | Unknown configuration key | Remove the unknown key from the TOML file, or check for typos against docs/configuration.md |
Scan failed: {error}
When this appears: At the end of a failed scan run.
Why: An unrecoverable error occurred (network failure, invalid input, resource exhaustion).
Solution: Resume from checkpoint:
baco resume --checkpoint <output-dir>/checkpoint.jsonThe checkpoint.json file contains the scan state and is written to the output directory after each completed phase.
Resume with: baco resume --checkpoint <path>
When this appears: When you press Ctrl+C during a scan.
Why: The scanner gracefully shuts down and writes the current state to checkpoint.json.
Solution: Use the displayed command to resume from where you left off.
-
Enable caching: Set
enable_llm_cache = trueto avoid redundant API calls for identical code patterns. -
Parallelize: For large codebases, split into smaller modules and scan separately.
-
Narrow the scope: exclude vendored and generated trees in
[scanner] exclude_paths. Note that incremental skipping is not implemented — every run re-reads every file. -
Disable unused phases: Keep
enable_confidence_refinement = falseto reduce LLM calls.
- Check config.toml for syntax errors
- Ensure per-phase LLM API keys are set (
[llm.phases.discovery.api_key]or env vars likeLLM_DISCOVERY_KEY) - Review checkpoint.json for scan state
- Clear output directory for fresh start — this removes checkpoints, incremental scan hashes, and the prior-runs store. Findings are regenerated from scratch.
- Report issues at GitHub Issues
Resume interrupted scan:
baco resume --checkpoint <path-to-checkpoint.json>Force full rescan:
rm -rf <output-dir>/
baco scan --config <config.toml>Enable LLM caching:
[llm]
enable_llm_cache = trueSet API key:
export LLM_DISCOVERY_KEY=your_api_key_here
export LLM_VERIFICATION_KEY=your_api_key_here
export LLM_AGGREGATION_KEY=your_api_key_hereCheck the tools the scan actually uses:
baco doctor --config config.toml