Skip to content

Commit c46b79f

Browse files
ci(scorecard): stop filing repository grades as code-scanning alerts (#41)
* ci(scorecard): stop filing repository grades as code-scanning alerts * docs(scorecard): name code scanning as the destination that was dropped
1 parent afe6127 commit c46b79f

1 file changed

Lines changed: 24 additions & 5 deletions

File tree

‎.github/workflows/scorecard.yml‎

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,11 @@ jobs:
1515
runs-on: ubuntu-latest
1616
permissions:
1717
contents: read
18-
security-events: write
18+
# No security-events: write. This job no longer uploads SARIF to code
19+
# scanning, so it needs no permission to write code-scanning alerts. It
20+
# does still upload results.sarif as a build artifact below. id-token
21+
# remains because publish_results signs the result for the public
22+
# Scorecard API.
1923
id-token: write
2024
steps:
2125
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
@@ -36,7 +40,22 @@ jobs:
3640
path: results.sarif
3741
retention-days: 5
3842

39-
- name: Upload to code-scanning
40-
uses: github/codeql-action/upload-sarif@99df26d4f13ea111d4ec1a7dddef6063f76b97e9 # v4
41-
with:
42-
sarif_file: results.sarif
43+
44+
# Scorecard results are NOT uploaded to code scanning, deliberately.
45+
#
46+
# Scorecard grades repository practice: pinned dependencies, branch
47+
# protection, what share of pull requests carried an approving review.
48+
# Code scanning is the surface for defects in this repository's code, and
49+
# routing a grade into it files each check as a dismissible alert with a
50+
# severity attached.
51+
#
52+
# Those alerts also do not stay dismissed. GitHub matches results across
53+
# uploads by rule and fingerprint, and a Scorecard result whose identity
54+
# shifts arrives as a NEW alert that a previous dismissal does not cover.
55+
# The outcome was a standing queue of security-labelled items that no code
56+
# change could close.
57+
#
58+
# The results remain public and retrievable: publish_results above sends
59+
# them to the OpenSSF Scorecard API that backs the badge and the public
60+
# viewer, and the artifact above keeps the raw SARIF. This narrows where
61+
# the grade is displayed. It does not withhold it.

0 commit comments

Comments
 (0)