name: Scorecard # OpenSSF Scorecard supply-chain posture check. Runs weekly + on main push + # branch_protection_rule changes. SARIF uploads to the Security tab; the public # badge URL resolves once the first scheduled run lands (see README badge wiring). on: branch_protection_rule: schedule: - cron: '0 7 * * 1' push: branches: [main] workflow_dispatch: concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: false permissions: read-all jobs: analysis: name: Scorecard analysis runs-on: ubuntu-latest timeout-minutes: 30 permissions: # Needed to upload SARIF results to the Security tab. security-events: write # Needed for the publish_results badge flow (OIDC). id-token: write contents: read actions: read steps: - name: Checkout uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 with: persist-credentials: false - name: Run Scorecard uses: ossf/scorecard-action@2d1146689b8cda280b9bc96326124645441f03bc # v2.4.4 with: results_file: results.sarif results_format: sarif # publish_results enables the public Scorecard badge. publish_results: true - name: Upload artifact uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: name: SARIF file path: results.sarif retention-days: 5 - name: Upload to Security tab uses: github/codeql-action/upload-sarif@b96794f015dfd88f77b49b1c93e0fa7110f94c63 # v4.38.0 with: sarif_file: results.sarif