Skip to content

Commit e2919b2

Browse files
committed
Add OpenSSF Scorecard workflow
1 parent 58564a1 commit e2919b2

1 file changed

Lines changed: 49 additions & 0 deletions

File tree

.github/workflows/scorecard.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# yamllint disable rule:line-length
2+
---
3+
name: OpenSSF Scorecard
4+
5+
on:
6+
schedule:
7+
- cron: 18 2 * * 1
8+
push:
9+
branches:
10+
- main
11+
branch_protection_rule: {}
12+
13+
permissions: read-all
14+
15+
jobs:
16+
analysis:
17+
name: Scorecard analysis
18+
permissions:
19+
id-token: write
20+
security-events: write
21+
if: github.event.repository.default_branch == github.ref_name || github.event_name == 'pull_request'
22+
runs-on: ubuntu-latest
23+
24+
steps:
25+
- name: Checkout code
26+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
27+
with:
28+
persist-credentials: false
29+
30+
- name: Run analysis
31+
uses: ossf/scorecard-action@f49aabe0b5af0936a0987cfb85d86b75731b0186 # v2.4.1
32+
with:
33+
# file_mode: git
34+
publish_results: false
35+
# repo_token: ${{ secrets.SCORECARD_TOKEN }}
36+
results_file: results.sarif
37+
results_format: sarif
38+
39+
# - name: Upload artifact
40+
# uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1
41+
# with:
42+
# name: SARIF file
43+
# path: results.sarif
44+
# retention-days: 5
45+
46+
- name: Upload to code scanning
47+
uses: github/codeql-action/upload-sarif@86b04fb0e47484f7282357688f21d5d0e32175fe # v3.29.0
48+
with:
49+
sarif_file: results.sarif

0 commit comments

Comments
 (0)