Files
rengine/shared/definitions/evidence.py
T
Yogesh OjhaandClaude Opus 5 ce6dda2072 fix(copy): strip narration from the coverage and evidence strings
The evidence ladder, the vulnerability coverage strip and the surface
scope strip each argued with the reader or narrated a consequence. Every
description is now the fact alone.

- evidence help: drop "Nothing was sent to the asset", "only a
  vulnerable one returns" and the matcher narration
- coverage summary: a list of facts, and "covered by an equivalent"
  gains its noun
- "Scanner coverage" subtitle decodes the dash instead of restating the
  labels below it
- dropped targets read as dropped, thousands-separated
- scanner errors lose the "and did not run" tail
- scope strip: "9 of 16 targets scanned", no "reading"
- CVE page: the Exploitation panel no longer restates its own title

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Fmke4AVSoYLQdc1rcAo7ML
2026-09-15 08:17:19 +05:30

40 lines
1.2 KiB
Python

"""The evidence ladder: how a finding or inference was established."""
from __future__ import annotations
from enum import StrEnum
class Evidence(StrEnum):
INFERRED = "inferred"
OBSERVED = "observed"
CORROBORATED = "corroborated"
PROVEN = "proven"
EVIDENCE_ORDER: tuple[str, ...] = tuple(e.value for e in Evidence)
EVIDENCE_RANK: dict[str, int] = {value: i for i, value in enumerate(EVIDENCE_ORDER)}
EVIDENCE_LABELS: dict[str, str] = {
Evidence.INFERRED.value: "Inferred",
Evidence.OBSERVED.value: "Observed",
Evidence.CORROBORATED.value: "Corroborated",
Evidence.PROVEN.value: "Proven",
}
EVIDENCE_HELP: dict[str, str] = {
Evidence.INFERRED.value: "The reported version falls inside the affected range.",
Evidence.OBSERVED.value: "A check matched the response it received.",
Evidence.CORROBORATED.value: "Two independent signals agree at the same location.",
Evidence.PROVEN.value: "The asset produced an out-of-band interaction.",
}
def evidence_rank(value: str | None) -> int:
return EVIDENCE_RANK.get(value or "", -1)
def evidence_label(value: str | None) -> str:
return EVIDENCE_LABELS.get(value or "", "")