Commit 194a4b5
committed
ci: scope per-job permissions on the remaining workflows
Add explicit per-job `permissions:` blocks to the 4 workflows that
were still relying on the repository default token permissions:
`check.yml`, `emulate.yml`, `example-app.yml`, `features.yml`.
- `check.yml`, `emulate.yml`, `example-app.yml` each have a single
job that only needs to read source and run Gradle. They get
`permissions: contents: read`.
- `features.yml` invokes a reusable workflow at
`ably/features/.github/workflows/sdk-features.yml`. Permissions for
a reusable workflow are inherited from the calling job — the called
workflow's own `permissions:` block cannot upgrade scopes the
caller has not granted. The called workflow at the pinned SHA runs
`actions/checkout`, then `aws-actions/configure-aws-credentials`
(AWS OIDC), then `ably/sdk-upload-action` (creates a GitHub
deployment). It therefore needs:
permissions:
contents: read
id-token: write
deployments: write
These match the inline equivalent in `javadoc.yml`, which does the
same upload work directly; `contents: read` is added here as an
explicit tightening rather than relying on the public-repo default.1 parent 2f70376 commit 194a4b5
4 files changed
Lines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
| 14 | + | |
13 | 15 | | |
14 | 16 | | |
15 | 17 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
12 | 14 | | |
13 | 15 | | |
14 | 16 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
12 | 14 | | |
13 | 15 | | |
14 | 16 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
11 | 15 | | |
12 | 16 | | |
13 | 17 | | |
| |||
0 commit comments