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
AI provider fallback:
- ui_api.go adds aiChat(): tries OpenRouter (UI header key or OPENROUTER_API_KEY)
then falls back to the shared brain.ChatWithAI chain (OpenCode -> Z.ai -> Gemini).
apiValidateFinding and apiReportFinding now use it, so an OpenCode-only setup no
longer fails with "No OpenRouter API key configured".
Multi-finding AI report:
- New POST /api/findings/report-batch (apiReportFindingsBatch): accepts 1..N
selected findings (capped at 25), builds a prompt from each finding's
target/type/severity/module/evidence, and uses an attacker-mindset system
prompt enforcing the Title/Summary/Steps-to-Reproduce/Impact structure
(one report per finding, separated by ---). Routed through aiChat.
- scan-detail.js: new "Report selected (AI)" toolbar button reusing the existing
finding checkboxes; collects checked rows, POSTs them, and shows the generated
report in a copyable modal (Copy / Close / Esc).
Programs cache hardening:
- programsCacheEnabled() gates the DB-backed cache on DB_HOST. Without a DB the
handler now skips cache + background refresh entirely and just does a live
fetch, preventing a DB-less deployment from looping expensive upstream rebuilds
that can never be persisted.
CI fix:
- zerodays.go: use net.JoinHostPort instead of fmt.Sprintf("%s:%d", ...) for the
MongoDB dial address. Fixes `CGO_ENABLED=1 go vet ./...` failing with
"address format %s:%d does not work with IPv6".
CI replicated locally: go vet, go build, go test all pass (CGO_ENABLED=1).
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
<button type="button" id="recon-copy-selected-tsv" title="Copy checked rows from the current page" style="padding:6px 10px;background:rgba(34,211,238,.1);border:1px solid rgba(34,211,238,.35);border-radius:6px;color:var(--accent-cyan);font-size:11px;cursor:pointer;white-space:nowrap"> Copy selected</button>
931
+
<button type="button" id="recon-report-selected-ai" title="Generate an AI vulnerability report for the checked rows" style="padding:6px 10px;background:rgba(52,211,153,.1);border:1px solid rgba(52,211,153,.4);border-radius:6px;color:#34d399;font-size:11px;cursor:pointer;white-space:nowrap"> Report selected (AI)</button>
903
932
<button type="button" id="recon-export-all-json" title="Export all findings in the current view as Markdown" style="padding:6px 10px;background:rgba(167,139,250,.08);border:1px solid rgba(167,139,250,.35);border-radius:6px;color:#c4b5fd;font-size:11px;cursor:pointer;white-space:nowrap"> Export Markdown</button>
@@ -2291,3 +2310,117 @@ Use EXACTLY this structure (markdown):
2291
2310
"finding": body.FindingType,
2292
2311
})
2293
2312
}
2313
+
2314
+
// reportSystemPrompt is the attacker-mindset instruction enforcing the exact
2315
+
// report structure for the batch finding-report feature.
2316
+
constreportSystemPrompt=`You are a senior offensive security engineer writing bug bounty reports.
2317
+
2318
+
Mindset:
2319
+
- Think like a real-world attacker, not a beginner.
2320
+
- Always look for practical, exploitable vulnerabilities.
2321
+
- Focus on impact, not theory.
2322
+
- Be concise, direct, and technical.
2323
+
2324
+
When reporting a vulnerability:
2325
+
- ONLY use the following structure.
2326
+
- Keep it clean, concise, and professional.
2327
+
- No extra commentary outside the structure.
2328
+
2329
+
## Title: <clear, specific vulnerability name>
2330
+
2331
+
## Summary
2332
+
<short explanation of the issue and where it exists>
2333
+
2334
+
## Steps to Reproduce
2335
+
1. <step 1>
2336
+
2. <step 2>
2337
+
3. <step 3>
2338
+
2339
+
## Impact
2340
+
<realistic impact, what attacker can achieve>
2341
+
2342
+
If multiple findings are provided, output one report per finding using EXACTLY this structure, separated by a line containing only '---'. If several findings are clearly the same vulnerability class on related assets, you may merge them into a single report and list all affected targets in the Summary.`
0 commit comments