Skip to content

ci: mint GitHub App tokens instead of warpmachineuser PATs - #16655

Merged
harryalbert merged 2 commits into
masterfrom
harry/ci-github-app-tokens
Oct 28, 2026
Merged

harryalbert merged 2 commits into
masterfrom
harry/ci-github-app-tokens

Conversation

@harryalbert

Copy link
Copy Markdown
Contributor

Description

Replaces the warpmachineuser PATs CHANNEL_VERSIONS_REPOSITORY_DISPATCH_TOKEN and DOCS_REPOSITORY_DISPATCH_TOKEN with short-lived tokens minted by Octo STS (octo-sts/action@f603d3be9d8dd9871a265776e625a27b00effe05 # v1.1.1). The job's Actions OIDC token is exchanged for a token scoped to the target repo; no App private key, variable, or secret is involved. The action revokes each token when the job ends.

Octo STS identities

Identity Scope Subject Permissions Policy
warp-internal-dispatch warpdotdev/channel-versions repo:warpdotdev/warp-internal:ref:refs/heads/(master|[a-z]+_release/.+) contents: write (required for repository_dispatch) warpdotdev/channel-versions#1037
warp-internal-dispatch warpdotdev/docs repo:warpdotdev/warp-internal:ref:refs/heads/master contents: write (required for repository_dispatch) warpdotdev/docs#960
  • cut_new_releases.yml runs on master (schedule / workflow_dispatch); cut_new_release_candidate.yml is dispatched on <channel>_release/* branches. Both update_channel_versions jobs gain id-token: write.
  • notify-docs-settings-changed.yml runs on master pushes; the dispatch job gains id-token: write.

Other changes

  • The dispatch job in notify-docs-settings-changed.yml keeps if: github.repository == 'warpdotdev/warp-internal'. repo-sync copies these workflows to public warp; the octo-sts/action steps are harmless there, but the trust policies name warp-internal subjects, so warp-sourced runs would be rejected. Cut New Releases / Cut New Release Candidate are disabled in warp.

Human prerequisites (before merge)

  • The Octo STS App is installed on channel-versions and docs.
  • The warp-internal-dispatch policies are merged to the default branches of channel-versions and docs.

Post-merge verification

  • The next Cut New Releases or Cut New Release Candidate run: the update_channel_versions job passes and the repository_dispatch run in channel-versions shows octo-sts[bot] as triggering_actor.
  • The next merge touching app/src/settings_view/**: notify-docs-settings-changed passes in warp-internal and is skipped in warp; the docs dispatch run shows octo-sts[bot] as triggering_actor.
  • Then delete CHANNEL_VERSIONS_REPOSITORY_DISPATCH_TOKEN and DOCS_REPOSITORY_DISPATCH_TOKEN.

Testing

  • actionlint on the 3 changed files: no new findings (the pre-existing shellcheck findings in untouched run: blocks are unchanged vs master).
  • I did not run the workflows: the trust policies are not on the target default branches yet.

Opened from patches authored by @captainsafia.

CHANGELOG-NONE

Co-Authored-By: Warp agent@warp.dev

captainsafia and others added 2 commits October 28, 2026 14:40
Replace CHANNEL_VERSIONS_REPOSITORY_DISPATCH_TOKEN and DOCS_REPOSITORY_DISPATCH_TOKEN with short-lived installation tokens scoped to the dispatch target, and run the docs settings dispatch only in warp-internal.

Co-Authored-By: Warp <agent@warp.dev>

Copy link
Copy Markdown
Contributor Author

@harryalbert
harryalbert merged commit 365e3c8 into master Oct 28, 2026
27 checks passed
@harryalbert
harryalbert deleted the harry/ci-github-app-tokens branch October 28, 2026 19:09
harryalbert added a commit that referenced this pull request Oct 28, 2026
…#16674)

## Summary
Client releases have failed every day since 10/26 because
`create_release.yml` depends on three stored credentials that no longer
work. This replaces all of them with per-run OIDC federation, so there's
nothing left to rotate.

- **`WARP_CHANNEL_CONFIG_ACCESS_SSH_KEY`** (dead SSH key; every build
job fails at compile time because `script/install_channel_config` can't
clone `warp-channel-config`): `prepare_environment` now takes
`install_channel_config: true` instead of `ssh_key`, mints a `contents:
read` token for `warpdotdev/warp-channel-config` via Octo STS, rewrites
the SSH URL to HTTPS with that token, and sets
`CARGO_NET_GIT_FETCH_WITH_CLI=true` so `cargo install --git` honors the
rewrite. Only runs in `warpdotdev/warp-internal`; elsewhere the install
still falls back gracefully.
- **`GOOGLE_APPLICATION_CREDENTIALS`** (service-account JSON key,
deleted; all 15 GCS uploads and the Linux PGP key fetch fail with
`invalid_grant`): every `google-github-actions/auth` step now uses
`workload_identity_provider` + `service_account:
github-actions@astral-field-294621` through the shared GitHub Actions
WIF pool.
- **`GH_APP_CREDENTIALS_TOKEN`** (suspended App; legacy non-stable
changelog): replaced with an Octo STS token (`release-changelog`,
`contents: read` + `pull_requests: read` on warp-internal). Policy added
at `.github/chainguard/release-changelog.sts.yaml`.
- `id-token: write` added at the workflow level in `create_release.yml`
and on the calling jobs in `cut_new_releases.yml` /
`cut_new_release_candidate.yml` (a reusable-workflow caller must grant
what the callee declares).

Stacked on #16655 (which already touches the two cut workflows).

## Prerequisites (before merge)
1. warpdotdev/warp-terraform#1718 applied — grants the warp-internal WIF
principal `workloadIdentityUser` on the release SA.
2. warpdotdev/warp-channel-config#8 merged, and the octo-sts App
installed on `warp-channel-config`.
3. This PR's repo-sync lands in warp-internal (the `release-changelog`
policy and the workflow changes both need to be on warp-internal
`master`).

## Verification
- After merge: trigger `Create Release` via `workflow_dispatch` for
`dev` (no publish) — every build job must get past `Install
dependencies` with the channel config installed.
- The next scheduled `Cut New Releases` must upload to `warp-releases/…`
and fetch the PGP key without `invalid_grant`.
- Then delete `WARP_CHANNEL_CONFIG_ACCESS_SSH_KEY`,
`GOOGLE_APPLICATION_CREDENTIALS`, and `GH_APP_CREDENTIALS_TOKEN` from
warp-internal.

## Not covered here
`ACTION_MONITORING_SLACK` (`account_inactive`) still needs a new Slack
bot token — it's why nobody was paged about the failing releases.

CHANGELOG-NONE

Co-Authored-By: Warp <agent@warp.dev>

Co-authored-by: Warp <agent@warp.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants