Skip to content

Commit 09da64c

Browse files
ostermanclaude
andcommitted
docs(agent-skills): add missing GitHub Actions permissions for component updater
The workflow example and token guidance omitted contents: write and pull-requests: write, required under GitHub's read-only default permissions for atmos vendor update --pull-request, and didn't document id-token: write for the github/sts OIDC exchange. Addresses CodeRabbit review comment on PR #2756. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
1 parent 3e4d4d0 commit 09da64c

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

agent-skills/skills/atmos-migration/references/from-component-updater.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ Replace the legacy updater action with a scheduled workflow that checks out the
66
jobs:
77
vendor-update:
88
runs-on: ubuntu-latest
9+
permissions:
10+
contents: write
11+
pull-requests: write
912
container:
1013
image: ghcr.io/cloudposse/atmos:${{ vars.ATMOS_VERSION }}
1114
steps:
@@ -30,6 +33,6 @@ Do not retain a third-party action for updating, committing, pushing, or opening
3033
| GitHub token input | `ATMOS_CI_GITHUB_TOKEN`, `ATMOS_PRO_GITHUB_TOKEN`, `GITHUB_TOKEN`, or `GH_TOKEN` |
3134
| action summary | Native GitHub step summary |
3235

33-
Stage the rollout: first run `atmos vendor update --check --group <name>` on a non-production group; then enable `--pull-request` manually; finally schedule it and retire the legacy action. Grant only `contents: write`, `pull-requests: write`, and `issues: write` where labels/assignees are used. The default `GITHUB_TOKEN` suppresses downstream push workflows; instead of a long-lived PAT or manually-managed GitHub App token, pair the Component Updater with the `github/sts` auth integration: `atmos auth exec --identity <github-sts-identity> -- atmos vendor update --pull-request` mints a real GitHub App installation token and exports it as `ATMOS_PRO_GITHUB_TOKEN`, which the Component Updater already prefers over `GITHUB_TOKEN`.
36+
Stage the rollout: first run `atmos vendor update --check --group <name>` on a non-production group; then enable `--pull-request` manually; finally schedule it and retire the legacy action. Grant only `contents: write` and `pull-requests: write`; add `issues: write` only when using labels or assignees. The default `GITHUB_TOKEN` suppresses downstream push workflows; instead of a long-lived PAT or manually-managed GitHub App token, pair the Component Updater with the `github/sts` auth integration, whose job needs `id-token: write` for the OIDC exchange: `atmos auth exec --identity <github-sts-identity> -- atmos vendor update --pull-request` mints a real GitHub App installation token and exports it as `ATMOS_PRO_GITHUB_TOKEN`, which the Component Updater already prefers over `GITHUB_TOKEN`.
3437

3538
See the vendoring [Component Updater reference](../../atmos-vendoring/references/component-updater.md) for the native operating model.

agent-skills/skills/atmos-vendoring/references/component-updater.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ Configure source selection under `vendor.update`. A group has `include` and opti
66

77
Put PR behavior under `vendor.ci.pull_request`: `provider: github`, optional `base_branch`, `branch_prefix`, title/body templates, labels, draft, reviewers, and assignees. Branches are deterministic and never force-pushed. Atmos discovers updates before branch creation, so no update makes no branch, commit, push, or PR. `--pull-request` implies `--pull`; `--check` never writes.
88

9-
Supply `ATMOS_CI_GITHUB_TOKEN`, `ATMOS_PRO_GITHUB_TOKEN`, `GITHUB_TOKEN`, or `GH_TOKEN`, in that precedence order. Use `contents: write`, `pull-requests: write`, and `issues: write` as needed. A default `GITHUB_TOKEN` does not trigger downstream push/pull_request workflows; pair the Component Updater with the `github/sts` auth integration for a token that does — `atmos auth exec --identity <github-sts-identity> -- atmos vendor update --pull-request` mints a real GitHub App installation token and exports it as `ATMOS_PRO_GITHUB_TOKEN`, which the Component Updater already prefers over `GITHUB_TOKEN`.
9+
Supply `ATMOS_CI_GITHUB_TOKEN`, `ATMOS_PRO_GITHUB_TOKEN`, `GITHUB_TOKEN`, or `GH_TOKEN`, in that precedence order. Grant the job `contents: write` and `pull-requests: write`; add `issues: write` only when using labels or assignees. A default `GITHUB_TOKEN` does not trigger downstream push/pull_request workflows; pair the Component Updater with the `github/sts` auth integration for a token that does — its job needs `id-token: write` for the OIDC exchange. `atmos auth exec --identity <github-sts-identity> -- atmos vendor update --pull-request` mints a real GitHub App installation token and exports it as `ATMOS_PRO_GITHUB_TOKEN`, which the Component Updater already prefers over `GITHUB_TOKEN`.
1010

1111
GitHub Actions gets a Component Updater step summary on every vendor-update invocation when `GITHUB_STEP_SUMMARY` is available. It includes any PR link. Set `vendor.ci.summary.enabled: false` only when summaries must be suppressed. See `docs/prd/component-updater.md` for the full contract.

0 commit comments

Comments
 (0)