Skip to content

Commit 6b5b90e

Browse files
Patel230Race Tester
andauthored
ci: add OpenSSF Scorecard workflow (#16)
Co-authored-by: Race Tester <race@test.com>
1 parent bd1c33f commit 6b5b90e

1 file changed

Lines changed: 42 additions & 0 deletions

File tree

.github/workflows/scorecard.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Scorecard
2+
3+
on:
4+
branch_protection_rule:
5+
schedule:
6+
- cron: '37 9 * * 1'
7+
push:
8+
branches: [main]
9+
10+
permissions:
11+
security-events: write
12+
id-token: write
13+
contents: read
14+
15+
jobs:
16+
analysis:
17+
name: Scorecard analysis
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Checkout code
21+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
22+
with:
23+
persist-credentials: false
24+
25+
- name: Run analysis
26+
uses: ossf/scorecard-action@4eaacf0543bb3f2c246792bd56e8cdeffafb205a # v2.4.3
27+
with:
28+
results_file: scorecard-results.sarif
29+
results_format: sarif
30+
publish_results: false
31+
32+
- name: Upload artifact
33+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
34+
with:
35+
name: SARIF file
36+
path: scorecard-results.sarif
37+
retention-days: 5
38+
39+
- name: Upload to code-scanning
40+
uses: github/codeql-action/upload-sarif@8aad20d150bbac5944a9f9d289da16a4b0d87c1e # v4
41+
with:
42+
sarif_file: scorecard-results.sarif

0 commit comments

Comments
 (0)