File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# OpenSSF Scorecard — supply-chain security health metrics
22# Docs: https://github.com/ossf/scorecard-action
3+ #
4+ # Note: Scorecard requires read access to the GitHub GraphQL API. On private
5+ # repos without GitHub Advanced Security this fails with "Resource not
6+ # accessible by integration". We skip the job on private repos until the
7+ # repo is made public or GHAS is enabled.
38name : OpenSSF Scorecard
49
510on :
@@ -15,10 +20,12 @@ permissions: read-all
1520jobs :
1621 analysis :
1722 name : Scorecard analysis
23+ # Scorecard cannot run on private repos without GHAS — skip to keep CI green.
24+ if : github.event.repository.private == false
1825 runs-on : ubuntu-latest
1926 permissions :
20- security-events : write # upload SARIF to Code Scanning (no-op on private repos without GHAS)
21- id-token : write # publish to OSSF registry (optional)
27+ security-events : write
28+ id-token : write
2229 contents : read
2330 actions : read
2431
3340 with :
3441 results_file : results.sarif
3542 results_format : sarif
36- publish_results : false # private repo — keep results internal
43+ publish_results : false
3744
3845 - name : Upload artifact
3946 if : ${{ !cancelled() && hashFiles('results.sarif') != '' }}
4451 retention-days : 30
4552
4653 - name : Upload to code-scanning
47- # Code-scanning upload requires GHAS on private repos. Skip when
48- # no SARIF was produced and tolerate the GHAS-not-available case.
4954 if : ${{ !cancelled() && hashFiles('results.sarif') != '' }}
5055 continue-on-error : true
5156 uses : github/codeql-action/upload-sarif@f411752efdf656cb71aa17b755b22c890960da1d # v3.35.5
You can’t perform that action at this time.
0 commit comments