repl: /results always shows the test picker; /validate recovered runs; Ctrl-C confirm

- /results (interactive, no arg) now ALWAYS opens the run/test picker (target →
  vuln → detail, Esc back) instead of jumping straight to the current run's vulns.
  The live run (if any) appears at the top, past runs newest-first — so you can
  browse every test, not only the active one.
- /validate [n]: re-run false-positive validation (N-model voting + adversarial
  refute) on a recovered/past run's findings WITHOUT re-testing the target, then
  rewrite that run's findings + report. Backed by new harness::pipeline::revalidate.
  Use this after a crash/quit recovered raw findings into /runs.
- Ctrl-C at the prompt now CONFIRMS instead of silently cancelling: with a live
  run it offers [s]top&validate / [q]uit(keep findings) / keep-running; otherwise
  asks "exit? [y/N]" — so a stray Ctrl-C can't lose a running test.
This commit is contained in:
CyberSecurityUP
2026-07-05 16:53:15 -03:00
parent d931ce09a6
commit e1c1f50a62
2 changed files with 112 additions and 20 deletions
@@ -122,6 +122,21 @@ fn ua_line() -> String {
/// hard to silently re-badge NeuroSploit's output as someone else's work.
const ATTRIBUTION: &str = "Identified and validated by NeuroSploit (multi-model adversarial validation) — https://github.com/JoasASantos/NeuroSploit · by Joas A Santos & Red Team Leaders.";
/// Re-validate a set of candidate findings (N-model voting + adversarial refute)
/// WITHOUT re-running recon/exploitation — for recovered/interrupted runs, so the
/// operator can filter false positives on what was already found. Streams
/// progress and returns the surviving, attribution-stamped findings.
pub async fn revalidate(findings: Vec<Finding>, pool: &ModelPool, vote_n: usize, tx: Sender<String>) -> Vec<Finding> {
pool.set_progress(tx.clone());
let _ = tx.send(format!("re-validating {} recovered finding(s) by {}-model vote…", findings.len(), vote_n)).await;
let deduped = dedup_findings(findings);
let mut v = validate(deduped, pool, VOTE_SYS, vote_n, &tx).await;
v = refute_pass(v, pool, vote_n, &tx).await;
stamp_attribution(&mut v);
let _ = tx.send(format!("re-validation done — {} finding(s) survived", v.len())).await;
v
}
/// Append the NeuroSploit attribution to each finding's impact (idempotent).
pub fn stamp_attribution(findings: &mut [Finding]) {
for f in findings.iter_mut() {