Feat: Add republish-filtered-sarif action for simplified PR Code Scanning
#64
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.
Alternative SARIF Republishing:
republish-filtered-sarifActionA new GitHub Action,
republish-filtered-sarif, is now available to streamline Code Scanning results presentation on Pull Requests within a monorepo.Problem Addressed:
In monorepo PR workflows, Code Scanning checks for unscanned projects may appear incomplete. While the existing
republish-sarifaction addresses this, it often requires maintaining aprojects.jsonfile to define all projects for republishing. This can be an overhead for users.Solution (
republish-filtered-sarifAction):This composite action provides a quick, easy, and
projects.json-agnostic way to ensure a complete Code Scanning overview on PRs. It works by:mainbranch.excluded-categoryinput, which should be the exact category string used in the CodeQLanalyzestep for the project currently being scanned in the PR. This allows the action to exclude that specific project's SARIF from being downloaded and re-uploaded.mainbranch, it selects and downloads only the most recent SARIF.Key Benefit:
This action simplifies the republishing process by removing the need for a
projects.jsonfile for this step. Users provide the CodeQLcategoryvalue of the currently scanned project, and the action automatically handles the rest, offering a streamlined, category-based approach for comprehensive PR security insights.Example Usage: