Skip to content

Commit 015aa3c

Browse files
committed
feat(update): working on next release
♬ Vectorwolf - Street Justice-V
1 parent 8f15423 commit 015aa3c

61 files changed

Lines changed: 835 additions & 747 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎docs/configuration.md‎

Lines changed: 6 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,14 @@ api_key = "${MISTRAL_API_KEY}"
1616
model = "mistral-small"
1717

1818
[scanner.performance]
19-
enable_incremental_scan = false
2019
max_parallel_tasks = 4
21-
enable_file_filtering = true
2220
```
2321

2422
**Experimental sections** (disabled by default):
2523
- `[cpg]` — CPG-guided slicing (requires Joern binary)
2624
- `[validate]` — LLM-as-judge rationale validation
2725
- `[vuln_spec]` — VulTriage triple-path, policy sampling, agent scaffold
2826
- `[agent_scaffold]` — Agent-assisted analysis
29-
- `[agent_flow]` — Multi-agent harness synthesis
3027
- `[threat_modeling]` — STRIDE threat modeling (now under `[scanner.performance]`)
3128

3229
Enable only after reviewing the detailed sections below.
@@ -65,11 +62,9 @@ profile = "all"
6562
```toml
6663
[scanner.performance]
6764
# Skip unchanged files based on SHA256 hash comparison (hashes persisted to output dir)
68-
enable_incremental_scan = false
6965
# Maximum number of parallel tasks for scanning operations
7066
max_parallel_tasks = 4
7167
# Enable file filtering to reduce false positives
72-
enable_file_filtering = true
7368

7469
# --- Semgrep configuration ---
7570
[scanner.semgrep]
@@ -154,25 +149,17 @@ The `[router]` section configures the Mixture-of-Experts routing for per-CWE and
154149
```toml
155150
[router]
156151
enabled = false
157-
default_prompt = "llm_static_analysis"
158152

159-
# CWE-specific prompt/model overrides
153+
# CWE-specific model overrides
160154
[router.cwe_overrides]
161-
"CWE-79" = { prompt_template = "xss_analysis", model_override = "mistral-small" }
162-
"CWE-89" = { prompt_template = "sqli_analysis", model_override = "qwen35" }
163-
164-
# Language-specific prompt/model overrides
165-
[router.language_overrides]
166-
"php" = { prompt_template = "php_security", model_override = null }
167-
"python" = { prompt_template = "python_security", model_override = null }
155+
"CWE-79" = { model_override = "mistral-small" }
156+
"CWE-89" = { model_override = "qwen35" }
168157
```
169158

170159
| Field | Type | Default | Description |
171160
|-------|------|---------|-------------|
172161
| `enabled` | bool | `false` | Enable MoE routing |
173-
| `default_prompt` | str | `"llm_static_analysis"` | Default prompt template name |
174-
| `cwe_overrides` | map | `{}` | CWE ID → PromptSpec overrides |
175-
| `language_overrides` | map | `{}` | Language → PromptSpec overrides |
162+
| `cwe_overrides` | map | `{}` | CWE ID → model override for that CWE's domain |
176163

177164
## LLM Configuration
178165

@@ -356,7 +343,7 @@ Prompts are validated (max 10,000 characters, no null bytes) before use.
356343
[[tickets.systems]]
357344
system_type = "github"
358345
url = "https://api.github.com"
359-
credentials.token = "${GITHUB_TOKEN}"
346+
api_key = "${GITHUB_TOKEN}"
360347
```
361348

362349
## Output Configuration
@@ -493,15 +480,11 @@ before the vulnerability judgement.
493480
| Field | Type | Default | Description |
494481
|----------------|------|---------|--------------------------------------|
495482
| `enabled` | bool | false | Enable triple-path augmentation |
496-
| `control_path` | bool | true | Include AST/CFG/DFG verbalisation |
497-
| `knowledge_path`| bool | true | Include CWE pattern RAG |
498483
| `semantic_path`| bool | true | Include function summary |
499484

500485
```toml
501486
[vultriage]
502487
enabled = false
503-
control_path = true
504-
knowledge_path = true
505488
semantic_path = true
506489
```
507490

@@ -678,24 +661,6 @@ enable_hunt_prompts = false
678661

679662
Available modules: `injection.md`, `auth.md`, `authz_absence.md`, `xss.md`, `path_traversal.md`, `crypto.md`, `resource.md`, `deserialization.md`, `memory_safety.md`.
680663

681-
### AgentFlow Multi-Agent Harness Synthesis (P5) — arXiv:2605.11835
682-
683-
Represents the harness as a typed graph DSL with a search loop. Most invasive
684-
integration — static harness only until P5.5.
685-
686-
| Field | Type | Default | Description |
687-
|----------------------------|------|---------|--------------------------------|
688-
| `enabled` | bool | false | Enable AgentFlow harness |
689-
| `max_iterations` | int | 10 | Max synthesis iterations |
690-
| `requires_instrumented_target`| bool | false | Require instrumented target |
691-
692-
```toml
693-
[agent_flow]
694-
enabled = false
695-
max_iterations = 10
696-
requires_instrumented_target = false
697-
```
698-
699664
### Exploit Synthesis (T3.2)
700665

701666
Automated exploit generation to verify findings. Runs in sandboxed Docker containers.
@@ -705,14 +670,12 @@ Automated exploit generation to verify findings. Runs in sandboxed Docker contai
705670
| `enabled` | bool | false | Enable exploit synthesis |
706671
| `sandbox_image` | str | "python:3.11-slim" | Docker image for sandbox |
707672
| `timeout_secs` | int | 30 | Timeout for exploit execution |
708-
| `max_exploits_per_finding` | int | 1 | Max attempts per finding |
709673

710674
```toml
711675
[exploit]
712676
enabled = false
713677
sandbox_image = "python:3.11-slim"
714678
timeout_secs = 30
715-
max_exploits_per_finding = 1
716679
```
717680

718681
### Confidence Normalization
@@ -788,7 +751,6 @@ rules:
788751
''']
789752
790753
[scanner.performance]
791-
enable_incremental_scan = true
792754
enable_root_cause_dedup = true
793755
enable_variant_search = true
794756
@@ -834,9 +796,6 @@ registrations = [
834796
'''(?si)register_rest_route\s*\([^;]*?[\x27\x22]callback[\x27\x22]\s*=>\s*''',
835797
]
836798
837-
[agent_flow]
838-
enabled = false
839-
840799
[agent]
841800
enabled = false
842801
max_turns = 10
@@ -865,7 +824,7 @@ baco scan --config my.toml --preset my-project
865824
| `triage` | `enabled`, `model`, `batch_size`, `suspicion_threshold` |
866825
| `priority` | `enabled`, `git_recent_boost`, `entry_point_boost`, `small_file_boost` |
867826
| `budget` | `enabled`, `max_llm_calls`, `reserve_percent_for_high_risk` |
868-
| `agent_flow` | `enabled`, `max_iterations`, `requires_instrumented_target` |
827+
| `agent_flow` | `enabled`, `max_iterations` |
869828
| `agent` | `enabled`, `max_turns`, `tool_timeout_secs` |
870829
| `knowledge` | `fp_patterns` (map of CWE → list of false-positive indicator strings), `required_security_primitives` (map of language → list of required primitives), `hook_registry` (map of language → HookRegistryLanguageConfig with `hook_label`, `registrations` regexes with optional `(?P<hook>)` capture, `handler_patterns` override) |
871830

‎docs/operator-tuning.md‎

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ Performance tuning for the Baco SAST scanner. Adjust settings based on scan spee
88

99
```toml
1010
[scanner.performance]
11-
enable_incremental_scan = true
1211
max_parallel_tasks = 2
1312
enable_threat_modeling = false
1413
enable_confidence_refinement = false
@@ -28,7 +27,6 @@ exclude_paths = ["tests/", "docs/", "target/", "vendor/"]
2827

2928
```toml
3029
[scanner.performance]
31-
enable_incremental_scan = false
3230
max_parallel_tasks = 8
3331
enable_threat_modeling = true
3432
enable_root_cause_dedup = true
@@ -48,7 +46,6 @@ timeout_secs = 120
4846

4947
```toml
5048
[scanner.performance]
51-
enable_incremental_scan = true
5249
max_parallel_tasks = 2
5350
enable_confidence_refinement = false
5451
enable_variant_search = false
@@ -64,9 +61,7 @@ max_concurrent = 2
6461

6562
| Flag | Type | Default | Effect |
6663
|------|------|---------|--------|
67-
| `enable_incremental_scan` | bool | false | Skips unchanged files via SHA256 hash comparison |
6864
| `max_parallel_tasks` | int | 4 | Max concurrent scan tasks |
69-
| `enable_file_filtering` | bool | true | Filters low-value files (minified, vendor) |
7065
| `enable_threat_modeling` | bool | false | STRIDE-based threat analysis |
7166
| `enable_root_cause_dedup` | bool | true | Collapses findings with same root cause |
7267
| `enable_auto_patching` | bool | false | Generates fix patches — opt-in |
@@ -120,13 +115,3 @@ early_termination_threshold = 500.0
120115

121116
Scan stops after N medium+ findings. Useful for very large codebases. When triggered, an `early_termination` section is recorded in the JSON report.
122117

123-
### Agent Flow Gate
124-
125-
Multi-agent harness synthesis (opt-in, default OFF). Enable only after understanding the requirements:
126-
127-
```toml
128-
[agent_flow]
129-
enabled = false
130-
max_iterations = 10
131-
requires_instrumented_target = false
132-
```

‎docs/troubleshooting.md‎

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,6 @@ Common issues and solutions for the Baco SAST scanner.
1919
| CPG slicing phase shows "skipped" | Joern dependency missing | Install Joern binary (see above) or skip CPG analysis |
2020
| Scan takes unusually long | Large codebase, no caching | Enable `enable_llm_cache = true` to avoid duplicate API calls |
2121

22-
## Incremental Scan Surprises
23-
24-
| Symptom | Cause | Fix |
25-
|---------|-------|-----|
26-
| Files skipped during incremental scan | Stale hash store | Delete output directory to force full rescan: `rm -rf <output-dir>/` |
27-
| Changed files not re-analyzed | Hash mismatch in checkpoint.json | Remove checkpoint.json and file_hashes.json, then rescan |
28-
| Incremental scan slower than full scan | Hash validation overhead | Accept overhead or force full scan by clearing output dir |
29-
3022
## Report/Output Issues
3123

3224
| Symptom | Cause | Fix |

‎presets/cpp.toml‎

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -106,14 +106,7 @@ reserve_percent_for_high_risk = 20
106106

107107
[knowledge.required_security_primitives]
108108
"cpp" = ["bounds check", "size validation", "std::string", "at()", "length()"]
109-
110-
[agent_flow]
111-
enabled = false
112-
max_iterations = 10
113-
requires_instrumented_target = false
114-
115109
[agent]
116110
enabled = false
117111
max_turns = 15
118112
tool_timeout_secs = 300
119-
trusted_paths = []

‎presets/django.toml‎

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@ rules:
8686
''']
8787

8888
[scanner.performance]
89-
enable_incremental_scan = true
9089
enable_variant_search = true
9190
enable_cve_bootstrap = true
9291

@@ -191,11 +190,5 @@ registrations = [
191190
handler_patterns = [
192191
'''^[ \t]*([a-zA-Z_][a-zA-Z0-9_.]*)''',
193192
]
194-
195-
[agent_flow]
196-
enabled = false
197-
requires_instrumented_target = false
198-
199193
[agent]
200194
enabled = false
201-
trusted_paths = []

‎presets/laravel.toml‎

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,6 @@ rules:
9797
''']
9898

9999
[scanner.performance]
100-
enable_incremental_scan = true
101100
enable_variant_search = true
102101
enable_cve_bootstrap = true
103102

@@ -206,11 +205,5 @@ handler_patterns = [
206205
'''^[ \t]*\[\s*[a-zA-Z_\x5c][a-zA-Z0-9_\x5c]*::class\s*,\s*[\x27\x22]([a-zA-Z_][a-zA-Z0-9_]*)[\x27\x22]\s*\]''',
207206
'''^[ \t]*[\x27\x22]([a-zA-Z_\x5c][a-zA-Z0-9_\x5c]*@[a-zA-Z_][a-zA-Z0-9_]*)[\x27\x22]''',
208207
]
209-
210-
[agent_flow]
211-
enabled = false
212-
requires_instrumented_target = false
213-
214208
[agent]
215209
enabled = false
216-
trusted_paths = []

‎presets/litellm.toml‎

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ exclude_paths = [
2424
rulesets = ["p/python", "p/bandit", "p/flask", "p/security"]
2525

2626
[scanner.performance]
27-
enable_incremental_scan = true
2827
enable_root_cause_dedup = true
2928
enable_variant_search = true
3029
enable_cve_bootstrap = true
@@ -103,11 +102,5 @@ max_llm_calls = 800
103102
]
104103
"CWE-79" = ["JSONResponse", "orjson.dumps", "HTTPException"]
105104
"CWE-611" = ["defusedxml", "xml.etree.ElementTree.fromstring"]
106-
107-
[agent_flow]
108-
enabled = false
109-
requires_instrumented_target = false
110-
111105
[agent]
112106
enabled = false
113-
trusted_paths = []

‎presets/oss-monorepo.toml‎

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ exclude_paths = [
3939
]
4040

4141
[scanner.performance]
42-
enable_incremental_scan = true
4342

4443
[llm]
4544
enable_llm_cache = true
@@ -101,11 +100,5 @@ sink_patterns = [
101100
[budget]
102101
enabled = true
103102
max_llm_calls = 1000
104-
105-
[agent_flow]
106-
enabled = false
107-
requires_instrumented_target = false
108-
109103
[agent]
110104
enabled = false
111-
trusted_paths = []

‎presets/oss-python.toml‎

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ exclude_paths = [
4242
rulesets = ["p/python", "p/bandit", "p/security"]
4343

4444
[scanner.performance]
45-
enable_incremental_scan = true
4645

4746
[llm]
4847
enable_llm_cache = true
@@ -94,11 +93,5 @@ sink_patterns = [
9493
[budget]
9594
enabled = true
9695
max_llm_calls = 1000
97-
98-
[agent_flow]
99-
enabled = false
100-
requires_instrumented_target = false
101-
10296
[agent]
10397
enabled = false
104-
trusted_paths = []

‎presets/wordpress-core.toml‎

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,6 @@ rules:
104104
''']
105105

106106
[scanner.performance]
107-
enable_incremental_scan = true
108107
enable_root_cause_dedup = true
109108
enable_variant_search = true
110109
enable_cve_bootstrap = true
@@ -216,11 +215,5 @@ registrations = [
216215
'''(?si)add_action\s*\(\s*[\x27\x22](?P<hook>(?:wp_ajax|wp_ajax_nopriv|admin_post|admin_post_nopriv)[^\x27\x22]*)[\x27\x22]\s*,\s*''',
217216
'''(?si)register_rest_route\s*\([^;]*?[\x27\x22]callback[\x27\x22]\s*=>\s*''',
218217
]
219-
220-
[agent_flow]
221-
enabled = false
222-
requires_instrumented_target = false
223-
224218
[agent]
225219
enabled = false
226-
trusted_paths = []

0 commit comments

Comments
 (0)