# REPRESENTATIVE OUTPUT — authored at M8 build time; REGENERATE on the golden VM:
#   docker compose run --rm runner python app/triage_ir.py | tee expected/triage_ir_output.txt
──────────── Day 4 — AI-Assisted Triage + IR Runbook (Human-in-the-Loop) ────────────

  Loaded 6 alerts + 5 CVEs from bundled datasets (no live NVD / SIEM / threat-intel — ADR-5)

                          Bundled Alert Queue (6 alerts)
┌─────────────────┬───────────────┬────────────────┬───────────────────────────────────┐
│ Alert ID        │ Severity hint │ Related CVEs   │ Title                             │
├─────────────────┼───────────────┼────────────────┼───────────────────────────────────┤
│ ALERT-2026-0001 │     HIGH      │ CVE-2024-6387  │ Mass SSH authentication failures… │
│ ALERT-2026-0002 │   CRITICAL    │ -              │ Office application spawned Power… │
│ ALERT-2026-0003 │   CRITICAL    │ CVE-2024-21762 │ Exploit-pattern HTTP requests ag… │
│ ALERT-2026-0004 │     HIGH      │ CVE-2024-23897 │ Anomalous Jenkins CLI usage with… │
│ ALERT-2026-0005 │      LOW      │ -              │ Antivirus detection: EICAR test … │
│ ALERT-2026-0006 │     HIGH      │ CVE-2024-3094  │ Backdoored xz-utils version dete… │
└─────────────────┴───────────────┴────────────────┴───────────────────────────────────┘

──────────────────────── Alert 1/6 — ALERT-2026-0001 ────────────────────────
╭─ Grounded context: ALERT-2026-0001 ─────────────────────────────────────────╮
│ ALERT ALERT-2026-0001: Mass SSH authentication failures against             │
│ internet-facing jump server                                                 │
│ …                                                                           │
│ RELATED CVE DATA (authoritative, from bundled dataset — not model memory):  │
│   - CVE-2024-6387 (CVSS 8.1, HIGH [ACTIVELY EXPLOITED IN WILD]): A race     │
│     condition (signal handler race) in OpenSSH server (sshd) prior to…      │
╰─────────────────────────────────────────────────────────────────────────────╯

AI triage (qwen2.5:3b)…
  (88 tokens, 3.2 tok/s)
╭─ AI Triage Verdict ─────────────────────────────────────────────────────────╮
│ VERDICT:    TRUE_POSITIVE                                                   │
│ SEVERITY:   HIGH                                                            │
│ ESCALATE:   YES                                                             │
│ CONFIDENCE: 90%                                                             │
│ RATIONALE:  452 failures followed by two successful 'deploy' logins from    │
│ the same untrusted source indicates a successful brute force, and the       │
│ asset runs OpenSSH 9.3p1 — inside the actively-exploited CVE-2024-6387      │
│ range. Internet-facing jump server puts this in our 4-hour Critical SLA.    │
╰─────────────────────────────────────────────────────────────────────────────╯

Drafting IR runbook (qwen2.5:3b)…
  (412 tokens, 3.0 tok/s)
╭─ DRAFT IR Runbook — ALERT-2026-0001 ────────────────────────────────────────╮
│ ## Summary …                                                                │
│ ## Containment (first 60 minutes)                                           │
│ 1. Block 203.0.113.42 at the perimeter firewall (NetOps). …                 │
│ ## Eradication                                                              │
│ 1. Upgrade jump01.dmz to OpenSSH 9.8p1 or later (SysAdmin). …               │
│ ## Recovery … ## Communications … ## Evidence to Preserve …                 │
│ DRAFT — requires human IR-lead approval before execution.                   │
╰─────────────────────────────────────────────────────────────────────────────╯

HUMAN-IN-THE-LOOP GATE for ALERT-2026-0001 — the AI drafted this runbook; a
human decides what happens to it.
  [a]pprove for filing  [r]eject (bad draft)  [d]efer to IR lead > a
  Human decision recorded: APPROVED

[… Alerts 2/6 through 6/6 follow the same shape. ALERT-2026-0005 (EICAR) comes
   back FALSE_POSITIVE / ESCALATE NO — no runbook drafted. …]

──────────────────────────── Triage session complete ────────────────────────────
              Session Summary — AI proposes, human disposes
┌─────────────────┬────────────────────┬──────────┬─────────────────┬────────────────────┐
│ Alert           │ AI verdict         │ Severity │ Runbook drafted │ Human decision     │
├─────────────────┼────────────────────┼──────────┼─────────────────┼────────────────────┤
│ ALERT-2026-0001 │ TRUE_POSITIVE      │   HIGH   │       yes       │ APPROVED           │
│ ALERT-2026-0002 │ TRUE_POSITIVE      │ CRITICAL │       yes       │ APPROVED           │
│ ALERT-2026-0003 │ TRUE_POSITIVE      │ CRITICAL │       yes       │ DEFERRED           │
│ ALERT-2026-0004 │ TRUE_POSITIVE      │   HIGH   │       yes       │ APPROVED           │
│ ALERT-2026-0005 │ FALSE_POSITIVE     │   LOW    │       no        │ N/A (not escalated)│
│ ALERT-2026-0006 │ NEEDS_INVESTIGATION│   HIGH   │       yes       │ REJECTED           │
└─────────────────┴────────────────────┴──────────┴─────────────────┴────────────────────┘

SecAI+ domain D3 coverage:
  - AI triage accelerates initial verdicts; grounding on bundled alert + CVE data
    prevents hallucinated CVSS scores and invented indicators
  - Malformed AI output FAILS SAFE to escalation — never to silent closure
  - The runbook is a DRAFT: the explicit human gate is the control that keeps
    the AI a force-multiplier instead of an unaccountable decision-maker
  - Offline design: no live NVD/SIEM/threat-intel calls at demo time (ADR-5)
