Phase 2e: add --sarif output and fix broken GitHub Action -o flag#123
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
--sariffor GitHub Code Scanning integration — the last item in the Phase 2 CIprimitives sequence. While wiring it into the GitHub Action, found and fixed a real bug:
entrypoint.shstill passed the removed-o/--outputflag, so any workflow setting theAction's
outputinput has been failing outright since the Phase 0 cleanup.Changes
SARIF output
--sarif: writes a SARIF 2.1.0 report, independent of--format(always writtenwhen the flag is set, regardless of which other formats are selected).
SARIF levels (CRITICAL/HIGH -> error, MEDIUM -> warning, LOW/UNKNOWN -> note).
PrimaryURL becomes the rule's helpUri when present.
file on disk) fall back to the image name so results are never dropped. Compose
findings get a line-number region parsed from their
file:service:lineTarget.GitHub Action fix
--output-dir. Added output_dir, severity, fail_on, format, and sarif as new Action
inputs so the Phase 2 CLI surface is usable from the Action.
Testing
ruff check .passes.pytest: 141 passed (+15: SARIF structure/dedup/region/severity-mapping/fallbacktests, plus CLI-level --sarif wiring tests).
image-only artifact fallback, and entrypoint.sh syntax.
Notes
This closes out Phase 2 (CI primitives): --severity, --fail-on + exit codes,
--format/--output-dir, --json, --sarif.