1- # This workflow uses actions that are not certified by GitHub. They are provided
2- # by a third-party and are governed by separate terms of service, privacy
3- # policy, and support documentation.
4-
1+ # .github/workflows/scorecard.yml
2+ # Reference: https://github.com/ossf/scorecard/blob/main/.github/workflows/scorecard-analysis.yml
3+ ---
54name : Scorecard supply-chain security
65on :
76 # For Branch-Protection check. Only the default branch is supported. See
87 # https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection
9- branch_protection_rule :
8+ # branch_protection_rule:
9+ push :
10+ # Only the default branch is supported.
11+ branches : ["main", "master"]
1012 # To guarantee Maintained check is occasionally updated. See
1113 # https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained
1214 schedule :
15+ # Weekly on Fridays.
1316 - cron : ' 18 9 * * 5'
14- push :
15- branches : [ master ]
1617
1718# Declare default permissions as read only.
18- permissions : read-all
19+ permissions : {}
1920
2021jobs :
2122 analysis :
@@ -32,34 +33,30 @@ jobs:
3233
3334 steps :
3435 - name : " Checkout code"
35- uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
36+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
3637 with :
3738 submodules : true
3839 persist-credentials : false
3940
4041 - name : " Run analysis"
41- uses : ossf/scorecard-action@05b42c624433fc40578a4040d5cf5e36ddca8cde # v2.4.2
42+ uses : ossf/scorecard-action@05b42c624433fc40578a4040d5cf5e36ddca8cde # v2.4.2
4243 with :
4344 results_file : results.sarif
4445 results_format : sarif
45- # (Optional) "write" PAT token. Uncomment the `repo_token` line below if:
46- # - you want to enable the Branch-Protection check on a *public* repository, or
47- # - you are installing Scorecard on a *private* repository
48- # To create the PAT, follow the steps in https://github.com/ossf/scorecard-action?tab=readme-ov-file#authentication-with-fine-grained-pat-optional.
46+ # Read-only PAT token. To create it,
47+ # follow the steps in https://github.com/ossf/scorecard-action#pat-token-creation.
4948 repo_token : ${{ secrets.SCORECARD_TOKEN }}
50- # Public repositories:
51- # - Publish results to OpenSSF REST API for easy access by consumers
52- # - Allows the repository to include the Scorecard badge.
53- # - See https://github.com/ossf/scorecard-action#publishing-results.
54- # For private repositories:
55- # - `publish_results` will always be set to `false`, regardless
56- # of the value entered here.
57- publish_results : false
49+ # Publish the results to enable scorecard badges. For more details, see
50+ # https://github.com/ossf/scorecard-action#publishing-results.
51+ # If you are installing the action on a private repo, set it to `publish_results: false`
52+ # or comment out the following line.
53+ publish_results : true
5854
59- # Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
60- # format to the repository Actions tab.
55+ # Upload the results as artifacts (optional). Commenting out will disable
56+ # uploads of run results in SARIF format to the repository Actions tab.
57+ # https://docs.github.com/en/actions/advanced-guides/storing-workflow-data-as-artifacts
6158 - name : " Upload artifact"
62- uses : actions/upload-artifact@97a0fba1372883ab732affbe8f94b823f91727db # v3.pre.node20
59+ uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
6360 with :
6461 name : SARIF file
6562 path : results.sarif
6865 # Upload the results to GitHub's code scanning dashboard (optional).
6966 # Commenting out will disable upload of results to your repo's Code Scanning dashboard
7067 - name : " Upload to code-scanning"
71- uses : github/codeql-action/upload-sarif@1b1aada464948af03b950897e5eb522f92603cc2 # v3.24.9
68+ uses : github/codeql-action/upload-sarif@d6bbdef45e766d081b84a2def353b0055f728d3e # v3.29.3
7269 with :
7370 sarif_file : results.sarif
0 commit comments