Skip to content

Commit c5b7348

Browse files
committed
Create scorecard.yml
1 parent 9b83aeb commit c5b7348

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

.github/workflows/scorecard.yml

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
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: '24 13 * * 6'
10+
push:
11+
branches: [ "main" ]
12+
permissions: read-all
13+
jobs:
14+
analysis:
15+
name: Scorecard analysis
16+
runs-on: ubuntu-latest
17+
permissions:
18+
contents: read # for actions/checkout
19+
actions: read
20+
security-events: write # to upload the results to code-scanning dashboard
21+
id-token: write # to publish results and get a badge (see publish_results below)
22+
steps:
23+
- name: "Checkout code"
24+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
25+
with:
26+
persist-credentials: false
27+
28+
- name: "Run analysis"
29+
uses: ossf/scorecard-action@0864cf19026789058feabb7e87baa5f140aac736 # v2.3.1
30+
with:
31+
results_file: results.sarif
32+
results_format: sarif
33+
publish_results: true
34+
35+
- name: "Upload artifact"
36+
uses: actions/upload-artifact@97a0fba1372883ab732affbe8f94b823f91727db # v3.pre.node20
37+
with:
38+
name: SARIF file
39+
path: results.sarif
40+
retention-days: 5
41+
42+
- name: "Upload to GitHub's code-scanning dashboard"
43+
uses: github/codeql-action/upload-sarif@v3
44+
with:
45+
sarif_file: results.sarif

0 commit comments

Comments
 (0)