pub struct Finding {
pub severity: Severity,
pub category: FindingCategory,
pub path: Option<PropagationPath>,
pub nodes_involved: Vec<NodeId>,
pub message: String,
pub recommendation: Recommendation,
pub source: FindingSource,
pub extras: FindingExtras,
}Expand description
A finding is a concrete, actionable authority issue.
Fields§
§severity: Severity§category: FindingCategory§path: Option<PropagationPath>§nodes_involved: Vec<NodeId>§message: String§recommendation: Recommendation§source: FindingSourceProvenance of this finding. Defaults to BuiltIn for backward
compatibility with code/JSON that predates the field — every
in-tree built-in rule sets this explicitly. Deserialization of older
JSON without the field treats the finding as built-in.
extras: FindingExtrasOptional metadata (group id, time-to-fix, compensating controls,
suppression markers). Flattens into the JSON object so consumers
see top-level fields — see FindingExtras for individual semantics.
Implementations§
Source§impl Finding
impl Finding
Sourcepub fn with_time_to_fix(self, effort: FixEffort) -> Self
pub fn with_time_to_fix(self, effort: FixEffort) -> Self
Builder helper: attach a time_to_fix annotation to this finding.
Call sites: let f = Finding { ... }.with_time_to_fix(FixEffort::Trivial);
Sourcepub fn with_compensating_control(self, control: impl Into<String>) -> Self
pub fn with_compensating_control(self, control: impl Into<String>) -> Self
Builder helper: append a compensating control description and downgrade severity by one tier (Critical -> High -> Medium -> Low -> Info). Records the original severity so the audit trail survives.