Skip to content

[OPS-1301] Use baton-ci app token in capabilities_and_config.yaml#17

Merged
ennyjfrick merged 1 commit into
mainfrom
ennyfrick/ops-1301-baton-ci-migration
May 4, 2026
Merged

[OPS-1301] Use baton-ci app token in capabilities_and_config.yaml#17
ennyjfrick merged 1 commit into
mainfrom
ennyfrick/ops-1301-baton-ci-migration

Conversation

@ennyjfrick

Copy link
Copy Markdown
Contributor

Replace the long-lived RELENG_GITHUB_TOKEN PAT with a short-lived baton-ci app token scoped to the current repo.

Mirrors the OPS-1300 templated workflow pattern. With the Connector Rules ruleset hardened, the legacy PAT only continues to work because of the temp org-admin mitigation; this PR replaces it with the proper App-token bypass actor before that mitigation is removed.

Linear: OPS-1301

🤖 Generated with Claude Code

Replace the long-lived RELENG_GITHUB_TOKEN PAT with a short-lived
baton-ci app token scoped to the current repo. Mirrors the OPS-1300
templated workflow pattern; needed before the temp org-admin
mitigation can safely be removed.

Linear: https://linear.app/ductone/issue/OPS-1301

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@ennyjfrick
ennyjfrick requested a review from a team April 30, 2026 15:56
@linear

linear Bot commented Apr 30, 2026

Copy link
Copy Markdown

@github-actions

github-actions Bot commented Apr 30, 2026

Copy link
Copy Markdown

Claude finished @ennyjfrick's task in 49s —— View job


PR Review: [OPS-1301] Use baton-ci app token in capabilities_and_config.yaml

  • Gather context and read changed files
  • Review PR diff against origin/main
  • Post review feedback

Summary

This PR replaces the long-lived RELENG_GITHUB_TOKEN PAT with a short-lived baton-ci GitHub App token in the capabilities_and_config.yaml workflow. The change is clean and follows the established pattern.

Review

LGTM — this is a straightforward and well-scoped security improvement.

What changed:

  • A new "Mint baton-ci app token" step is added before checkout, using actions/create-github-app-token@v2
  • The checkout step switches from ${{ secrets.RELENG_GITHUB_TOKEN }} to ${{ steps.ci-token.outputs.token }}

What I verified:

  • The token-minting block is identical to the existing pattern in update-dependencies.yaml (same action version, same inputs, same step id) — consistent and correct.
  • The EndBug/add-and-commit@v9 step at the end of the workflow doesn't specify an explicit github_token input, so it inherits the token from the checkout step. Since checkout now uses the app token, pushes will be attributed to the baton-ci app — this is the desired behavior and ensures the commit can bypass the Connector Rules ruleset.
  • Token scope is correctly narrowed to owner + current repository only.

Remaining RELENG_GITHUB_TOKEN references (informational, not blocking):

  • .github/workflows/release.yaml
  • .github/workflows/verify.yaml

These are presumably tracked separately (the PR description mentions this mirrors OPS-1300 for the templated workflow pattern).

No issues found. Ship it.

@ennyjfrick
ennyjfrick merged commit a30d2d0 into main May 4, 2026
6 of 10 checks passed
@ennyjfrick
ennyjfrick deleted the ennyfrick/ops-1301-baton-ci-migration branch May 4, 2026 18:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants