Skip to content

🏅 Security: OpenSSF Scorecard — main #5

🏅 Security: OpenSSF Scorecard — main

🏅 Security: OpenSSF Scorecard — main #5

name: "🏅 Security: OpenSSF Scorecard"
run-name: >-
${{
github.event_name == 'branch_protection_rule' && '🏅 Security: OpenSSF Scorecard — Branch protection changed' ||
github.event_name == 'schedule' && '🏅 Security: OpenSSF Scorecard — Weekly schedule' ||
format('🏅 Security: OpenSSF Scorecard — {0}', github.ref_name)
}}
on:
push:
branches:
- main
branch_protection_rule:
schedule:
- cron: '0 6 * * 1' # Weekly on Monday at 06:00 UTC
permissions: read-all
jobs:
analysis:
name: "🏅 Security: Scorecard Analysis"
# OpenSSF Scorecard only runs on public repos; SARIF upload also requires GHAS.
if: github.event.repository.visibility == 'public'
runs-on: ubuntu-latest
timeout-minutes: 20
permissions:
contents: read
security-events: write
id-token: write
steps:
- name: Harden Runner
uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4
with:
egress-policy: audit
- name: Checkout code
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
persist-credentials: false
- name: Run analysis
uses: ossf/scorecard-action@4eaacf0543bb3f2c246792bd56e8cdeffafb205a # v2.4.3
with:
results_file: results.sarif
results_format: sarif
publish_results: true
- name: Upload to code-scanning
uses: github/codeql-action/upload-sarif@8aad20d150bbac5944a9f9d289da16a4b0d87c1e # v4.36.2
with:
sarif_file: results.sarif