1
1
name : Scorecards supply-chain security
2
- on :
3
- workflow_dispatch :
2
+ on :
3
+ # Only the default branch is supported.
4
+ branch_protection_rule :
5
+ schedule :
6
+ # Weekly on Saturdays.
7
+ - cron : " 30 1 * * 6"
4
8
push :
5
- branches : [ main, master ]
9
+ branches : [main, master]
6
10
7
11
# Declare default permissions as read only.
8
12
permissions : read-all
@@ -14,40 +18,45 @@ jobs:
14
18
permissions :
15
19
# Needed to upload the results to code-scanning dashboard.
16
20
security-events : write
21
+ # Used to receive a badge. (Upcoming feature)
22
+ id-token : write
17
23
actions : read
18
24
contents : read
19
-
25
+
20
26
steps :
21
27
- name : " Checkout code"
22
- uses : actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579 # v2.4 .0
28
+ uses : actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846 # tag=v3.0 .0
23
29
with :
24
30
persist-credentials : false
25
31
26
32
- name : " Run analysis"
27
- uses : ossf/scorecard-action@3e15ea8318eee9b333819ec77a36aca8d39df13e # v1.0 .1
33
+ uses : ossf/scorecard-action@e363bfca00e752f91de7b7d2a77340e2e523cb18 # tag= v1.1 .1
28
34
with :
29
35
results_file : results.sarif
30
36
results_format : sarif
31
- # Read-only PAT token. To create it,
32
- # follow the steps in https://github.com/ossf/scorecard-action#pat-token-creation.
33
- repo_token : ${{ secrets.GITHUB_TOKEN }}
37
+ # (Optional) Read-only PAT token. Uncomment the `repo_token` line below if:
38
+ # - you want to enable the Branch-Protection check on a *public* repository, or
39
+ # - you are installing Scorecards on a *private* repository
40
+ # To create the PAT, follow the steps in https://github.com/ossf/scorecard-action#authentication-with-pat.
41
+ # repo_token: ${{ secrets.SCORECARD_READ_TOKEN }}
42
+
34
43
# Publish the results for public repositories to enable scorecard badges. For more details, see
35
- # https://github.com/ossf/scorecard-action#publishing-results.
36
- # For private repositories, `publish_results` will automatically be set to `false`, regardless
44
+ # https://github.com/ossf/scorecard-action#publishing-results.
45
+ # For private repositories, `publish_results` will automatically be set to `false`, regardless
37
46
# of the value entered here.
38
47
publish_results : true
39
48
40
49
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
41
50
# format to the repository Actions tab.
42
51
- name : " Upload artifact"
43
- uses : actions/upload-artifact@82c141cc518b40d92cc801eee768e7aafc9c2fa2 # v2.3.1
52
+ uses : actions/upload-artifact@6673cd052c4cd6fcf4b4e6e60ea986c889389535 # tag=v3.0.0
44
53
with :
45
54
name : SARIF file
46
55
path : results.sarif
47
56
retention-days : 5
48
-
57
+
49
58
# Upload the results to GitHub's code scanning dashboard.
50
59
- name : " Upload to code-scanning"
51
- uses : github/codeql-action/upload-sarif@5f532563584d71fdef14ee64d17bafb34f751ce5 # v1.0.26
60
+ uses : github/codeql-action/upload-sarif@5f532563584d71fdef14ee64d17bafb34f751ce5 # tag= v1.0.26
52
61
with :
53
62
sarif_file : results.sarif
0 commit comments