Skip to content

Commit b4340fe

Browse files
Create scorecard.yml
1 parent 97d7167 commit b4340fe

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

.github/workflows/scorecard.yml

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Scorecard supply-chain security
2+
on:
3+
# For Branch-Protection check. Only the default branch is supported. See
4+
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection
5+
branch_protection_rule:
6+
# To guarantee Maintained check is occasionally updated. See
7+
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained
8+
schedule:
9+
- cron: '44 15 * * 0'
10+
push:
11+
branches: [ "active_scorecard" ]
12+
pull_request:
13+
branches: [ "main" ]
14+
15+
# Declare default permissions as read only.
16+
permissions: read-all
17+
18+
jobs:
19+
analysis:
20+
name: Scorecard analysis
21+
runs-on: ubuntu-latest
22+
permissions:
23+
# Needed to upload the results to code-scanning dashboard.
24+
security-events: write
25+
# Needed to publish results and get a badge (see publish_results below).
26+
id-token: write
27+
28+
steps:
29+
- name: "Checkout code"
30+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
31+
with:
32+
persist-credentials: false
33+
34+
- name: "Run analysis"
35+
uses: ossf/scorecard-action@62b2cac7ed8198b15735ed49ab1e5cf35480ba46 # v2.4.0
36+
with:
37+
results_file: results.sarif
38+
results_format: sarif
39+
publish_results: true
40+
41+
- name: "Upload artifact"
42+
uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4
43+
with:
44+
name: SARIF file
45+
path: results.sarif
46+
retention-days: 5

0 commit comments

Comments
 (0)