From 09f46da79ef496c6532af8811d07226b14e9e7f0 Mon Sep 17 00:00:00 2001 From: CyberSecurityUP Date: Sun, 18 Oct 2026 16:54:49 -0300 Subject: [PATCH] fix(web+report): treat needs-review findings as validated findings Include needs-review in severity counts in report template and rename KPI card from "Confirmed" to "Validated" combining both confirmed and needs-review statuses. --- neurosploit-rs/templates/report.typ | 2 +- web/public/app.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/neurosploit-rs/templates/report.typ b/neurosploit-rs/templates/report.typ index a49f2a4..174dd78 100644 --- a/neurosploit-rs/templates/report.typ +++ b/neurosploit-rs/templates/report.typ @@ -98,7 +98,7 @@ #let counts = (:) #for f in findings { - if f.status != "needs-review" { counts.insert(f.severity, counts.at(f.severity, default: 0) + 1) } + counts.insert(f.severity, counts.at(f.severity, default: 0) + 1) } #if findings.len() == 0 [ ] else [ diff --git a/web/public/app.js b/web/public/app.js index 68b025a..53860d5 100644 --- a/web/public/app.js +++ b/web/public/app.js @@ -970,7 +970,7 @@ function renderFindings(which) { show($(cfg.empty), rows.length === 0); $(cfg.empty).textContent = all.length && !rows.length ? 'No finding matches this filter.' - : (which === 'live' ? 'No validated findings yet.' : 'No validated findings.'); + : (which === 'live' ? 'No findings yet.' : 'No findings.'); const counts = {}; for (const f of all) { const s = SEV_ORDER[sevRank(f.severity)]; counts[s] = (counts[s] || 0) + 1; } @@ -2804,7 +2804,7 @@ function renderKpis(sel, all) { const sev = (s) => by((f) => SEV_ORDER[sevRank(f.severity)] === s); const cards = [ { k: 'Findings', v: all.length, sub: `${sev('critical')} critical · ${sev('high')} high · ${sev('medium')} medium · ${sev('low')} low` }, - { k: 'Confirmed', v: by((f) => reviewStatus(f) === 'confirmed'), sub: `${by((f) => reviewStatus(f) === 'needs-review')} need review`, cls: 'kpi-ok' }, + { k: 'Validated', v: by((f) => reviewStatus(f) === 'confirmed' || reviewStatus(f) === 'needs-review'), sub: `${by((f) => reviewStatus(f) === 'confirmed')} confirmed · ${by((f) => reviewStatus(f) === 'needs-review')} in review`, cls: 'kpi-ok' }, { k: 'Wire-verified', v: by((f) => wireState(f).key === 'verified'), sub: 'evidence re-observed on the wire', cls: 'kpi-ok' }, { k: 'Contradicted', v: by((f) => wireState(f).key === 'contradicted'), sub: 'the wire disagreed with the agent', cls: 'kpi-bad' }, ];