Commit edd392f
ci: least-privilege permissions on spellcheck (read) and stale-issues (job-level write for actions/stale) (#4080)
* ci: declare workflow-level contents: read on spellcheck and stale-issues
Workflow runs checks only; no GitHub API writes. Post-CVE-2025-30066 hardening pattern.
Signed-off-by: Arpit Jain <arpitjain099@gmail.com>
* Grant stale job issues: write + pull-requests: write
The previous workflow-level contents: read default broke
actions/stale, which needs issues: write and pull-requests: write to
mark and close stale issues/PRs (caught by cursor[bot] review).
Adding the writes at the job level instead of the workflow level keeps
spellcheck and any future job on least-privilege contents: read.
Signed-off-by: Arpit Jain <arpitjain099@gmail.com>
* ci(stale-issues): add actions: write for actions/stale cache
actions/stale@v10 persists its run state in the Actions cache, which needs
actions: write at the job level in addition to issues/pull-requests write.
This matches the recommended permissions block in the action's README.
Signed-off-by: Arpit Jain <arpitjain099@gmail.com>
* Set workflow-level permissions to empty in stale-issues workflow
The stale job declares its own permissions block, so the workflow-level
contents: read had no effect on its token. This workflow does not read
repository contents, so an empty permissions block is the clearest
least-privilege default at the workflow level.
Signed-off-by: Arpit Jain <arpitjain099@gmail.com>
---------
Signed-off-by: Arpit Jain <arpitjain099@gmail.com>
Co-authored-by: petyaslavova <petya.slavova@redis.com>1 parent cdc9270 commit edd392f
2 files changed
Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
4 | 7 | | |
5 | 8 | | |
6 | 9 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
| 18 | + | |
17 | 19 | | |
18 | 20 | | |
19 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
20 | 26 | | |
21 | 27 | | |
22 | 28 | | |
| |||
0 commit comments