Skip to content

Evidence chains

Module: src/report/evidence.ts.

The evidence reporter is a pure formatter. It takes the signals that classification already attached to a finding and renders the evidence chain — it does no analysis of its own.

function renderEvidenceChain(finding: ClassifiedFinding): string;
function renderFindings(findings: ClassifiedFinding[]): string;
interface EvidenceSignal {
ok: boolean | null; // true → ✓, false → ✗, null → •
text: string;
}

A null () marks a signal that wasn’t checked — currently coverage, whose ingestion is planned.

Keeping signal-truth at the point of decision (classify) and formatting in the reporter means the two can never disagree. The evidence box always shows exactly what the classifier reasoned about — which is the whole point of a trust artifact.

  • src/report/terminal.ts — the default human view: a summary line plus evidence chains.
  • src/report/json.ts — the --json serializer (a stable, flat finding shape).
  • src/report/sort.tssortWorstFirst (tier severity → file → line).