Commit af4c3a5
authored
Add explicit GITHUB_TOKEN permissions to workflow files (#629)
## Summary
- Adds `permissions: { contents: read }` to 7 workflow files missing
explicit permission scoping
- Follows principle of least privilege for GITHUB_TOKEN
- Resolves code scanning alerts #15, #20, #21, #23, #24, #25, #26, #29,
#33, #59, #60, #65, #69, #70, #71
## Files changed
- `testing-dependency-rest.yaml`
- `testing-dependency-grpc.yaml`
- `testing-dependency-asyncio.yaml`
- `testing-dependency.yaml`
- `cleanup-nightly.yaml`
- `build-and-publish-docs.yaml`
- `publish-to-pypi.yaml`
## Test plan
- [x] Workflow-only change — adds permissions blocks, no logic changes
- [ ] CI checks pass on this PR
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> **Low Risk**
> Low risk workflow-only change that tightens default `GITHUB_TOKEN`
access; main risk is an unexpected permissions mismatch causing workflow
failures (notably PyPI publishing/tag pushes).
>
> **Overview**
> Adds explicit `permissions` blocks to several GitHub Actions workflows
to follow least-privilege defaults.
>
> Most workflows are scoped to `contents: read`, while the PyPI release
workflow is explicitly granted `contents: write` to support
tagging/pushing during releases.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
49b5bf2. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->1 parent f9ab85c commit af4c3a5
7 files changed
Lines changed: 21 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
10 | 13 | | |
11 | 14 | | |
12 | 15 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
8 | 11 | | |
9 | 12 | | |
10 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
37 | 40 | | |
38 | 41 | | |
39 | 42 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
13 | 16 | | |
14 | 17 | | |
15 | 18 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
13 | 16 | | |
14 | 17 | | |
15 | 18 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
14 | 17 | | |
15 | 18 | | |
16 | 19 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
10 | 13 | | |
11 | 14 | | |
12 | 15 | | |
| |||
0 commit comments