fix(ci): unique SARIF category per security workflow - #110
Merged
Conversation
All gitleaks workflows uploaded SARIF under category 'gitleaks' (×5), all semgrep under 'semgrep' (×2), all osv under 'osv-scanner' (×3). GitHub code scanning dedupes uploads by (commit, ref, category), so a push touching multiple areas fired several workflows that raced to upload the same category for the same commit; GitHub cancelled the stragglers. A cancelled step is not rescued by continue-on-error (that only covers failures), so the job surfaced as failure on main even though the scan itself passed and the PR was green. Give each workflow an area-scoped category (gitleaks-api/-ui/-docs/-compose/ -bootstrap, semgrep-api/-ui, osv-scanner-api/-ui/-docs) so the uploads are distinct analyses that never collide — and code-scanning results become attributable per area instead of clobbering each other.
|
You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool. What Enabling Code Scanning Means:
For more information about GitHub Code Scanning, check out the documentation. |
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.
Why
A push touching multiple areas fires several security workflows at once. They all uploaded their SARIF under the same category (
gitleaks×5,semgrep×2,osv-scanner×3). GitHub code scanning dedupes uploads by(commit, ref, category), so the concurrent uploads collided and GitHub cancelled the stragglers. A cancelled step is not rescued bycontinue-on-error(that only covers failures), so a job surfaced as failure on main even though the scan passed and the PR was green.This is exactly what happened right after #109 merged: the gitleaks scan passed but the
Upload SARIFstep was cancelled → red X on main.Fix
Give each workflow an area-scoped SARIF category so the uploads are distinct analyses that never collide:
gitleaks-api,gitleaks-ui,gitleaks-docs,gitleaks-compose,gitleaks-bootstrapsemgrep-api,semgrep-uiosv-scanner-api,osv-scanner-ui,osv-scanner-docsBonus: code-scanning results are now attributable per area instead of clobbering each other.
10 files changed, 1 line each (only the
category:value).