Skip to content

OpenSSF Scorecard

OpenSSF Scorecard #114

Workflow file for this run

name: OpenSSF Scorecard
on:
schedule:
- cron: '37 9 * * 2'
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_dispatch: {}
# Read-only by default
permissions:
contents: read
jobs:
scorecard:
name: Scorecard analysis
runs-on: ubuntu-latest
# Needs OIDC only to publish results to scorecard.dev
permissions:
contents: read
id-token: write
steps:
- name: Harden runner
uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
with:
egress-policy: audit
- name: Run Scorecard
uses: ossf/scorecard-action@4eaacf0543bb3f2c246792bd56e8cdeffafb205a # v2.4.3
with:
publish_results: true
results_format: sarif
results_file: results.sarif
- name: Upload SARIF artifact
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: scorecard-sarif
path: results.sarif
retention-days: 5
upload-sarif:
name: Upload SARIF to Code Scanning
needs: scorecard
runs-on: ubuntu-latest
# Only this job needs to write security events
permissions:
contents: read
security-events: write
steps:
- name: Checkout (required for fingerprinting)
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
- name: Download SARIF artifact
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
with:
name: scorecard-sarif
path: .
- name: Upload SARIF to Code Scanning
uses: github/codeql-action/upload-sarif@f443b600d91635bebf5b0d9ebc620189c0d6fba5 # v4.30.8
with:
sarif_file: results.sarif
wait-for-processing: true