44
55name : Scorecard supply-chain security
66on :
7- # For Branch-Protection check. Only the default branch is supported. See
8- # https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection
97 branch_protection_rule :
10- # To guarantee Maintained check is occasionally updated. See
11- # https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained
128 schedule :
139 - cron : ' 41 10 * * 2'
1410 push :
1511 branches : ['main']
1612
17- # Declare default permissions as read only.
1813permissions : read-all
1914
2015jobs :
2116 analysis :
2217 name : Scorecard analysis
2318 runs-on : ubuntu-latest
2419 permissions :
25- # Needed to upload the results to code-scanning dashboard.
2620 security-events : write
27- # Needed to publish results and get a badge (see publish_results below).
2821 id-token : write
29- # Uncomment the permissions below if installing in a private repository.
30- # contents: read
31- # actions: read
3222
3323 steps :
3424 - name : ' Checkout code'
35- uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
25+ uses : actions/checkout@v4
3626 with :
3727 persist-credentials : false
3828
@@ -41,32 +31,17 @@ jobs:
4131 with :
4232 results_file : results.sarif
4333 results_format : sarif
44- # (Optional) "write" PAT token. Uncomment the `repo_token` line below if:
45- # - you want to enable the Branch-Protection check on a *public* repository, or
46- # - you are installing Scorecard on a *private* repository
47- # To create the PAT, follow the steps in https://github.com/ossf/scorecard-action?tab=readme-ov-file#authentication-with-fine-grained-pat-optional.
48- # repo_token: ${{ secrets.SCORECARD_TOKEN }}
49-
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.
5734 publish_results : true
5835
59- # Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
60- # format to the repository Actions tab.
36+ # Upload the results as artifacts
6137 - name : ' Upload artifact'
62- uses : actions/upload-artifact@ff15f0306b3f739f7b6fd43fb5d26cd321bd4de5 # v3.pre.node20
38+ uses : actions/upload-artifact@v4
6339 with :
6440 name : SARIF file
6541 path : results.sarif
6642 retention-days : 5
6743
68- # Upload the results to GitHub's code scanning dashboard (optional).
69- # Commenting out will disable upload of results to your repo's Code Scanning dashboard
44+ # Upload the results to GitHub's code scanning dashboard
7045 - name : ' Upload to code-scanning'
7146 uses : github/codeql-action/upload-sarif@dd746615b3b9d728a6a37ca2045b68ca76d4841a # v3
7247 with :
0 commit comments