# M5 — Findings, evidence, research notebook & reports

### FIND — Vulnerability management [P1]

- [x] Normalize finding titles, affected assets, severity, confidence, source, weakness taxonomy and lifecycle state. — One form whichever way a finding arrives: titles trimmed, CWE and CVE ids in standard spelling (others refused), `source` (scan, manual, agent, import) recorded on creation, `confidence` (tentative, firm, certain) editable with history, severity and status from fixed lists including suspected and reopened; affected assets through the inventory's finding links (`app/core/findings/normalize.py`, migration `a4d8e6f2b1c3`, `test_finding_normalization.py`).
- [x] Support CVSS v3.1/v4.0 scoring with explicit vectors and user overrides; store version and provenance. — Both versions are computed from the vector in the interface and on the backend (v4.0 with the specification's macro-vector method, ported from FIRST's reference calculator, including threat and environmental metrics; a contradicting score is refused); a score without a vector remains a user note; version and source (computed or provided) are stored; severity is suggested and applied only on request (`app/core/findings/cvss.py`, `cvss4.py`, `test_cvss.py`, `test_cvss4.py`, `cvss4.spec.ts` with 604 vectors scored identically by both ports). v3.1 temporal and environmental metrics are not scored.
- [x] Enrich applicable CVEs with published CVSS, EPSS and CISA KEV metadata; never apply CVE-specific scores to unrelated findings. — NVD CVSS 4.0 / 3.x, EPSS and the CISA KEV entry for the CVE a finding names, cached per CVE for a day, shown beside the finding's own score and never replacing it; findings without a CVE get none; fetching is user only and each source fails on its own (`app/core/findings/cve.py`, `app/services/cve_enrichment.py`, `test_cve_enrichment.py`).
- [x] Add deterministic duplicate detection and human-reviewed merge/split operations. — A stable key (target, signature or normalised title, URL without query values, parameter) groups candidates; nothing merges until a person merges from the Duplicates panel (keep, merge one or all, right-click menu); merges keep chains one level deep, split restores the earlier status, both kept in the history; agents read candidates only (`app/core/findings/dedupe.py`, `test_finding_duplicates.py`).
- [x] Distinguish suspected, validated, false positive, duplicate, reported, accepted, resolved and reopened findings. — States suspected, new, triaging, validated, reported, accepted, resolved, reopened, duplicate, false positive and won't fix, in REST, MCP, filters, row menus and pills (migration `b8e3f1a6c9d2`, `test_finding_lifecycle.py`, `docs/guides/findings.md`).
- [x] Support retesting, remediation notes, change history and evidence-based severity rationale. — Re-test from the row menu and inspector starts a new scan of the target, with `reopened` for issues that come back; remediation in the Fix tab; every change of status, severity, CVSS and rationale kept with before, after and actor and shown in the Timeline; a severity rationale field (migration `d1a5b3c8e2f4`, `test_finding_history.py`, `findingView.spec.ts`).
- [x] Provide filtering, bulk classification, assignment, tags and status summaries. — *Progress:* severity and status filters with counts, search, tags on findings, and bulk triage: Ctrl/Shift selection with one status or severity for up to 500 findings in one request, also for agents (`finding_batch_update`, `test_finding_scoring.py`, `findingSelection.spec.ts`). Assignment: a name per finding, set in the inspector, in bulk or by agents, filtered in the sidebar and by `assignee` (`-` for unassigned), kept in the history (migration `f3c7d5e1a9b2`, `test_finding_assignment.py`, `findingAssignees.spec.ts`).
- [x] Link every finding to source evidence, assets, scan run and relevant scope snapshot. — Findings link to linked requests, matches and attached files (Evidence tab), to their scan (`scan_id`), to assets through the inventory, and keep the scope version, rules and in-scope verdict of when they were recorded (migration `b3e6f1a4c8d2`, `test_finding_scope_snapshot.py`).
- [x] Support import/export of common vulnerability formats via explicitly documented mappings (e.g., SARIF, JSON and CSV). — Export of the filtered findings as JSON, CSV or SARIF 2.1.0 under the export redaction policy, import of the same with a dry-run preview, per-row reasons, targets matched never created and duplicates skipped; one mapping documented both ways in the Findings guide (`app/core/findings/formats/`, `test_finding_transfer.py`, `findingExport.spec.ts`).

### EVIDENCE — Research evidence store [P1]

- [x] Attach HTTP messages, screenshots, logs, files, notes and scanner results to findings. — Requests of the history are linked to findings with a note (history row menu, MCP `finding_request_link`) and listed in the Evidence tab, taken first by Report Studio (migration `b5e9f7a3c2d4`, `test_finding_requests.py`); screenshots, logs and other files attach with their revision pinned (`file_attachments`); notes through the finding annotation and `[[finding:id]]` references; scanner results are the stored signature matches.
- [x] Record provenance, capture timestamp, checksum, actor and relevant application version. — Findings keep source, change history with actors and the recording version; linked requests keep actor, time, version and the SHA-256 of the exchange, with an integrity check against the stored request; captured requests keep their capture time; attachments keep size, SHA-256, pinned revision, actor, time and version (migration `c6f1a8b4d3e5`, `app/core/evidence/digest.py`, `test_evidence_provenance.py`).
- [x] Maintain immutable originals and separately edited/redacted copies. — Captured requests are stored as received (edits in interception are flagged), evidence files keep every revision with its SHA-256 and attachments pin the revision, linked requests keep a digest checked against the stored exchange; **Save a redacted copy** writes a separate file with credentials masked and `origin = file:<id>`, leaving the original untouched (`test_file_redacted_copy.py`, `test_evidence_provenance.py`).
- [x] Add evidence previews, annotation, captions, references and safe export bundles. — Linked requests preview in place (request and response, credentials masked), carry editable captions, link and SHA-256 provenance, and take tags and notes like any record; the evidence bundle is a ZIP of the finding, its requests as HAR, captions, attached files by digest and a SHA-256 manifest, masked under the export policy (`app/services/finding_bundle.py`, `test_finding_bundle.py`, `PFindingRequestPreview.vue`).
- [x] Detect sensitive information before exporting and require review of redaction results. — Finding, HAR and note exports open a review of the credentials the shared detector finds (by kind, part and item) before anything is written, and exporting them unmasked needs an explicit acknowledgement; report exports validate credentials per section and refuse to reveal them past validation without force; asset inventory exports are masked by the export policy (`test_finding_export_review.py`, `test_har_export_review.py`, `test_notes_export_review.py`, `PExportReview.vue`).
- [x] Support per-engagement retention, access permissions and secure deletion policies. — Each vault sets how long its HTTP history is kept and whether stored file contents are overwritten before removal (file deletes, clean-ups and vault deletion); retention never removes annotated requests or finding evidence (now enforced in the shared prune too); access is per token and per vault; the policy is user only (migration `f4c8d2a6b9e3`, `app/services/vault_data_policy.py`, `test_vault_data_policy.py`).

### NOTES — Research notebook [P1/P2]

- [x] Markdown or structured rich-text editor with local autosave, search and revisions. — *Progress (backend, `a3b2ba0`):* Markdown notes per vault (1 MiB, exact bodies), autosave-friendly revisions coalesced per writer within 60 s (200 / 32 MiB kept, restore as a new revision), ranked case-insensitive search with keyset pages; migration `d5a9c3e7f1b4` (`docs/guides/notes.md`, `test_notes_api.py`, `test_notes_revisions.py`, `test_notes_search.py`). Editor interface not built. Interface (`4e07f34`): Notes page with an autosaving Markdown writer, write / split / read views, backend search, revision history with a line diff and restore.
- [x] Organize pages, folders, tags, backlinks and research templates by vault. — *Progress (backend, `a3b2ba0`):* folder tree (8 levels, delete keeps notes), vault research tags on notes (`note_tags`), pins, archive, backlinks per object and per note, built-in journal / hypothesis / checklist / timeline / finding templates (`test_notes_folders.py`, `test_notes_links.py`, `test_notes_isolation.py`). Interface not built. Interface (`4e07f34`): sidebar folder tree (create, rename, delete in place, drag notes and folders), tag chips and picker, template gallery.
- [x] Embed references to findings, HTTP captures, assets, scans and evidence without duplicating data. — *Progress (backend, `a3b2ba0`):* `[[kind:id]]` / `[[kind:id|text]]` for flows, targets, findings, scans, assets, notes, payload collections, attacks and Repeater tabs; only kind and id are stored, labels resolved on read, deleted objects read `exists: false` and never break the note (`test_notes_links.py`). Evidence references wait for the evidence store. Interface (`4e07f34`): `[[` autocomplete over requests, findings, targets, notes, scans, payload collections, attacks and Repeater tabs; reference chips open the object and show missing ones; backlinks on target, finding and request panels with "New note about this".
- [x] Provide checklists, hypotheses, investigation journals and research timelines. — *Progress (backend, `a3b2ba0`):* templates for each, Markdown task counts on every note, MCP `append` for agents' journals (`test_notes_api.py`, `test_mcp_notes.py`). A timeline view is not built. Interface (`4e07f34`): templates in the gallery and the new-note menu, tasks ticked in the reading view.
- [x] Add graph links between related notes and technical entities. — *Progress (backend, `a3b2ba0`):* `GET /notes/graph` and MCP `note_graph`: every note, each referenced object (missing ones flagged) and one edge per reference (`test_notes_links.py`). Graph view not built. Interface (`4e07f34`): backlinks and outgoing links in the note side panel. Graph view (`79a3bf1`).
- [x] Export selected notes to portable Markdown without leaking private references or credentials. — *Progress (backend, `a3b2ba0`):* one note as Markdown with front matter, chosen ids, a folder or the vault as a ZIP; portable mode turns references into plain text and drops every id; export redaction policy (redact / reveal / ask) applies (`test_notes_export.py`). Export menu not built. Interface (`4e07f34`): export of one note or all notes from the side panel under the export policy, probed first.

### REPORT — Report Studio [P1/P2]

- [x] Structured report editor: summary, scope, methodology, findings, evidence, impact, limitations and remediation. — *Progress (backend, `bc3614e`):* reports with ordered sections of twelve kinds (Markdown up to 256 KiB with `[[kind:id]]` references), add / change / append / reorder / exclude / delete, finding sections showing the finding live; migration `c8e2f4a6b9d1` (`docs/guides/reports.md`, `test_reports_api.py`, `test_reports_sections.py`). Interface not built. *Interface (`e91daee`):* outline with drag / Alt+arrow reorder, include and delete, add by kind or finding; live Markdown section editor with autosave; live finding card.
- [x] Provide bug bounty and professional pentest report templates with editable organization branding. — *Progress (backend, `bc3614e`):* `bug_bounty`, `pentest`, `executive` and `custom` templates with written starter text and required sections and details; text branding per report (organisation name, `#rrggbb` accent, footer); logo images not yet (`test_reports_api.py`, `test_reports_render.py`). *Interface (`e91daee`):* template gallery and two-step new report; details and branding form (accent `#rrggbb` checked).
- [x] Generate reports from explicitly selected findings and evidence; preserve source links and provenance. — *Progress (backend, `bc3614e`):* create from chosen finding ids (most severe first), chosen evidence requests plus those linked by notes about the finding, embedded notes; nothing copied, deleted objects read missing; appendix Sources table with Phantom finding and request ids (`test_reports_api.py`, `test_reports_sections.py`). *Interface (`e91daee`):* findings chosen explicitly (severity chips, rejected ones flagged), auto evidence and notes; requests are now chosen per finding in the new-report flow (`PReportEvidencePick.vue`, `newReportEvidence.spec.ts`).
- [x] Export Markdown, HTML and PDF; evaluate DOCX where demanded by customers. — *Progress (backend, `bc3614e`):* Markdown with front matter and a standalone HTML page (safe Markdown subset, no-script CSP, print CSS with a page per finding) under the export redaction policy; PDF is the interface printing the HTML; DOCX not evaluated (`test_reports_export.py`, `test_reports_render.py`). *Interface (`e91daee`):* Markdown, HTML and PDF via the print dialog under the export policy, 409 errors with Export anyway. DOCX evaluated: not built until a program or client requires it, since Word opens the HTML export and the document model is format-neutral (`docs/guides/reports.md`, Rendering).
- [x] Provide executive and technical views, severity tables, appendix and retest summary. — *Progress (backend, `bc3614e`):* `view=executive` (summary and tables) or `technical`; severity counts and findings tables, retest table from finding status, appendix provenance (`test_reports_render.py`). *Interface (`e91daee`):* Technical / Executive switch drives preview and export; sandboxed preview.
- [x] Validate required sections, broken references, redaction and version metadata before export. — *Progress (backend, `bc3614e`):* `GET /validate`: required sections and details (version always), missing findings / evidence / notes / references, rejected and unvalidated findings, credentials counted per section, starter text, open comments; export and finalising refuse blocking errors (409) unless forced (`test_reports_export.py`). *Interface (`e91daee`):* validation panel, outline dots and per-section issues leading to the fix; export and finalising show blocking errors.
- [x] Support report snapshots, revisions, reviewer comments and approval history. — *Progress (backend, `bc3614e`):* immutable snapshots (document, Markdown, SHA-256) on demand and on finalising, draft → in_review → final with lock and reopen, comments per report or section with resolve; approval history beyond final snapshots and section revisions not yet (`test_reports_review.py`). *Interface (`e91daee`):* status moves with confirmed finalising, lock banner, comments with resolve, snapshots drawer. Approval history: every move through review with actor, forced finalising and the reviewer's note (`GET /history`, migration `c9f4a2b7d1e3`, `test_report_approvals.py`), shown in the Snapshots drawer. Section revisions: the version a change replaces is kept with its writer (one per writing burst, always on a change by someone else and before a restore), listed newest first and restorable from **History** in the studio, also readable by agents (`report_section_revisions`; migration `e2b6c4d9f1a7`, `test_report_revisions.py`).
- [x] Keep external submission separate from report generation and require final human review. — *Progress (backend, `bc3614e`):* nothing is ever submitted; agents draft and comment but finalising, reopening and export are refused in agent calls (`test_mcp_reports.py`). Submission itself remains planned. *Interface (`e91daee`):* finalising is a confirmed user action; nothing is submitted.

**Exit gate:** A researcher can complete an authorized engagement, organize evidence, review findings, and export a consistent, redacted report without leaving Phantom.
