Skip to content

Commit 0354575

Browse files
committed
gh-99668: add OpenSSF Scorecard GitHub Action and badge
1 parent 25a7ddf commit 0354575

File tree

3 files changed

+53
-0
lines changed

3 files changed

+53
-0
lines changed

.github/workflows/scorecard.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# This workflow uses actions that are not certified by GitHub. They are provided
2+
# by a third-party and are governed by separate terms of service, privacy
3+
# policy, and support documentation.
4+
5+
name: Scorecard supply-chain security
6+
on:
7+
branch_protection_rule:
8+
schedule:
9+
- cron: '24 7 * * 4'
10+
push:
11+
branches: [ "main" ]
12+
13+
permissions: read-all
14+
15+
jobs:
16+
analysis:
17+
name: Scorecard analysis
18+
runs-on: ubuntu-latest
19+
permissions:
20+
security-events: write
21+
id-token: write
22+
23+
steps:
24+
- name: "Checkout code"
25+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
26+
with:
27+
persist-credentials: false
28+
29+
- name: "Run analysis"
30+
uses: ossf/scorecard-action@0864cf19026789058feabb7e87baa5f140aac736 # v2.3.1
31+
with:
32+
results_file: results.sarif
33+
results_format: sarif
34+
publish_results: true
35+
36+
- name: "Upload artifact"
37+
uses: actions/upload-artifact@v4
38+
with:
39+
name: SARIF file
40+
path: results.sarif
41+
retention-days: 5
42+
43+
- name: "Upload to code-scanning"
44+
uses: github/codeql-action/upload-sarif@v3
45+
with:
46+
sarif_file: results.sarif
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Add OpenSSF Scorecard GitHub Action which performs dozens of automated
2+
checks to ensure the project's security posture is solid and badge which
3+
shows OpenSSF Scorecard score.

README.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ This is Python version 3.14.0 alpha 5
99
:alt: CPython build status on Azure DevOps
1010
:target: https://dev.azure.com/python/cpython/_build/latest?definitionId=4&branchName=main
1111

12+
.. image:: https://api.scorecard.dev/projects/github.com/python/cpython/badge
13+
:alt: OpenSSF Scorecard
14+
:target: https://scorecard.dev/viewer/?uri=github.com/python/cpython
15+
1216
.. image:: https://img.shields.io/badge/discourse-join_chat-brightgreen.svg
1317
:alt: Python Discourse chat
1418
:target: https://discuss.python.org/

0 commit comments

Comments
 (0)