Skip to content

OSSF Scorecard

OSSF Scorecard #19

Workflow file for this run

# SPDX-License-Identifier: MPL-2.0
name: OSSF Scorecard
on:
push:
branches: [main, master]
schedule:
- cron: '0 4 * * *'
workflow_dispatch:
permissions: read-all
# Estate policy (standards/docs/TRUSTED-BASE-REDUCTION-POLICY.adoc and the workflow
# staleness check): OSSF Scorecard MUST NOT upload SARIF to GitHub Code Scanning unless
# it runs for every PR head commit. This workflow runs on push-to-main and on a schedule,
# NOT on pull_request — so Code Scanning would show findings that correspond to no PR
# head commit, and PR checks would appear to carry security results they do not.
#
# Resolution: keep the scan, drop the Code Scanning upload. The SARIF is retained as a
# build artifact instead, which is inspectable without polluting Code Scanning.
jobs:
analysis:
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
- name: Run Scorecard
uses: ossf/scorecard-action@4eaacf0543bb3f2c246792bd56e8cdeffafb205a # v2.3.1
with:
results_file: results.sarif
results_format: sarif
# NOT github/codeql-action/upload-sarif — see the policy note above.
- name: Upload results as artifact
uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4
with:
name: scorecard-results
path: results.sarif
retention-days: 30