Skip to content

Commit 957ea76

Browse files
committed
Enable Scorecard Action
Signed-off-by: Joyce Brum <[email protected]>
1 parent a3b7b9e commit 957ea76

File tree

1 file changed

+59
-0
lines changed

1 file changed

+59
-0
lines changed

.github/workflows/scorecards.yml

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

0 commit comments

Comments
 (0)