Build the incident report generator

Aperta
#104 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
55/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
bash, powershell
Ambito
cli, security

Direzione di ricerca

Start on branch phase-8/report and read spec design 20. The code lives in report/; first review dependencies #81, #88 and #101 which must be merged. Write the bats and Pester acceptance tests listed, then build the builder fed by quarantine evidence, integrity findings and closed flaws. Done means tests pass: events merge, missing fields show UNKNOWN, secrets removed, no network calls.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

area: core phase: sustain platform: linux platform: windows type: build

Read first

Read these before starting. If this issue and the spec disagree, the spec wins; say so in the pull request.

Summary

Build the incident report builder. A Red Team incident report (a write-up of an attack the Red Team carried out) earns points, but writing one by hand is slow and fields are easily missed. The builder gathers every fact the tools already hold, groups related events into one incident, and fills the report template. A person reviews and submits it. The tool never submits a report.

Depends on

  • Blocked by #101 (the flaw tracker, for closed flaws and the time each was closed), #88 (integrity findings) and #81 (the persistence sweep, whose quarantine holds evidence).
  • Uses the trip log from #107 and the SIEM alerts from #94, when they exist.

Location & Context

  • Branch: phase-8/report. Not a module: it is the cross-phase report/ folder (design 20). The folder exists (report/.gitkeep); the code and the report template are new.
  • Output is plain text and Markdown, one file per incident, under the report log category (design 20, section 5). How an operator starts it is not fixed in the spec. If it needs a new action in labyrinth.sh and labyrinth.ps1, decide it with Conventions section 3.3 and update the manual, docs/manual/labyrinth.md, in the same commit.
  • Tests: tests/report/ (new; bats and Pester).

Current Behavior

Incident reports earn points but take long to write by hand, and fields are easily missed.

Plan

  1. Build the report builder, fed by quarantine evidence, integrity findings and the tracker's closed flaws.
  2. Follow the pipeline in design 20, section 3: collect the facts on the host, correlate events within a time window that share an address, account or host into one incident, then draft. Steps 5 to 7 (review, submit, track) stay with people.
  3. Build the template from the required fields in design 20, section 4. Show a field with no evidence as UNKNOWN. List every required field still UNKNOWN or empty each time the draft is shown, and once more when the lead marks it ready.
  4. Remove passwords, keys and tokens from log excerpts. State the last hop, not the true origin, unless the origin is confirmed. Make no guess about attribution, intent or tool names.
  5. Produce a short paste block sized for a portal text field, and a one-page timeline.
  6. Track each report's status (draft, submitted, accepted) so nothing is filed twice or forgotten.
  7. Make no network call during report generation.

Acceptance tests

Write these first, in bats and Pester:

  • A decoy trip in the lab produces a draft with correct time, host, source address and evidence.
  • Two related events within the window merge into one incident.
  • A missing field is shown as UNKNOWN, never blank or guessed.
  • Secrets planted in a log line are removed from the report.
  • No network call is made during report generation.
  • Every field Rule 9.4 lists has a place in the template, and a draft with an unfilled required field shows the completeness warning before it is marked ready.

Done when

  • The Linux and Windows versions both pass CI, including the real-host tests on the Ubuntu and Windows Server runners.
  • The manual and the help page for the report command are written.
  • The tests above pass in the lab (docs/lab/README.md).

Out of scope

  • Submitting a report. A person does that, in the channel the officials give.
  • The remediation plan and the confidence notes, which a person writes.
  • The trip log and the decoys: #106 and #107.
  • Enrichment from outside services, such as address reputation lookups. Never done.
Lingua principale
PowerShell
Stelle
0
Fork
0
Merge medio
2h 7m
PR unite (30g)
53

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Issue simili

Altre issue su CLI

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.