Commit d467db5
ci(scorecard): add OpenSSF Scorecard workflow + README badges (#16)
* ci(scorecard): add OpenSSF Scorecard workflow + README badges
Adds .github/workflows/scorecard.yml — runs the OpenSSF Scorecard
supply-chain check on push to main, weekly cron, and on
branch_protection_rule changes. Results land in two places:
- GitHub code-scanning (/security/code-scanning) via SARIF upload
- Public Scorecard registry (api.scorecard.dev) via OIDC publish so
the README badge resolves to a live score
All third-party actions are pinned to commit SHAs:
- actions/checkout@v4
- ossf/scorecard-action@v2.4.3
- actions/upload-artifact@v7.0.1
- github/codeql-action/upload-sarif@v4.35.2
README: add the Scorecard badge to the badge row, plus an HTML
comment with the one-time steps to register the project at
bestpractices.dev and append the Best Practices badge once a
PROJECT_ID has been issued (the badge URL is invalid until the
project is registered, so it's documented inline rather than
shipped broken).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* ci(scorecard): scope permissions to contents:read at workflow level
Sonar githubactions:S8234 flagged 'permissions: read-all' as a
vulnerability. Job-level permissions already grant exactly what the
scorecard analyzer needs (security-events: write for SARIF upload,
id-token: write for OIDC publish, contents: read, actions: read);
the top-level grant is only a fallback for any future steps without
their own block, so contents:read is the right minimum.
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent fe891d6 commit d467db5
2 files changed
Lines changed: 97 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
12 | 34 | | |
13 | 35 | | |
14 | 36 | | |
| |||
0 commit comments