Commit 0b63162
authored
Add explicit GITHUB_TOKEN permissions to workflow callers
Resolves the three open `actions/missing-workflow-permissions` CodeQL
alerts (#1, #3, #4). Each is a single-job caller of a reusable workflow in
rubyatscale/shared-config, so the permissions block goes job-level, right
above `uses:`, matching the query_packwerk precedent. A caller's block is
the ceiling for the called workflow, so each grant covers exactly what the
callee does and nothing more.
- cd.yml -> contents: write. shared-config's cd.yml checks out with
persisted credentials and runs discourse/publish-rubygems-action, which
does `rake release` (a raw git push of the version tag), then
`gh release create`. Anything less breaks the gem release.
- stale.yml -> issues: write + pull-requests: write. shared-config's
stale.yml runs actions/stale, which comments on and closes both stale
issues and stale PRs. The implicit read of repo contents still works
without naming contents.
- triage.yml -> issues: write. shared-config's triage.yml only runs
`gh issue edit --add-label triage`.
ci.yml already declares workflow-level `contents: read` and codeql.yml
already declares its own block, so both are left untouched.1 parent 1dc4089 commit 0b63162
3 files changed
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
11 | 13 | | |
12 | 14 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
8 | 11 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
| 10 | + | |
9 | 11 | | |
0 commit comments