-
Notifications
You must be signed in to change notification settings - Fork 54
65 lines (56 loc) · 1.78 KB
/
Copy pathscorecard.yml
File metadata and controls
65 lines (56 loc) · 1.78 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# OpenSSF Scorecard - Security health metrics for open source projects
# https://github.com/ossf/scorecard
# Results appear in the GitHub Security tab under Code scanning alerts
name: OpenSSF Scorecard
on:
push:
branches:
- main
schedule:
# Weekly scan: Sundays at 03:00 UTC
- cron: "0 3 * * 0"
# Re-scan immediately after releases so Scorecard detects signing artifacts
workflow_run:
workflows:
- CI
types:
- completed
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
scorecard:
name: Scorecard analysis
# Skip workflow_run triggers from failed CI runs
if: github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success'
runs-on: ubuntu-latest
permissions:
security-events: write
id-token: write
contents: read
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Run Scorecard
uses: ossf/scorecard-action@2d1146689b8cda280b9bc96326124645441f03bc # v2.4.4
with:
results_file: results.sarif
results_format: sarif
publish_results: true
- name: Upload SARIF to Security tab
uses: github/codeql-action/upload-sarif@db488ddef3bf6cb639b32c2e9a7c0a7ea8271d28 # v4.37.8
continue-on-error: true
with:
sarif_file: results.sarif
category: openssf-scorecard
- name: Upload Scorecard results
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: scorecard-results
path: results.sarif
retention-days: 90