Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/actions.lock
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ workflows:
'.github/workflows/scorecard.yaml':
- 'actions/checkout@v7.0.1'
- 'github/codeql-action@v4.39.3'
- 'ossf/scorecard-action@v2.5.0'
- 'ossf/scorecard-action@v2.6.0'
'.github/workflows/update-python-dependencies.yaml':
- 'actions/checkout@v7.0.1'
- 'actions/upload-artifact@v7.0.2'
Expand Down Expand Up @@ -160,9 +160,9 @@ dependencies:
commit: 'sha1-ceedf095f4ec1a097402bc6bd80831f2e1a6fde6'
owner_id: 330458550
repo_id: 506133999
'ossf/scorecard-action@v2.5.0':
ref: 'v2.5.0'
commit: 'sha1-fa7117db83c52d787ae5a89f350999701505d78e'
'ossf/scorecard-action@v2.6.0':
ref: 'v2.6.0'
commit: 'sha1-23f22cd43608bae7a1f1fa2603d7314dee9538a5'
owner_id: 67707773
repo_id: 421101922
'pyo3/maturin-action@v1.51.0':
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/scorecard.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: Scorecard
on:
workflow_call:
permissions: {}
cache-mode: none
jobs:
analysis:
name: 🛡️ Scorecard analysis
Expand All @@ -21,12 +22,14 @@ jobs:
with:
persist-credentials: false
- name: 🛡️ Run Scorecard analysis
uses: ossf/scorecard-action@v2.5.0
uses: ossf/scorecard-action@v2.6.0
with:
results_file: results.sarif
results_format: sarif
publish_results: true
fail_on_publish_error: true
- name: 🛡️ Upload Scorecard results to code scanning
if: ${{ !cancelled() && hashFiles('results.sarif') != '' }}
uses: github/codeql-action/upload-sarif@v4.39.3
with:
sarif_file: results.sarif
3 changes: 3 additions & 0 deletions changelog.d/+scorecard-5-7.change.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
The shared Scorecard workflow runs OpenSSF Scorecard v5.7.0, which recognizes GitHub immutable releases in the
Signed-Releases and Pinned-Dependencies checks. The job disables cache access and fails if the Scorecard API rejects
publication. It still uploads the scan to GitHub code scanning when the results file is available.
20 changes: 11 additions & 9 deletions docs/security-scanning.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ analyze steps.

## OpenSSF Scorecard: `scorecard.yaml`

Runs `ossf/scorecard-action` v2.5.0, publishes the results to the Scorecard API (which feeds the public badge), and
uploads the SARIF file to code scanning with the CodeQL Action. It takes no inputs and no secrets. The action is
[free for public repositories](https://github.com/ossf/scorecard-action#scorecards-github-action); a private repository
needs GitHub Advanced Security.
Runs `ossf/scorecard-action` v2.6.0 (Scorecard v5.7.0), publishes the results to the Scorecard API (which feeds the
public badge), and uploads the SARIF file to code scanning with the CodeQL Action. It takes no inputs and no secrets.
The action is [free for public repositories](https://github.com/ossf/scorecard-action#scorecards-github-action); a
private repository needs GitHub Advanced Security.

The caller must grant every permission the job requests; each comment says which Scorecard check needs it:

Expand Down Expand Up @@ -93,11 +93,13 @@ jobs:
The `branch_protection_rule` trigger rescores the repository when its branch protection changes. A fork that should not
publish can guard the job with `if: github.repository == 'owner/name'`.

The Scorecard API rejects published results from a workflow that breaks its
[workflow restrictions](https://github.com/ossf/scorecard-action#workflow-restrictions), and the step only logs a
warning, so the badge stops updating while the run stays green. The reusable job already meets the job-level rules: it
runs only approved actions, has no `run` steps, env, defaults, containers, or services, and uses a GitHub-hosted Ubuntu
runner. The caller workflow must keep the global rules:
The Scorecard API rejects results from workflows that break its
[workflow restrictions](https://github.com/ossf/scorecard-action#workflow-restrictions). A rejection fails the job.
Network errors, HTTP 408, 429, and server errors produce a warning after retries. If the results file exists, the job
uploads it to code scanning even when publication fails.

The job disables cache access. It runs only approved actions, has no `run` steps, env, defaults, containers, or
services, and uses a GitHub-hosted Ubuntu runner. The caller workflow must keep the global rules:

- no top-level `env` or `defaults`;
- no workflow-level write permissions, so keep `permissions: {}` at the top;
Expand Down