forked from ChelseaKR/habitable
-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (48 loc) · 1.72 KB
/
Copy pathscorecard.yml
File metadata and controls
51 lines (48 loc) · 1.72 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
# SPDX-License-Identifier: AGPL-3.0-or-later
# OpenSSF Scorecard (P1-5, SEC-35..38, CICD-03/11): a supply-chain security
# self-assessment, published so anyone (a legal-aid group deciding whether to
# trust this tool, a downstream embedder) can see the honest number rather than
# take habitable's word for it.
name: scorecard
on:
branch_protection_rule:
schedule:
- cron: "12 3 * * 6" # weekly, Saturday 03:12 UTC
push:
branches: [main]
workflow_dispatch:
permissions: read-all
jobs:
analysis:
name: Scorecard analysis
runs-on: ubuntu-latest
permissions:
security-events: write # to upload SARIF to the Security tab
id-token: write # to publish results and get a badge
contents: read
actions: read
steps:
- name: Harden Runner (audit mode)
uses: step-security/harden-runner@05e31511f85b41b11d1cf0ef85d0992719546e2c # v2.21.0
with:
egress-policy: audit
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Run analysis
uses: ossf/scorecard-action@2d1146689b8cda280b9bc96326124645441f03bc # v2.4.4
with:
results_file: results.sarif
results_format: sarif
publish_results: true
- name: Upload SARIF artifact
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: scorecard-sarif
path: results.sarif
retention-days: 5
- name: Upload to code-scanning (Security tab)
uses: github/codeql-action/upload-sarif@ff2f1c621b7f889edc0d3c761ac2e6a3f8cdb0dd # v4.37.7
with:
sarif_file: results.sarif