Skip to content

Commit 07bf054

Browse files
authored
Merge pull request #13 from sandialabs/openssf-scorecard
ci: Add OpenSSF Scorecard workflow
2 parents 4c9996e + f2904b7 commit 07bf054

File tree

1 file changed

+53
-0
lines changed

1 file changed

+53
-0
lines changed

.github/workflows/scorecard.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Scorecard supply-chain security
2+
on:
3+
branch_protection_rule:
4+
schedule:
5+
- cron: "22 6 * * 2"
6+
push:
7+
branches: [ "master" ]
8+
9+
# Declare default permissions as read only.
10+
permissions: read-all
11+
12+
jobs:
13+
analysis:
14+
name: Scorecard analysis
15+
runs-on: ubuntu-latest
16+
permissions:
17+
18+
# Needed to upload the results to the code-scanning dashboard.
19+
security-events: write
20+
21+
# Needed to publish the results and get a badge (see
22+
# `publish_results` below).
23+
id-token: write
24+
25+
steps:
26+
- name: "Checkout code"
27+
uses: actions/checkout@v4
28+
with:
29+
persist-credentials: false
30+
31+
- name: "Run analysis"
32+
uses: ossf/[email protected]
33+
with:
34+
results_file: results.sarif
35+
results_format: sarif
36+
# (Optional) "write" PAT token. Uncomment the `repo_token` line below if:
37+
# - you want to enable the Branch-Protection check on a *public* repository, or
38+
# - you are installing Scorecard on a *private* repository
39+
# To create the PAT, follow the steps in https://github.com/ossf/scorecard-action?tab=readme-ov-file#authentication-with-fine-grained-pat-optional.
40+
# repo_token: ${{ secrets.SCORECARD_TOKEN }}
41+
publish_results: true
42+
43+
- name: "Upload artifact"
44+
uses: actions/upload-artifact@v4
45+
with:
46+
name: SARIF file
47+
path: results.sarif
48+
retention-days: 5
49+
50+
- name: "Upload to code-scanning dashboard"
51+
uses: github/codeql-action/upload-sarif@v3
52+
with:
53+
sarif_file: results.sarif

0 commit comments

Comments
 (0)