Skip to content

refactor(prover): define and surface accepted-risk provenance #2413

Description

@elezar

Description

Define how accepted-risk attribution is retained and surfaced when findings are accepted.

The accepted-risk loader parses accepted_by, but matching and rendering never use it. Fully accepted findings retain only one reason, and partially accepted findings discard the provenance of the paths that matched accepted-risk entries.

Context

Identified while reviewing the call chain rooted at prove() after #2395.

Relevant code:

  • crates/openshell-prover/src/accepted_risks.rs
  • crates/openshell-prover/src/finding.rs
  • crates/openshell-prover/src/report.rs

This is audit-facing behavior, so the representation should be agreed before implementation. In particular, define whether provenance belongs on findings, individual paths, or a separate acceptance result.

Definition of Done

  • Define the accepted-risk provenance model, including accepted_by and reason.
  • Preserve provenance when multiple accepted-risk entries match.
  • Define and preserve provenance for partially accepted findings.
  • Surface the agreed attribution in relevant report or structured output.
  • Tests cover complete, partial, pathless, and multiple-entry acceptance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    state:staleInactive item at risk of automatic closure.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions