Skip to content

Commit 1853439

Browse files
Create scorecard.yml (#3362)
* Create scorecard.yml, only enable workflow_dispatch
1 parent ee6d939 commit 1853439

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

.github/workflows/scorecard.yml

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

0 commit comments

Comments
 (0)