Skip to content

Commit 4d9d897

Browse files
authored
Add OpenSSF scorecard action (TraceMachina#486)
Ensure that we follow security best practices.
1 parent 1aadd42 commit 4d9d897

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

.github/workflows/scorecard.yaml

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
---
2+
name: Scorecard supply-chain security
3+
on:
4+
schedule:
5+
# Non-peak hour 23:15 on Tuesdays.
6+
- cron: '15 23 * * 1'
7+
push:
8+
branches: [ "main" ]
9+
10+
permissions: read-all
11+
12+
jobs:
13+
analysis:
14+
name: Scorecard analysis
15+
runs-on: ubuntu-22.04
16+
permissions:
17+
security-events: write
18+
id-token: write
19+
20+
steps:
21+
- name: Checkout
22+
uses: >- # v4.1.1
23+
actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
24+
with:
25+
persist-credentials: false
26+
27+
- name: Run analysis
28+
uses: >- # v2.3.1
29+
ossf/scorecard-action@0864cf19026789058feabb7e87baa5f140aac736
30+
with:
31+
results_file: results.sarif
32+
results_format: sarif
33+
publish_results: true
34+
35+
- name: Upload artifact
36+
uses: >- # v4.0.0
37+
actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392
38+
with:
39+
name: SARIF file
40+
path: results.sarif
41+
retention-days: 5
42+
43+
- name: Upload to code-scanning
44+
uses: >- # v3.22.11
45+
github/codeql-action/upload-sarif@b374143c1149a9115d881581d29b8390bbcbb59c
46+
with:
47+
sarif_file: results.sarif

0 commit comments

Comments
 (0)