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):
- 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.
- 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.
- 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.
- 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.
gemaraconv/sarif.gomaps Gemara statuses to SARIF purely vialevel(Failed → error, NeedsReview/Unknown → warning, Passed → note) and omitsresult.kindandpartialFingerprints.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):
level, which conflates NeedsReview with Unknown and is fragile if the mapping ever changes.kind: "review"and Passed iskind: "pass"; with nokindset, every result defaults tokind: "fail", which asserts a confirmed problem.partialFingerprintsand 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"), setresult.kindper the spec, and consider a converter option likeWithExcludedStatuses(...)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.