Commit 7f7456c
fix(ci): add missing actions:read perm to scan reusables
The hypatia-scan + secret-scanner reusables consume third-party
actions (codeql-action/upload-sarif and gitleaks-action) that need
permissions the reusables didn't grant. Reusable workflow permission
blocks OVERRIDE the caller's, so adding perms at the wrapper is a no-op
— the fix must live here at source.
hypatia-scan-reusable.yml — workflow-level:
+ actions: read
Lets `codeql-action/upload-sarif` call GET /actions/runs/{id} to attach
the SARIF blob. Without it, the SARIF upload fails with "Resource not
accessible by integration" AFTER the scan + conversion both succeed.
Symptom reproduced across .git-private-farm and other consumers.
secret-scanner-reusable.yml — gitleaks job-level (NOT workflow-level,
keeps trufflehog / rust-secrets / shell-secrets at minimum perms):
permissions:
contents: read
pull-requests: write
actions: read
gitleaks-action's `ScanPullRequest` posts a PR summary comment
(needs pull-requests: write) and queries PR-files / workflow-run
metadata (needs actions: read). Without both, the action throws
RequestError [HttpError]: Resource not accessible by integration
AFTER the gitleaks scan itself succeeds.
Verifying logs from .git-private-farm#69 / job 79144809024 (gitleaks)
+ job 79144809505 (hypatia SARIF) both show post-scan permission
errors that this PR resolves.
Net new perm grants are MINIMAL: `actions: read` is read-only and
matches GitHub's documented requirement for these specific actions.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent f2b9d5e commit 7f7456c
2 files changed
Lines changed: 26 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
84 | 95 | | |
85 | 96 | | |
86 | 97 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
80 | 95 | | |
81 | 96 | | |
82 | 97 | | |
| |||
0 commit comments