Skip to content

fix(ci): unique SARIF category per security workflow - #110

Merged
agjs merged 1 commit into
mainfrom
fix/ci-unique-sarif-categories
Jun 2, 2026
Merged

fix(ci): unique SARIF category per security workflow#110
agjs merged 1 commit into
mainfrom
fix/ci-unique-sarif-categories

Conversation

@agjs

@agjs agjs commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

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 by continue-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 SARIF step was cancelled → red X on main.

Fix

Give each workflow an area-scoped SARIF category so the uploads are distinct analyses that never collide:

tool categories
gitleaks gitleaks-api, gitleaks-ui, gitleaks-docs, gitleaks-compose, gitleaks-bootstrap
semgrep semgrep-api, semgrep-ui
osv-scanner osv-scanner-api, osv-scanner-ui, osv-scanner-docs

Bonus: code-scanning results are now attributable per area instead of clobbering each other.

10 files changed, 1 line each (only the category: value).

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.
@github-advanced-security

Copy link
Copy Markdown

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:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

@agjs
agjs merged commit b2c14ad into main Jun 2, 2026
28 checks passed
@agjs
agjs deleted the fix/ci-unique-sarif-categories branch June 2, 2026 08:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants