Commit 987697b
fix(ci): secret-scanner callers must grant the reusable's job permissions (#472)
Root cause of the estate-wide Secret Scanner `startup_failure`
(including on this repo's own main): the reusable's gitleaks job
requests `pull-requests: write` + `actions: read` (added for PR summary
comments, .git-private-farm#69), but a called workflow cannot exceed the
caller's grant. Every wrapper granting only `contents: read` — which is
exactly what the reusable's own documented caller example says to do —
dies at startup: *"the workflow is requesting 'pull-requests: write',
but is only allowed 'pull-requests: none'"*. This is why the failure
persisted across every pin bump: the bug is in the caller shape, not the
pinned ref.
- Header caller example now grants the permissions at the calling job
(same consumption pattern as the scorecard reusable) — this is the shape
wrapper sweeps copy.
- This repo's own wrapper: grant the permissions and bump the pin off
known-bad `d135b05` to current main (`891b1ed`).
Estate note: the ~281 repo wrappers need the same job-level grant on
their next sweep; the grant is safe at any pinned ref (refs that don't
request the elevation simply downgrade). Proven fix live on
somethings-fishy PR #51.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>1 parent 891b1ed commit 987697b
2 files changed
Lines changed: 20 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
39 | 45 | | |
40 | 46 | | |
41 | 47 | | |
| |||
49 | 55 | | |
50 | 56 | | |
51 | 57 | | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
52 | 62 | | |
53 | 63 | | |
54 | 64 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
19 | 27 | | |
0 commit comments