Skip to content

Commit 4a45f58

Browse files
authored
ci: use a fixed security scan category to avoid upload issues (#116)
1 parent 615ff7c commit 4a45f58

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

.github/workflows/ci.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,13 @@ jobs:
101101
uses: github/codeql-action/upload-sarif@60168efe1c415ce0f5521ea06d5c2062adbeed1b # v3.28.17
102102
with:
103103
sarif_file: results.sarif
104-
# This is required to avoid scan results to be overridden by other types of workflows (e.g., maintenance release)
105-
# See https://docs.github.com/en/code-security/code-scanning/integrating-with-code-scanning/sarif-support-for-code-scanning#uploading-more-than-one-sarif-file-for-a-commit
106-
category: ${{ github.workflow }}
104+
# Use a fixed category to ensure consistent configuration across all SARIF uploads.
105+
#
106+
# This prevents the GitHub warning: "Code scanning cannot determine the alerts introduced by this pull request,
107+
# because 1 configuration present on refs/heads/main was not found".
108+
# The warning occurs when different workflows use different categories for SARIF files on the same branch.
109+
#
110+
# Using a single, consistent category (e.g., 'trivy') ensures all uploads are correctly associated.
111+
#
112+
# Additional details: https://docs.github.com/en/code-security/code-scanning/integrating-with-code-scanning/sarif-support-for-code-scanning#uploading-more-than-one-sarif-file-for-a-commit
113+
category: trivy

0 commit comments

Comments
 (0)