Repository navigation
Expand file tree
/
Copy pathconfig.example.toml
More file actions
200 lines (178 loc) · 8.14 KB
/
Copy pathconfig.example.toml
File metadata and controls
200 lines (178 loc) · 8.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
# BACO Scanner Configuration
# ===================================
# This file contains all configuration options for the BACO vulnerability scanner.
# Copy this file to config.toml and modify values as needed.
#
# Environment variables can override LLM API keys:
# - LLM_DISCOVERY_KEY -> overrides llm.phases.discovery.api_key
# - LLM_VERIFICATION_KEY -> overrides llm.phases.verification.api_key
# - LLM_AGGREGATION_KEY -> overrides llm.phases.aggregation.api_key
# - LLM_STATIC_ANALYSIS_KEY -> overrides llm.phases.static_analysis.api_key
# Project configuration
[project]
# Name of the project being scanned
name = "libxml2"
# Path to the target directory to scan (must exist)
path = "./libxml2-test"
# Languages to scan (file extensions will be detected automatically)
# BACO supports: C, Python, JavaScript, TypeScript, Go, PHP, and Ruby.
# Only languages with installed presets will be scanned.
languages = ["c", "python", "javascript", "typescript", "go"]
# Output configuration
[output]
# Directory where reports and checkpoints will be written
dir = "./baco-output"
evidence_gate = false
# Include rejected findings (investigated & dismissed) in JSON/HTML reports
# Default: false
include_rejected = false
# Scanner settings
[scanner]
# Maximum file size in KB to index (skip larger files)
max_file_size_kb = 512
# Paths to exclude from scanning (use glob patterns like "tests/" or "docs/*")
exclude_paths = ["tests/", "docs/", "target/"]
[scanner.semgrep]
# Rulesets can be a single string or an array of strings
# Each ruleset will be passed as a separate --config argument to semgrep
# If empty, defaults are derived from project.languages:
# - python -> "p/python"
# - javascript/js -> "p/javascript"
# - php -> "p/php"
# - c/cpp -> "p/c"
# Explicit rulesets are never overridden by defaults.
# Recommended: pin semgrep version with `semgrep --version` in your CI/CD.
rulesets = [
# "p/python", # Example: Python security rules
# "p/javascript", # Example: JavaScript security rules
]
exclude_rules = ["html.security.plaintext-http-link", "html.security.plaintext-http-link.plaintext-http-link"]
# force_scan = false # pass --no-git-ignore: scan git-ignored/untracked files (does NOT bypass .semgrepignore, so tests/ stays skipped)
[scanner.performance]
# Maximum number of parallel tasks for scanning operations
max_parallel_tasks = 4
# --- Phase enable flags ---
# Each flag controls whether a specific analysis phase runs during the scan.
# Phases marked "enabled" run by default; set to false to skip them.
# Root-cause deduplication (collapses findings that share the same root cause)
# Default: true
enable_root_cause_dedup = true
# Confidence refinement (re-calibrates finding confidence based on multi-source/cross-file signals)
# Default: true
enable_confidence_refinement = true
# Never-submit pattern filter - heavily penalizes findings matching known false-positive patterns
# When enabled, findings matching patterns like "missing.*header" or "content.security.policy"
# have their confidence multiplied by never_submit_multiplier
# Default: true
never_submit_enabled = true
# Multiplier applied to confidence when never-submit pattern matches
# A value of 0.1 reduces confidence to 10% of its original value
# Default: 0.1
never_submit_multiplier = 0.1
# CVE bootstrap (enriches findings with CVE data from external sources)
# Default: true
enable_cve_bootstrap = true
# Optional CPE hint for CVE filtering (e.g., "cpe:2.3:a:vendor:product")
# When set, CVE queries will include this CPE as an additional match source
# A CVE whose CPE references the hinted vendor/product is considered relevant
# regardless of package-name matching
# cpe_hint = "cpe:2.3:a:microsoft:internet_explorer:11.0:*:*:*:*:*:*:*"
# Domain-routed hunt prompts: select per-attack-class prompt modules from
# prompts/hunt/ based on the target's languages during LLM discovery
# Default: true
enable_hunt_prompts = true
# LLM configuration with per-phase settings
[llm]
# Timeout in seconds for LLM API requests
timeout_secs = 60
# Maximum number of retries for failed requests (on 429/5xx)
max_retries = 3
# Retry backoff in milliseconds (linear: ms * (retries + 1))
retry_backoff_ms = 2000
# Maximum concurrent LLM requests (default: 4)
max_concurrent = 4
# LLM temperature for response randomness (0.0 = deterministic, 1.0 = creative)
# Default: 0.5 for security scanner determinism
temperature = 0.5
# Enable LLM response caching to avoid redundant API calls
enable_llm_cache = false
# P2.1: Truncated generation — caps reasoning tokens before forcing final answer
# max_reasoning_tokens = 2048
# Per-phase LLM configuration
# Each phase can use a single model or multiple models (round-robin)
# Use 'model' for single model (backward compatible)
# Use 'models' for multiple models (takes precedence over 'model')
[llm.phases]
# Discovery phase: finds potential vulnerabilities in code
[llm.phases.discovery]
base_url = "https://api.mistral.ai/v1"
api_key = "your-discovery-api-key" # or set env: LLM_DISCOVERY_KEY
# Single model (legacy):
# model = "mistral-small"
# Multiple models (round-robin selection):
models = ["mistral-small", "mistral-medium", "codestral-latest"]
# Verification phase: validates and enriches findings
[llm.phases.verification]
base_url = "https://api.mistral.ai/v1"
api_key = "your-verification-api-key" # or set env: LLM_VERIFICATION_KEY
model = "qwen35" # single model
# Aggregation phase: generates executive summary and prioritizes
[llm.phases.aggregation]
base_url = "https://api.mistral.ai/v1"
api_key = "your-aggregation-api-key" # or set env: LLM_AGGREGATION_KEY
model = "mistral-medium" # stronger model for final report
# Static analysis phase: LLM-based code analysis
[llm.phases.static_analysis]
base_url = "https://api.mistral.ai/v1"
api_key = "your-static-analysis-api-key" # or set env: LLM_STATIC_ANALYSIS_KEY
model = "mistral-small"
# Ticket system configuration (search for existing reports)
[tickets]
# Add multiple ticket systems by adding multiple [[tickets.systems]] blocks
[[tickets.systems]]
# Ticket system type: github | gitlab
system_type = "github"
# URL to the ticket system (must include protocol: https://...)
url = "https://github.com/GNOME/libxml2"
# Optional API key for authentication
# api_key = "your-github-token" # optional, or set env: TICKET_GITHUB_KEY
# Agent configuration (advanced: automatic remediation agent)
# Uncomment and configure to enable the agent-based remediation system.
#[agent]
# enabled = false # Set to true to enable the agent
# max_turns = 10 # Maximum agent conversation turns per issue
# Soundness validation (CORRECT paper)
[validate]
# Whether the Validate phase is enabled
# enabled = false
# Citation verification gate: deterministic checks that report citations
# (file existence, line ranges) match the scanned tree before rendering.
# Findings whose citation does not resolve get verification_status = failed
# and a note. Their confidence is left alone: it is the model's own estimate,
# and scaling it says nothing about how wrong the citation is. Whether failed
# findings reach the report is the [output] evidence_gate setting.
# Default: true
[citation_verification]
enabled = true
# Prior-runs store: cross-run findings history for skip directives and
# coverage gap targeting on subsequent scans of the same output dir.
# Default: false
[prior_runs]
enabled = false
# How many prior runs to load (most recent first)
max_runs = 5
# Org-context profile: organizational policy for prompt calibration
# Massive false-positive reducer: knowing where
# secrets live prevents placeholder-as-leak findings.
# [org_context]
# enabled = false
# stack = ["php", "javascript"]
# infra = ["aws", "docker"]
# data_sensitivity = "pii" # "pii" → treat personal data exposure as High severity
# secret_storage = "vault" # "vault" → ${VAULT_TOKEN} refs are placeholders, NOT leaks
# risk_tolerance = "low" # does NOT mean only report criticals — prioritize ruthlessly, report everything real
# severity_rules = { "XSS" = "Critical", "SQLi" = "Critical" } # OVERRIDE lines for specific rules
[eval]
# Minimum aggregate pass-rate for `baco eval` (0.0-1.0).
# The BACO_EVAL_FLOOR environment variable overrides this value.
floor = 0.70