-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (42 loc) · 1.56 KB
/
Copy pathscorecard.yml
File metadata and controls
45 lines (42 loc) · 1.56 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
name: Scorecard
# OpenSSF Scorecard — measures the repo's security posture (branch protection, pinned deps,
# token permissions, etc.) and publishes a public score. A strong due-diligence signal.
on:
workflow_dispatch:
branch_protection_rule:
schedule:
- cron: "41 9 * * 2" # weekly, Tuesday
push:
branches: ["main"]
permissions: read-all
jobs:
analysis:
name: OpenSSF Scorecard
runs-on: ubuntu-latest
timeout-minutes: 15
# Scorecard publishing requires a public repo. Skip cleanly until this repo is public.
if: ${{ !github.event.repository.private }}
permissions:
contents: read
security-events: write # upload SARIF to the Security tab
id-token: write # publish results to the OpenSSF API (no secrets)
steps:
- uses: step-security/harden-runner@b09bb98e06d4d774595224525879c09bc6e98c40 # v2
with:
egress-policy: audit
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: ossf/scorecard-action@2d1146689b8cda280b9bc96326124645441f03bc # v2.4.4
with:
results_file: results.sarif
results_format: sarif
publish_results: true
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
name: scorecard-results
path: results.sarif
retention-days: 5
- uses: github/codeql-action/upload-sarif@5595ccaf912efad79be6eef63a5619ff05969be3 # v4.37.6
with:
sarif_file: results.sarif