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
+ ---
5
4
name : Scorecard supply-chain security
6
5
on :
7
6
# For Branch-Protection check. Only the default branch is supported. See
8
7
# 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"]
10
12
# To guarantee Maintained check is occasionally updated. See
11
13
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained
12
14
schedule :
15
+ # Weekly on Fridays.
13
16
- cron : ' 18 9 * * 5'
14
- push :
15
- branches : [ master ]
16
17
17
18
# Declare default permissions as read only.
18
- permissions : read-all
19
+ permissions : {}
19
20
20
21
jobs :
21
22
analysis :
@@ -32,34 +33,30 @@ jobs:
32
33
33
34
steps :
34
35
- name : " Checkout code"
35
- uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
36
+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
36
37
with :
37
38
submodules : true
38
39
persist-credentials : false
39
40
40
41
- name : " Run analysis"
41
- uses : ossf/scorecard-action@05b42c624433fc40578a4040d5cf5e36ddca8cde # v2.4.2
42
+ uses : ossf/scorecard-action@05b42c624433fc40578a4040d5cf5e36ddca8cde # v2.4.2
42
43
with :
43
44
results_file : results.sarif
44
45
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.
49
48
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
58
54
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
61
58
- name : " Upload artifact"
62
- uses : actions/upload-artifact@97a0fba1372883ab732affbe8f94b823f91727db # v3.pre.node20
59
+ uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
63
60
with :
64
61
name : SARIF file
65
62
path : results.sarif
68
65
# Upload the results to GitHub's code scanning dashboard (optional).
69
66
# Commenting out will disable upload of results to your repo's Code Scanning dashboard
70
67
- 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
72
69
with :
73
70
sarif_file : results.sarif
0 commit comments