Field manual · 08

Evidence, findings and verification

The immutable vault, hashing and redaction, linking proof to findings, what "verified" actually requires, finding quality and SARIF export.

A finding is an opinion until something proves it. The evidence vault is where that something lives, hashed and immutable; the link between a record and a finding is what the report cites.

The vault: nine kinds, one immutable file each

Every capture is written once under $DSH_HOME/redteam/evidence/<session>/<evidenceId>/<slug>.<ext> and never modified. The vault accepts nine kinds: screenshot, http, tool-output, json, text, note, file, har and scan. The kind picks the panel tab and the bundle folder.

Limits are fixed: 32 MiB per record, 5000 records per session and 256 MiB for an evidence package. Directories are created 0700, files 0600, and every write goes through a temporary file plus rename. A new record is created with an exclusive flag, so an existing file can never be overwritten — the only way to add evidence is to add a record.

Evidence drawer listing a screenshot, a note and an HTTP exchange, each with size, SHA-256, copy-hash and linked finding
Figure 8.1 — The Evidence drawer: kind tabs, size, collection time, SHA-256 with copy action, link state and Open/Download. “Download evidence package” builds the vault-only ZIP described in chapter 10.

Each record directory holds the artefact and a meta.json copy of the record. Alongside them, the session keeps an authoritative manifest.json (rewritten atomically on every change) and an append-only manifest.jsonl. If the manifest is missing or corrupt, the vault does not fail: it scans the record directories, rebuilds the index and logs that it healed it. That is a recovery path, not a licence to edit files by hand.

Hashing and redaction

The SHA-256 is computed over the bytes that were actually stored, not over the source. That distinction matters: text evidence is redacted before hashing, so the hash you cite in a report is the hash of the file a recipient can verify. File bytes are copied as-is and never rewritten — a screenshot hashes exactly as captured.

Redaction covers the headers that carry credentials — Authorization, Proxy-Authorization, Cookie, Set-Cookie, X-Api-Key — keeping the header name and masking the value, plus query parameters named like token, api_key, key or password in stored targets. HTTP evidence is redacted by default; other kinds are redacted when you ask for it.

Redaction is a net, not a guarantee

Only named headers and query keys are masked. A secret in a response body, a custom X-Company-Key header, a token inside a JSON field or a password in a screenshot survives. Review sensitive captures before you attach them, and prefer a short excerpt that proves the issue over a full dump.

The manifest and the record shape

A record carries id, kind, title, createdAt, actor, target, source, mime, bytes, sha256, file (relative to the session), originalName, links, meta, sensitive and redacted. Ids follow ev_<base36>_<random>; the file is a title slug plus a MIME-derived extension.

Evidence vault layout: session directory, record directory with artefact and meta.json, session manifest and append-only manifest log $DSH_HOME/redteam/evidence/<session>/ manifest.json manifest.jsonl ev_mwyzd2gu_lx0t4snwej/ web-assessment-http-….json meta.json ev_mwz0qays_wbj4lgy03h/ nuclei-on-http-…-exit-0.txt meta.json manifest.json Authoritative index, rewritten atomically One entry per record, ordered by creation Missing/corrupt → rebuilt from meta.json manifest.jsonl Append-only history: the same record snapshot on add and on every link Audit copy, never rewritten in place
Figure 8.2 — Vault layout. The artefact is written once; meta.json is the per-record copy; the manifest is the index and the JSONL is the history.

Textual kinds — text, note, json, http, tool-output, scan, har — are treated as text for preview and redaction even when the MIME type is vague. pentest_evidence_get returns the record plus a bounded preview; binary content is never inlined.

Linking proof to findings

There are two ways to connect a record to a finding, and they are not equivalent. pentest_attach_evidence links an existing record to any node — a finding, a fact or an asset — and is idempotent: linking twice does not duplicate the link, and the list is capped at 200 entries. pentest_add_finding accepts evidenceIds at creation time, validates every id against the vault, links the ones that exist and returns the rest in missingEvidenceIds with a warning.

{ "kind": "http", "title": "GET /ping command injection",
  "text": "GET /ping?host=127.0.0.1;id HTTP/1.1\nHost: 192.168.100.101:8081\n\nuid=1000(support)",
  "target": "http://192.168.100.101:8081/ping",
  "linkNodeId": "nd_mwyze8zm0faaxk" }

That validation is the point: an id that does not resolve is not proof, and silently attaching it would make the report cite a file nobody can open. When the tool answers with missingEvidenceIds, fix the id or add the record — do not move on. Records added with linkNodeId are linked at creation; the rest can be attached later.

What “verified” actually requires

pentest_verify answers one question: does the evidence already in the engagement prove the claimed weakness? It is deterministic, sends nothing, and returns confirmed, refuted or inconclusive with named checks, missing signals and confidence. A confirmed verdict with apply: true lifts an unverified finding to verified and creates a fact node with a proves edge. It never sets exploited, and never overrides an existing verdict — history is appended, not rewritten.

Both halves of a signal are required, so “verified” is stronger than “the endpoint answered 200”: CWE-78 wants a command-control payload and observed output; CWE-918 wants an SSRF-shaped request and a callback or internal response. With no recognised CWE the result is inconclusive, and the report says so.

The four-part test

Before calling anything verified, name: the exact request or command, the captured response, the evidence id that holds it, and the claim it supports. If one is missing, the finding stays unverified.

Finding quality: the fields that make it usable

A finding is only as good as its metadata. pentest_add_finding takes title, detail, asset, severity, cvss, cvssVector, cwe, owasp, wstgIds, evidence, evidenceIds, impact, remediation, factId, toolRunId, phase and status. Severity is derived from cvss when you omit it; without a score it falls back to medium when there is proof and info when there is not.

FieldWhy it mattersSample value
cvss + cvssVectorSeverity bands, dashboard mix and the detailed CVSS breakdown all come from these9.8 · CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
cweSelects the deterministic verifier and the SARIF ruleCWE-78
owasp / wstgIdsCompliance mapping and the WSTG coverage countA03:2021 · WSTG-INPV-12
impactFeeds the executive summary and the SARIF message“Unauthenticated RCE on the entry host”
remediationPrinted with every finding and in the fix-first listAllow-list hosts; no shell interpolation

The lab sample is honest about gaps: its three findings carry CVSS, CWE, OWASP, WSTG and a real remediation, and the report prints “No business impact statement was recorded” because nobody wrote one. That is better than inventing impact — but writing the impact sentence is the difference between a finding a developer can act on and one they argue with.

SARIF export for CI and triage

pentest_sarif builds a SARIF 2.1.0 log from the recorded findings and writes it next to the reports as <engagement>-findings-<stamp>.sarif; write: false returns the log without touching disk. Each finding becomes one result: rule id is the CWE, level maps critical/high to error, medium to warning, low and info to note, and the message combines title and impact.

Two details make it usable in a pipeline. The fingerprint is a SHA-256 of id, title and asset under partialFingerprints["dshFinding/v1"], so a re-run against the same finding is recognised rather than duplicated. And the exporter is deliberately blind: it never reads the vault and never includes request or response bodies, headers or tool output; it only scrubs credentials out of artifact URLs. Output is capped at 1000 results, with a truncated flag when the engagement holds more.

The evidence register in the report

The client report renders the vault as a register, grouped by kind, with the identifiers, hashes and links that make each claim checkable. This is the real register from the published sample — ten records, 10 KB total, grouped as nine tool outputs and one web-assessment JSON:

IDTitleBytesSHA-256 (first 16)Linked findings
ev_mwz0qays_wbj4lgy03hnuclei on http://192.168.100.101:8081/ (exit 0)2 KBc3cb42939e01282cnd_mwz0qays7huu5k
ev_mwyzg3ir_zfjgnv51rvcurl on /ping (exit 0)399 B7d03c6a9460ee9c9nd_mwyzg3iqwtonpd
ev_mwyzfcho_mwoo5m09lqcurl on /ping (exit 0)455 Ba8c8721b39a445b5nd_mwyzfchonu7tzg, nd_mwyzfk7s06tu9p
ev_mwyzd2gu_lx0t4snwejWeb assessment (JSON)4.9 KBb9e3d702ab5200bdnone

The trail closes on itself: the register lists a SHA-256, the file sits in the vault under that hash, and the same hash appears in the bundle's manifest.json and sha256sums.txt. A recipient can verify the chain without trusting the narrative — the point of storing evidence rather than describing it.

Deep reference: documentation, report design, wiki, sample artefacts, resources.

What good looks like

  • One record per observation, never one giant dump; the hash is over the redacted bytes you keep.
  • Every finding that claims proof has a linked evidence id, and missingEvidenceIds is empty in the call that created it.
  • Sensitive captures reviewed by a human, because redaction covers named headers and query keys only.
  • verified backed by a verifier verdict or an equally explicit reproduction — not by a status code.
  • SARIF generated from stored findings, so CI sees the same set the client report describes.