harden(zizmor): add GH_TOKEN env to fix impostor-check rate-limits (#11) #12
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # OpenSSF Scorecard — supply-chain security health metrics | |
| # Docs: https://github.com/ossf/scorecard-action | |
| # | |
| # Note: Scorecard requires read access to the GitHub GraphQL API. On private | |
| # repos without GitHub Advanced Security this fails with "Resource not | |
| # accessible by integration". We skip the job on private repos until the | |
| # repo is made public or GHAS is enabled. | |
| name: OpenSSF Scorecard | |
| on: | |
| workflow_dispatch: | |
| branch_protection_rule: | |
| schedule: | |
| - cron: "37 6 * * 1" # Mondays 06:37 UTC | |
| push: | |
| branches: ["main"] | |
| permissions: read-all | |
| jobs: | |
| analysis: | |
| name: Scorecard analysis | |
| # Scorecard cannot run on private repos without GHAS — skip to keep CI green. | |
| if: github.event.repository.private == false | |
| runs-on: ubuntu-latest | |
| permissions: | |
| security-events: write | |
| id-token: write | |
| contents: read | |
| actions: read | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| with: | |
| persist-credentials: false | |
| - name: Run Scorecard | |
| uses: ossf/scorecard-action@f2ea147fec3c2f0d459703eba7405b5e9bcd8c8f # v2.4.2 | |
| with: | |
| results_file: results.sarif | |
| results_format: sarif | |
| publish_results: false | |
| - name: Upload artifact | |
| if: ${{ !cancelled() && hashFiles('results.sarif') != '' }} | |
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 | |
| with: | |
| name: SARIF file | |
| path: results.sarif | |
| retention-days: 30 | |
| - name: Upload to code-scanning | |
| if: ${{ !cancelled() && hashFiles('results.sarif') != '' }} | |
| continue-on-error: true | |
| uses: github/codeql-action/upload-sarif@f411752efdf656cb71aa17b755b22c890960da1d # v3.35.5 | |
| with: | |
| sarif_file: results.sarif |