Repository navigation
61 lines (54 loc) · 2.29 KB
/
Copy pathscorecard.yml
File metadata and controls
61 lines (54 loc) · 2.29 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
name: OpenSSF Scorecard
on:
branch_protection_rule:
workflow_dispatch:
schedule:
- cron: '0 5 * * 1'
push:
branches: [main]
permissions: read-all
jobs:
analysis:
runs-on: ubuntu-latest
permissions:
contents: read
# No security-events: write. This job no longer uploads SARIF to code
# scanning, so it needs no permission to write code-scanning alerts. It
# does still upload results.sarif as a build artifact below. id-token
# remains because publish_results uses GitHub's OIDC token to verify the
# result's authenticity when publishing it to the public Scorecard API.
id-token: write
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Run Scorecard
uses: ossf/scorecard-action@fa7117db83c52d787ae5a89f350999701505d78e # v2.5.0
with:
results_file: results.sarif
results_format: sarif
publish_results: true
- name: Upload Scorecard results
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: scorecard-results
path: results.sarif
retention-days: 5
# Scorecard results are NOT uploaded to code scanning, deliberately.
#
# Scorecard grades repository practice: pinned dependencies, branch
# protection, what share of pull requests carried an approving review.
# Code scanning is the surface for defects in this repository's code, and
# routing a grade into it files each check as a dismissible alert with a
# severity attached.
#
# Those alerts also do not stay dismissed. GitHub matches results across
# uploads by rule and fingerprint, and a Scorecard result whose identity
# shifts arrives as a NEW alert that a previous dismissal does not cover.
# The outcome was a standing queue of security-labelled items that no code
# change could close.
#
# The results remain public and retrievable: publish_results above sends
# them to the OpenSSF Scorecard API that backs the badge and the public
# viewer, and the artifact above keeps the raw SARIF. This narrows where
# the grade is displayed. It does not withhold it.