You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Threat-modeling phase disabled by default (`enable_threat_modeling = false`) — it generated a static STRIDE template rather than code-derived analysis
19.**Variant Search**: Search for related vulnerability variants
44
-
45
-
### Output (1 phase)
46
-
20.**Reporting**: Generate JSON, HTML, and SARIF outputs
14
+
**Core Pipeline (24 phases):**
15
+
16
+
Phase order is defined once in `PhaseGraph::new()` (src/scanner/pipeline/orchestrator.rs); this table mirrors it and must be updated when that changes.
**Checkpoint markers**: Checkpoints are saved after each major phase, enabling resume from any point in the pipeline.
98
95
99
-
**Orphaned phases**: The following modules exist but are NOT wired into the pipeline and do NOT run: CpgSlice, Hunt, Validate, IndependentVerify, ExploitSynth, RuleSynthesis.
|`enable_multi_verifier`|`true`| Additional LLM API calls |
55
87
|`enable_auto_patching`|`false`| Writes code files, runs git commands in a staging worktree |
@@ -64,14 +96,18 @@ See [`docs/architecture.md`](architecture.md) for the full 20-phase pipeline des
64
96
65
97
BACO supports single or multiple models per phase. When multiple models are configured, they are used in round-robin fashion to distribute load across different models/providers.
66
98
67
-
**Detailed error logging**: When LLM requests fail, BACO reports the HTTP status code, error type (timeout, connection, request, body, decode), and the actual URL for easier debugging.
99
+
**Default temperature:**`0.5` (controlled randomness for better security analysis)
100
+
101
+
**Default max_reasoning_tokens:**`2048` (caps reasoning phase before forcing final answer)
68
102
69
103
**Single model:**
70
104
```toml
71
105
[llm.phases.discovery]
72
106
base_url = "https://api.mistral.ai/v1"
73
107
api_key = "${MISTRAL_API_KEY}"# or set env var
74
108
model = "mistral-small"
109
+
temperature = 0.5
110
+
max_reasoning_tokens = 2048
75
111
```
76
112
77
113
**Multiple models:**
@@ -104,9 +140,10 @@ When enabled, the LLM Discovery phase reads source files directly before analyzi
104
140
105
141
```toml
106
142
[agent]
107
-
enabled = true
143
+
enabled = false
108
144
max_turns = 10# Max conversation turns with tools
109
145
tool_timeout_secs = 60# Timeout for tool execution
146
+
trusted_paths = ["."] # Paths allowed for tool operations
110
147
keep_artifacts = false# Keep generated test files
111
148
```
112
149
@@ -158,22 +195,41 @@ Code:
158
195
llm_discovery = """Given this finding, determine if it's a true vulnerability:
159
196
Title: %%FINDING_TITLE%%
160
197
Location: %%FILE_PATH%%:%%LINE_NUMBER%%
198
+
Current Description: %%CURRENT_DESCRIPTION%%
161
199
Description: %%VULNERABILITY_DESCRIPTION%%
162
200
"""
163
201
```
164
202
165
203
**Available template variables:**
166
204
-`%%PROJECT_PATH%%` - Target project path
205
+
-`%%PROJECT_NAME%%` - Project name
167
206
-`%%FILE_EXTENSIONS%%` - Detected file extensions
168
207
-`%%LANGUAGES%%` - Target languages
169
208
-`%%CODE_CONTENT%%` - Code snippet being analyzed
170
209
-`%%LANGUAGE%%` - Programming language of the file
171
210
-`%%FILE_PATH%%` - File path
172
-
-`%%LINE_RANGE%%` - Line numbers
211
+
-`%%LINE_NUMBER%%` - Specific line number
212
+
-`%%LINE_RANGE%%` - Line numbers range
213
+
-`%%CURRENT_DESCRIPTION%%` - Current vulnerability description (for iterative phases)
173
214
-`%%FINDING_TITLE%%` - Vulnerability title
174
215
-`%%VULNERABILITY_DESCRIPTION%%` - Description text
175
216
-`%%FINDINGS_COUNT%%` - Total findings count
176
217
-`%%SCAN_DATE%%` - Scan date
218
+
-`%%TOTAL_FINDINGS%%` - Total findings count (alias)
219
+
-`%%TOTAL_FILES%%` - Total files scanned
220
+
-`%%FILES_COUNT%%` - Files count (alias)
221
+
-`%%SOURCE_LIST%%` - List of source files
222
+
-`%%CONTEXT_LINES%%` - Context lines around finding
223
+
-`%%CWE_SPECS%%` - CWE specification details
224
+
-`%%EXCLUDE_PATHS%%` - Excluded paths
225
+
-`%%MAX_FILE_SIZE%%` - Maximum file size limit
226
+
-`%%PROJECT_TYPE%%` - Project type
227
+
-`%%SCAN_DURATION%%` - Scan duration
228
+
-`%%TICKET_SYSTEMS%%` - Configured ticket systems
229
+
-`%%TOOLS_USED%%` - Tools used in analysis
230
+
-`%%VULNERABILITY_LIST%%` - List of vulnerabilities
231
+
-`%%VULNERABILITY_TITLE%%` - Vulnerability title
232
+
-`%%FINDINGS_LIST%%` - Full findings list
177
233
178
234
Prompts are validated (max 10,000 characters, no null bytes) before use.
-**findings.json**: Complete vulnerability data with all 16 fields
192
-
-**report.html**: Visual report with severity colors, code snippets, AI summary
193
247
-**findings.json**: Complete vulnerability data with all 16 fields
194
248
-**report.html**: Visual report with severity colors, code snippets, AI summary
195
249
-**report.sarif**: SARIF format for CI/CD integration
196
250
197
251
## Paper-Integration Research Flags
198
252
199
-
The following flags enable experimental research-backed analysis augmentations.
200
-
All default to disabled. See `todo.md` for full implementation details.
253
+
> **Experimental — disabled by default.** These sections enable research-backed analysis augmentations. Enable only after understanding the tradeoffs.
254
+
255
+
### Validate (CORRECT paper arxiv:2504.13474)
256
+
257
+
LLM-as-judge rationale validation: evaluates the soundness of reasoning behind each finding and adjusts confidence accordingly (+0.10 sound, -0.20 flawed).
0 commit comments