-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (44 loc) · 1.43 KB
/
Copy pathscorecard.yml
File metadata and controls
50 lines (44 loc) · 1.43 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
name: OSSF Scorecard
on:
push:
branches:
- main
# Weekly scheduled scan.
schedule:
- cron: "0 6 * * 1"
workflow_dispatch:
concurrency:
group: scorecard-${{ github.ref }}
cancel-in-progress: true
# The Scorecard action requires ONLY read permissions at the workflow level.
# Any write permission in any job of the same workflow causes the API to reject
# the results. Keep this workflow dedicated to the scorecard job only.
permissions:
contents: read
jobs:
scorecard:
name: OSSF Scorecard
runs-on: ubuntu-latest
timeout-minutes: 20
# Only run on default branch to avoid token permission issues on forks.
if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
permissions:
contents: read
security-events: write
id-token: write
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Run Scorecard analysis
uses: ossf/scorecard-action@2d1146689b8cda280b9bc96326124645441f03bc # v2.4.4
with:
results_file: scorecard-results.sarif
results_format: sarif
publish_results: true
- name: Upload Scorecard SARIF
uses: github/codeql-action/upload-sarif@e4fba868fa4b1b91e1fdab776edc8cfbe6e9fb81 # v4.37.3
with:
sarif_file: scorecard-results.sarif
category: scorecard