Repository navigation
ci: keep the release token out of the push URL - #5
Merged
Merged
Conversation
The release bump passes its GitHub App token through a credential helper instead of embedding it in the remote URL, so it can't appear in logs. The URL keeps the user name so that CircleCI checkout's https-to-ssh rewrite doesn't match it. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
earakely-scale
requested review from
a team and
polakamtejas
as code owners
September 30, 2026 16:08
| # The token reaches git through a credential helper that reads it from the environment at | ||
| # push time, so it is never part of a URL that git or this script could print. The user name | ||
| # stays in the URL so CircleCI checkout's global https-to-ssh insteadOf rewrite does not match. | ||
| git config credential.helper '!f() { echo username=x-access-token; echo "password=${GH_TOKEN}"; }; f' |
There was a problem hiding this comment.
The new credential.helper returns GH_TOKEN for any HTTPS Git host in this checkout. The bump job currently uses only GitHub, but if a later Git call uses another host, it could send that host the release token. Limit the helper to the intended host.
How this was verified: The helper returns GH_TOKEN without checking the host Git asks it to authenticate.
Prompt To Fix With AI
This is a comment left during a code review.
Path: scripts/circleci_release_bump.sh
Line: 27
Comment:
**Token can reach another host**
The new `credential.helper` returns `GH_TOKEN` for any HTTPS Git host in this checkout. The bump job currently uses only GitHub, but if a later Git call uses another host, it could send that host the release token. Limit the helper to the intended host.
**How this was verified:** The helper returns `GH_TOKEN` without checking the host Git asks it to authenticate.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The release bump now passes its GitHub App token through a credential helper instead of embedding it in the remote URL, so the token can't appear in logs.
The URL keeps the
x-access-tokenuser name. Without it, CircleCI checkout'shttps://github.com→ ssh rewrite would match the URL and send the push to the read-only deploy key.This goes out as its own release, separate from the first release from this repository, so a problem here can be reverted on its own.
Test plan
bump-version: the bump job pushes the version commit and tag,publishgoes green on the tag, and the downstream pin bump runs.🤖 Generated with Claude Code
The PR appears safe to merge, with a non-blocking need to limit where the helper supplies the release token.
Fix with agent prompt
Summary
The release bump now gives Git its GitHub App token through a credential helper instead of putting it in the remote URL. It keeps the
x-access-tokenusername so CircleCI’s HTTPS-to-SSH rewrite does not match.x-access-tokenusername but leaves out the token.GH_TOKENas the password when Git asks.Reviews (1) · Last reviewed commit: "ci: keep the release token out of the pu..."