Skip to content

ci: use dedicated release App token to publish releases - #28553

Merged
jdomeracki-coder merged 2 commits into
mainfrom
fix/release-publish-app-token
Aug 25, 2026
Merged

ci: use dedicated release App token to publish releases#28553
jdomeracki-coder merged 2 commits into
mainfrom
fix/release-publish-app-token

Conversation

@jdomeracki-coder

@jdomeracki-coder jdomeracki-coder commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Problem

The Publish release step fails with HTTP 403: Resource not accessible by integration because the default GITHUB_TOKEN cannot create the release tag under the active tag-create protection ruleset.

Change

Use a dedicated GitHub App token for the Publish release step:

  • Add a Generate release App token step using secrets.RELEASE_APP_ID / secrets.RELEASE_APP_PRIVATE_KEY.
  • Switch only that step's GITHUB_TOKEN to the minted App token.

Required before merge (admin)

  1. Create the release GitHub App (least privilege) and install it on coder/coder.
  2. Configure RELEASE_APP_ID / RELEASE_APP_PRIVATE_KEY.
  3. Add the App to the tag-create protection ruleset bypass list.

Refs coder/security-automation#297.

The Publish release step runs gh release create, which creates the
v$version tag in addition to the release. The active tag-create
protection ruleset blocks github-actions[bot] (the default GITHUB_TOKEN),
producing HTTP 403: Resource not accessible by integration.

Mint an installation token from a dedicated release GitHub App
(RELEASE_APP_ID / RELEASE_APP_PRIVATE_KEY) and use it only for the
Publish release step. The App is added to the ruleset bypass list as an
Integration actor.

Refs coder/security-automation#297
@jdomeracki-coder

Copy link
Copy Markdown
Contributor Author

Created the custom app and set RELEASE_APP_ID & RELEASE_APP_PRIVATE_KEY

@mtojek mtojek left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job, Jakub! Let's backport this to v2.35, and see if it helps 👍 If so, then backport to v2.36.

@jdomeracki-coder
jdomeracki-coder merged commit be9f859 into main Aug 25, 2026
41 checks passed
@jdomeracki-coder
jdomeracki-coder deleted the fix/release-publish-app-token branch August 25, 2026 14:32
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 25, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants