Repository navigation
Expand file tree
/
Copy pathbugtraceaicli.conf
More file actions
430 lines (350 loc) · 15.3 KB
/
Copy pathbugtraceaicli.conf
File metadata and controls
430 lines (350 loc) · 15.3 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
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
# ==============================================================================
# BUGTRACE AI CLI - CONFIGURATION FILE (bugtraceaicli.conf)
# ==============================================================================
# Operational settings for the autonomous DAST/SAST framework.
# API keys belong in .env — this file is for tuning behavior.
#
# Sections follow the scan pipeline order:
# CORE → LLM → SCAN → ANALYSIS → EXPLOITATION → VALIDATION → REPORTING
# ==============================================================================
# =============================================================================
# 1. CORE — Global Settings
# =============================================================================
[CORE]
# Debug mode: verbose terminal output and detailed error tracking.
DEBUG = False
# Safe Mode: only simulates attacks, no real payloads injected.
SAFE_MODE = False
[PATHS]
# Directory for scan logs (jsonl, errors)
LOG_DIR = logs
# Directory for final vulnerability reports
REPORT_DIR = reports
# =============================================================================
# 2. PROVIDER — LLM Provider Selection
# =============================================================================
[PROVIDER]
# Active LLM provider: openrouter (recommended), zai, anthropic, bedrock
# openrouter: Recommended — multiple providers, best model per task (requires OPENROUTER_API_KEY in .env)
# zai: Z.ai direct API, single-provider option (requires GLM_API_KEY in .env)
# anthropic: Anthropic direct API (Messages API, x-api-key), single-provider — all slots on Claude Haiku 4.5
# (requires ANTHROPIC_API_KEY in .env). Independent of the [ANTHROPIC] OAuth section below.
# bedrock: Amazon Bedrock Converse via boto3; prefers the runtime's AWS role/profile.
# Optional API key: AWS_BEARER_TOKEN_BEDROCK. Optional source region below.
#
# Changing provider auto-configures all models from its preset.
# Add only the model assignments you want to override in [LLM_MODELS].
# Available: openrouter (v1, legacy), openrouter-v2, zai, anthropic, bedrock
ACTIVE = openrouter-v2
# Optional when Bedrock is active; blank/unset lets boto3 use AWS_REGION/profile config.
# BEDROCK_REGION = eu-west-1
# Cross-provider reporting failover is disabled for Bedrock by default. Opt in only
# when sending report prompts outside AWS is permitted by the deployment policy.
# BEDROCK_ALLOW_EXTERNAL_REPORTING_FAILOVER = true
# =============================================================================
# 3. LLM MODELS — Optional model overrides
# =============================================================================
[LLM_MODELS]
# Provider model defaults and rationale live in
# bugtrace/data/providers/<provider>.json. Leave a slot unset to inherit it.
# Add only explicit per-slot overrides here, using an ID accepted by the provider.
# Supported slots: DEFAULT_MODEL, CODE_MODEL, ANALYSIS_MODEL,
# ANALYSIS_PENTESTER_MODEL, ANALYSIS_BUG_BOUNTY_MODEL, ANALYSIS_AUDITOR_MODEL,
# ANALYSIS_RED_TEAM_MODEL, ANALYSIS_RESEARCHER_MODEL, PRIMARY_MODELS,
# VISION_MODEL, VALIDATION_VISION_MODEL, WAF_DETECTION_MODELS, MUTATION_MODEL,
# SKEPTICAL_MODEL, REPORTING_MODEL, LONEWOLF_MODEL.
# Example: DEFAULT_MODEL = provider/model-id
# Optional LoneWolf override; the selected provider supplies its default.
# LONEWOLF_MODEL = anthropic/claude-haiku-4.5
# Reporting/enrichment resilience: on primary-provider failure/timeout during reporting,
# fall back to a secondary provider ONLY for enrichment (never changes the scan provider).
REPORTING_FAILOVER_ENABLED = true
REPORTING_FAILOVER_PROVIDER = anthropic
# Minimum OpenRouter credits (USD) to start a scan
MIN_CREDITS = 2.0
[MODELLAB]
# Model Lab (model-eval benchmark) scoring calibration. Ranks candidate models by
# a QUALITY-DOMINANT composite; latency and cost are reported as side axes, not the
# decider. Weights are normalized to sum 1.0 at read time (any non-negative set is
# safe). Recalibrated 2026-07-24: the old perf-heavy weighting made the ranking a
# pure latency sort when the rubric saturated. Bump SCORING_VERSION on any change so
# persisted runs remain self-describing and comparable.
MODELLAB_SCORING_VERSION = v2-quality
MODELLAB_W_CORRECTNESS = 0.40
MODELLAB_W_SKEPTICISM = 0.30
MODELLAB_W_COMPLIANCE = 0.15
MODELLAB_W_PERFORMANCE = 0.15
# Ranking gate: a model must clear all three to receive a composite score.
# Correctness min is 6.0 (not 7.0): the strict re-anchored rubric lands a solid answer at
# ~6.5, so 7.0 wrongly failed competent models in the 2026-07-24 validation.
MODELLAB_GATE_MIN_CORRECTNESS = 6.0
MODELLAB_GATE_MIN_SKEPTICISM = 7.0
MODELLAB_GATE_MIN_COMPLIANCE = 6.0
# composite -= failure_rate * this
MODELLAB_FAILURE_PENALTY = 3.0
# Central tendency used to score latency (robust to a single slow prompt): median | p95
MODELLAB_LATENCY_STAT = median
# MUTATION slot pick blends judge quality with payload diversity (the real-scan-predictive
# signal). This is the diversity share (0-1); quality share = 1 - this.
MODELLAB_MUTATION_DIVERSITY_WEIGHT = 0.6
[OPENROUTER]
# Enable online mode for models that support internet access
ONLINE = True
[ANTHROPIC]
# Direct Anthropic API via OAuth — $0 on Claude Pro/Max plan.
# 1. Run: bash tools/anthropic_login.sh
# 2. Set ENABLED = True below
# NOTE: This OAuth mode is SEPARATE from the `anthropic` provider preset
# (which uses an API key via ANTHROPIC_API_KEY). To use the API-key
# provider instead, set [PROVIDER] ACTIVE = anthropic and leave this False.
ENABLED = False
# =============================================================================
# 3. SCAN — Target & Crawling Configuration
# =============================================================================
[SCAN]
# Maximum depth for the visual crawler (BFS)
MAX_DEPTH = 5
# Maximum number of unique URLs to scan
MAX_URLS = 50
# Maximum concurrent URLMasterAgents
# Range: 5-20, Recommended: 5-10
MAX_CONCURRENT_URL_AGENTS = 5
# Collapse URLs with same path pattern before DAST (/products/1, /products/2 → 1)
# Saves LLM calls on targets with many parameterized endpoints
URL_PATTERN_DEDUP = True
# GoSpider: Don't follow redirects (catches .env, .htaccess leaks)
GOSPIDER_NO_REDIRECT = False
# GoSpider: Query external archives (Wayback Machine, CommonCrawl, VirusTotal)
# Set to False for more consistent URL counts across runs (archives return variable results)
GOSPIDER_USE_ARCHIVES = True
# GoSpider: Crawler thread count (lower = more deterministic, higher = faster)
# Range: 1-20, Recommended: 3-5
GOSPIDER_CONCURRENCY = 5
# --- Custom HTTP Headers ---
# Global default headers sent with every scan request (JSON object, one line).
# IMPORTANT: Do NOT put sensitive values here (Authorization, Cookie, API keys).
# Use per-scan --header arguments for those, or auth discovery via --auth.
# Environment variable placeholders are supported: ${VAR_NAME}
# Examples:
# DEFAULT_HEADERS_JSON = {"X-Bug-Bounty": "MyProgram"}
# DEFAULT_HEADERS_JSON = {"X-Organization": "AcmeCorp", "X-Scan-Type": "DAST"}
DEFAULT_HEADERS_JSON = {}
[CRAWLER]
# Wait time in ms for SPA hydration (React/Vue/Angular rendering)
SPA_WAIT_MS = 1000
# Maximum internal queue size to prevent memory explosion
MAX_QUEUE_SIZE = 100
# Extensions to EXCLUDE from analysis (static files)
EXCLUDE_EXTENSIONS = .js,.mjs,.css,.jpg,.jpeg,.png,.gif,.svg,.ico,.woff,.woff2,.ttf,.eot,.pdf,.zip,.rar,.mp3,.mp4,.webm,.webp
# Only analyze URLs with these extensions (empty = all except excluded)
INCLUDE_EXTENSIONS =
# Mine endpoints from bounded, same-origin JavaScript without scanning .js assets directly
JS_ENDPOINT_MINING = True
JS_MAX_SCRIPTS = 10
JS_MAX_ENDPOINTS = 100
JS_MAX_RESPONSE_BYTES = 1048576
JS_FETCH_TIMEOUT = 10
[URL_PRIORITIZATION]
# Scan high-value URLs first (admin, API, login) before low-priority ones.
# Scoring: +10 high-value path, +5 sensitive param, +15 has params, -20 static file
ENABLED = True
LOG_SCORES = True
# Custom high-priority paths/params (comma-separated, adds to defaults)
CUSTOM_PATHS =
CUSTOM_PARAMS =
[ASSET_DISCOVERY]
# Comprehensive asset discovery and subdomain enumeration
# True = full recon (subdomains, Wayback, cloud storage)
# False = only the provided target URL
ENABLE_ASSET_DISCOVERY = False
ENABLE_DNS_ENUMERATION = True
ENABLE_CERTIFICATE_TRANSPARENCY = True
ENABLE_WAYBACK_DISCOVERY = True
ENABLE_CLOUD_STORAGE_ENUM = True
ENABLE_COMMON_PATHS = True
MAX_SUBDOMAINS = 50
# =============================================================================
# 4. ANALYSIS — DAST/SAST Analysis Phase
# =============================================================================
[PARALLELIZATION]
# Per-phase concurrency control. Each agent makes LLM calls independently.
# Discovery Phase - GoSpider crawling (single-threaded by design)
MAX_CONCURRENT_DISCOVERY = 1
# Analysis Phase - DASTySASTAgents analyzing URLs in parallel
# Range: 1-10, Recommended: 5
MAX_CONCURRENT_ANALYSIS = 5
# Exploitation Phase - Specialist agents (XSS, SQLi, CSTI, etc.)
# Range: 1-20, Recommended: 7-10
MAX_CONCURRENT_SPECIALISTS = 7
# JWT specialist head-start (seconds) before other specialists — cracked tokens
# land in store_auth_token() before IDOR/etc. run. 0 disables waiting.
JWT_HEAD_START_TIMEOUT = 300
# NOTE: Validation concurrency is HARDCODED to 1 (CDP crashes with concurrent sessions)
[ANALYSIS]
# Enable/disable pre-exploitation analysis
ENABLE_ANALYSIS = True
# DAST Analysis Timeout — seconds per URL (probes + all LLM calls)
# Each URL runs multiple parallel LLM approaches + SQLi/Cookie probes
# Increase if you see timeout errors during analysis phase
DAST_ANALYSIS_TIMEOUT = 180.0
# Approach execution mode:
# ALL = run all enabled approaches in parallel (max coverage)
# AUTO = wave-based: pentester+bug_bounty first, if empty → code_auditor+red_team
# researcher is skipped in AUTO mode. Saves 20-60% LLM calls.
APPROACH_MODE = AUTO
# Individual approach toggles (True/False, only used in ALL mode)
# skeptical_agent always runs as final reviewer (not togglable)
APPROACH_PENTESTER = True
APPROACH_BUG_BOUNTY = True
APPROACH_CODE_AUDITOR = True
APPROACH_RED_TEAM = True
APPROACH_RESEARCHER = True
# Per-approach models inherit the active provider preset.
# Put explicit per-slot overrides in [LLM_MODELS].
# Confidence thresholds for forwarding to exploitation
CONFIDENCE_THRESHOLD = 0.5
SKIP_THRESHOLD = 0.3
# Models required to agree for "consensus" (1=sensitive, 3=precise)
CONSENSUS_VOTES = 1
[SKEPTICAL_THRESHOLDS]
# Minimum confidence score (0-10) for findings to pass to specialists
# Lower = more permissive, Higher = stricter
# CRITICAL
RCE = 4
SQL = 6
# HIGH
XXE = 5
SSRF = 5
LFI = 5
# MEDIUM
XSS = 5
JWT = 6
FILE_UPLOAD = 6
# LOW
IDOR = 6
# Fallback
DEFAULT = 5
[THINKING]
# ThinkingConsolidationAgent — filters findings before specialists
# Minimum fp_confidence to forward (DOM XSS typically ~0.4)
FP_THRESHOLD = 0.3
[CONDUCTOR]
# Conductor V2 Anti-Hallucination System
DISABLE_VALIDATION = False
CONTEXT_REFRESH_INTERVAL = 300
MIN_CONFIDENCE = 0.6
ENABLE_FP_DETECTION = True
# =============================================================================
# 5. EXPLOITATION — Specialist Agents & Attack Configuration
# =============================================================================
[SCANNING]
# Stop scan on critical vulnerability (SQLi, RCE, XXE = full compromise)
STOP_ON_CRITICAL = False
CRITICAL_TYPES = SQLi,RCE,XXE
# Require SQLMap validation for ALL SQLi findings (mandatory)
MANDATORY_SQLMAP_VALIDATION = True
# Skip parameters already validated (avoid redundant scans)
SKIP_VALIDATED_PARAMS = True
# Exploitation depth: quick (L0-L1) | standard (L0-L3) | thorough (L0-L4 + SQLMap)
SCAN_DEPTH = standard
[AUTHORITY]
# Allow specialist agents to self-validate findings
ENABLE_SELF_VALIDATION = True
XSS_SELF_VALIDATE = True
SQLI_SELF_VALIDATE = True
RCE_SELF_VALIDATE = True
[MANIPULATOR]
# HTTP Exploitation Tool — Intelligent Breakouts System
GLOBAL_RATE_LIMIT = 2.0
USE_GLOBAL_RATE_LIMITER = True
ENABLE_LLM_EXPANSION = True
ENABLE_AGENTIC_FALLBACK = False
BREAKOUT_PRIORITY_LEVEL = 3
MAX_LLM_PAYLOADS = 100
[WAF_BYPASS]
# Auto-detected WAFs: cloudflare, modsecurity, aws_waf, akamai, imperva,
# f5_bigip, sucuri, fortiweb, nginx_naxsi, barracuda, generic
#
# Encoding strategies (auto-selected by Q-Learning):
# Basic: url_encode, double_url_encode, unicode_encode, html_entity_encode,
# html_entity_hex, base64_encode
# Advanced: case_mixing, null_byte_injection, comment_injection,
# whitespace_obfuscation, overlong_utf8, backslash_escape
# SQL: concat_string, hex_encode, scientific_notation
# Buffer: buffer_overflow, newline_injection
[QLEARNING]
# Q-Learning hyperparameters for WAF bypass strategy selection
# UCB1 formula: UCB = success_rate + c * sqrt(ln(total) / attempts)
INITIAL_EPSILON = 0.3
MIN_EPSILON = 0.05
DECAY_RATE = 0.995
UCB_CONSTANT = 2.0
MAX_BACKUPS = 5
# Learning data persists in: bugtrace/data/waf_strategy_learning.json
# System gets smarter with each scan.
# =============================================================================
# 6. VALIDATION — Browser & Vision Verification
# =============================================================================
[BROWSER]
# Headless mode (False to watch the crawler in real-time)
HEADLESS = True
# User Agent string
USER_AGENT = Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36
# Browser viewport
VIEWPORT_WIDTH = 1280
VIEWPORT_HEIGHT = 720
# Navigation timeout (ms)
TIMEOUT_MS = 15000
# DOM Click Strategy for Open Redirect detection
DOM_CLICK_MAX_LINKS = 5
DOM_CLICK_MAX_TEXT_LINKS = 10
DOM_CLICK_WAIT_SEC = 2.0
DOM_CLICK_INITIAL_WAIT_SEC = 1.0
[VALIDATION]
# Vision-based XSS screenshot validation
# Override the provider model with VALIDATION_VISION_MODEL in [LLM_MODELS].
VISION_ENABLED = True
VISION_ONLY_FOR_XSS = True
MAX_VISION_CALLS_PER_URL = 3
[BROWSER_ADVANCED]
# Navegación y carga
NAVIGATION_TIMEOUT_MS = 90000
NETWORKIDLE_TIMEOUT_MS = 30000
PAYLOAD_EXECUTION_WAIT_MS = 8000
SCREENSHOT_TIMEOUT_MS = 15000
SCREENSHOT_MAX_RETRIES = 3
# Estrategias de espera
WAIT_STRATEGY = staggered
STAGGERED_WAIT_INITIAL = 5000
STAGGERED_WAIT_EXTRA = 3000
# Captura de evidencia
SCREENSHOT_FULL_PAGE = False
SCREENSHOT_ON_ERROR = True
# =============================================================================
# 7. REPORTING & OPTIMIZATION
# =============================================================================
[REPORT]
# Only include validated findings in the final report
# True = only findings with evidence, False = includes "Potential" findings
ONLY_VALIDATED = False
[OPTIMIZATION]
# Early exit after first finding per URL
# True = bug bounty speed (70% faster), False = full audit coverage
EARLY_EXIT_ON_FINDING = False
# =============================================================================
# 8. AUTONOMOUS AGENTS
# =============================================================================
[LONEWOLF]
# Autonomous exploration agent (v2) — runs in parallel with pipeline.
# Expert-level: persistent KnowledgeBase memory, autonomous surface mapping,
# strict context-aware confirmation (no reflection-only false positives),
# and no-progress convergence to keep token spend bounded.
ENABLED = False
# Model inherits the active provider preset; override LONEWOLF_MODEL in [LLM_MODELS].
RATE_LIMIT = 1.0
MAX_CONTEXT = 20
RESPONSE_TRUNCATE = 2000
# v2 tunables
MAX_CYCLES = 120
NO_PROGRESS_LIMIT = 18
RECENT_WINDOW = 6