Skip to content

OpenSSF Scorecard

OpenSSF Scorecard #113

Workflow file for this run

name: OpenSSF Scorecard
on:
# Re-score weekly plus on every push to main so regressions surface fast.
branch_protection_rule:
schedule:
- cron: '34 2 * * 1'
push:
branches: [main]
permissions: read-all
jobs:
analysis:
name: Scorecard analysis
runs-on: ubuntu-24.04
permissions:
# Needed to upload the results to code-scanning dashboard.
security-events: write
# Needed to publish results and get a badge (see publish_results below).
id-token: write
contents: read
actions: read
steps:
- name: Checkout code
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
persist-credentials: false
- name: Run analysis
uses: ossf/scorecard-action@4eaacf0543bb3f2c246792bd56e8cdeffafb205a # v2.4.3
with:
results_file: results.sarif
results_format: sarif
# Publishing to the OpenSSF Scorecard API is disabled: the publish
# step retries and then errors for this repo, failing the job. The
# analysis still runs and results upload to GitHub code-scanning below,
# so regressions still surface. Re-enable once the repo is onboarded
# with the OpenSSF Scorecard webapp.
publish_results: false
# Upload the results as artifacts (optional; useful for PR review).
- name: Upload artifact
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: scorecard-results
path: results.sarif
retention-days: 7
# Upload to GitHub's code scanning dashboard so failures surface in PRs.
- name: Upload to code-scanning
uses: github/codeql-action/upload-sarif@fee9466b8957867761f2d78f922ab084e3e2dd17 # v3
with:
sarif_file: results.sarif