Commit c9a893a
ci: scorecard 50/50 startup_failure + scorecard-enforcer webapp 400 + governance SHA-pin (#264)
## Summary
Three foundational CI bugs surfaced by direct audit; each fixed at the
correct layer (in-repo, not estate-wide).
### `scorecard-enforcer.yml` — two-job split
Score itself was succeeding (7.9 measured), but the OSSF Scorecard
webapp HTTP-400'd the signed-result POST:
> workflow verification failed: scorecard job must only have steps with
`uses`, see
https://github.com/ossf/scorecard-action#workflow-restrictions
because the `scorecard` job had a `Check minimum score` step that used
`run:`. The webapp's workflow verifier rejects mixed-shape jobs when
`publish_results: true` triggers the signed-publish path.
**Fix**: split the single job into two:
- `scorecard` (uses-only): runs scorecard-action with publish, uploads
SARIF, saves `results.sarif` as actions artifact.
- `enforce-min-score` (needs: scorecard): downloads the artifact and
runs the bash min-score gate. `run:` steps are fine here because this
job does NOT call scorecard-action.
Action SHA pins verified via `gh api repos/<org>/<action>/commits/<sha>`
(`actions/upload-artifact@4cec3d8` +
`actions/download-artifact@cc20338`).
### `scorecard.yml` — align with documented caller pattern
**50/50 ever runs** of this workflow are `startup_failure` (workflow has
never successfully run). Caller diverged from the reusable's documented
caller-example in 4 ways:
1. Missing `concurrency:` group — re-pushes piled up superseded runs.
2. `branch_protection_rule:` trigger present (unused; complicates
startup).
3. `secrets: inherit` against a reusable with no `secrets:` block.
4. `permissions: read-all` instead of explicit `contents: read`.
**Fix**: now matches the reusable's header example verbatim. SHA pin
unchanged.
### `governance.yml` — SHA-pin floating `@main` ref
Per memory hook `feedback_gh_run_rerun_caches_floating_ref_resolution`,
floating refs cache resolution unpredictably across re-runs. Pinned to
`d3f799c639420ac68ac7ed83d2166b625b4b73f0` (current
`hyperpolymath/standards` main); `governance-reusable.yml` verified
present at that SHA.
## Test plan
- [ ] Scorecard run after merge: confirm publish step no longer
HTTP-400s; signed result reaches OSSF webapp
- [ ] Scorecards run after merge: workflow actually starts (not
startup_failure) and produces a run
- [ ] Governance run after merge: no resolution flap
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 223be67 commit c9a893a
3 files changed
Lines changed: 58 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
3 | 23 | | |
4 | 24 | | |
5 | 25 | | |
| |||
43 | 63 | | |
44 | 64 | | |
45 | 65 | | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
46 | 82 | | |
47 | 83 | | |
48 | | - | |
| 84 | + | |
49 | 85 | | |
50 | 86 | | |
51 | 87 | | |
52 | 88 | | |
53 | | - | |
| 89 | + | |
54 | 90 | | |
55 | 91 | | |
56 | 92 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
2 | 11 | | |
3 | 12 | | |
4 | 13 | | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | 14 | | |
9 | 15 | | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
10 | 23 | | |
11 | | - | |
| 24 | + | |
| 25 | + | |
12 | 26 | | |
13 | 27 | | |
14 | 28 | | |
15 | 29 | | |
16 | 30 | | |
17 | 31 | | |
18 | 32 | | |
19 | | - | |
| |||
0 commit comments