Skip to content

gemaraconv: SARIF results should carry the Gemara result status (and ideally kind + fingerprints) #123

Description

@jmeridth

gemaraconv/sarif.go maps Gemara statuses to SARIF purely via level (Failed → error, NeedsReview/Unknown → warning, Passed → note) and omits result.kind and partialFingerprints.

This causes problems for GitHub Code Scanning consumers (context: revanite-io/osps-baseline-action#17, mitigation on the action side in revanite-io/osps-baseline-action#54):

  1. GitHub opens an alert for every uploaded result regardless of level, so NeedsReview and even Passed results become permanently open alerts that can never auto-close, since the evaluator re-emits them on every run by design.
  2. Downstream tools that want to filter (e.g. upload only Failed results) must infer status from level, which conflates NeedsReview with Unknown and is fragile if the mapping ever changes.
  3. Per SARIF 2.1.0, NeedsReview is semantically kind: "review" and Passed is kind: "pass"; with no kind set, every result defaults to kind: "fail", which asserts a confirmed problem.
  4. Without partialFingerprints and with a synthetic artifact URI, alert matching degrades to ruleId + location, so a dismissed NeedsReview alert can mask a later genuine failure of the same control.

Proposal: emit the Gemara status in result.properties (e.g. "gemara/result": "NeedsReview"), set result.kind per the spec, and consider a converter option like WithExcludedStatuses(...) so callers can drop statuses at generation time. Happy to send a PR if the direction sounds right.

@jpower432 @eddie-knight would appreciate your feedback on the direction here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions