fix(#1396): tokenless mint-on-demand git credential helper#1403
Merged
Conversation
MoltNet-Diary: c793f96a-35ad-4f3b-85ec-9a69333d07b6 Task-Group: rotate-embedded-ci-token Task-Family: feature
MoltNet-Diary: b115291d-ddd2-459a-ad81-03f63a19f94b Task-Group: rotate-embedded-ci-token
MoltNet-Diary: 24685a7f-241c-4dec-a111-d2a45e799fd9 Task-Group: rotate-embedded-ci-token
MoltNet-Diary: cefbecd3-d0cf-40b8-a80d-4a7803dd3cb2 Task-Group: rotate-embedded-ci-token
Contributor
✅ CLI go.mod matches internal Go module releases
|
Contributor
|
b9ce016 to
7fd4a7e
Compare
…wing MoltNet-Diary: c9f6f804-d111-488d-98d7-784be8efedbd Task-Group: rotate-embedded-ci-token Task-Completes: true
b9ea744 to
69c4144
Compare
MoltNet-Diary: 958cd0e9-0410-4aa6-8e95-5364b86c6cda Task-Group: rotate-embedded-ci-token
getlarge
approved these changes
Jun 17, 2026
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.
Closes #1396 (partial — see follow-up note on the CI guard).
Summary
Replaces the embedded-
ghs_-tokeninsteadofpattern with a tokenless mint-on-demand GitHub credential helper that lives in the agent gitconfig as the single source of truth. No secret ever lands on disk or in a tracked file.moltnet github setupnow writes a[credential "https://github.com"] helper = "!moltnet github credential-helper --credentials <abs>"block plus the[url] insteadOfSSH→HTTPS rewrite, idempotently.moltnet config repairgains a scanner that strips any embeddedgh[ps]_token from the repo.git/configand the agent gitconfig (the one-shot migration Rotate/remove stale CI GitHub App token embedded in .git/config #1396 asks for), and reinstalls nothing it doesn't need to.vm-manager.ts) drops its hand-rolledgit-credential-moltnetscript and imperativegit config --global ... insteadOfagainst the guest$HOME; it now relies on the injected gitconfig, rewriting only the helper's--credentialspath to the VM-sidemoltnet.json(via the new purerewriteGitconfigPaths).The mechanism combines issue proposals 1 and 3: tokenless, mints a fresh ~1h App token per git op via the existing
moltnet github credential-helper.Not in this PR
.github/workflows/ci.yml): the agent GitHub App lacksworkflowspermission, so it cannot push workflow changes. That commit is on branchissue-1396-ci-guardand needs a human/workflows-scoped push. Diarye33f967e/ episodic note record the constraint.Test plan
go vet ./...+go test ./...green (new tests for scrubbing helpers,buildCredentialBlock, idempotentgithub setup,config repairstripping a polluted.git/config).rewriteGitconfigPathstests).moltnet config repairagainst a real polluted repo strips the token and leaves nourl.*entry.git credential fillthrough the new agent gitconfig mints a fresh token with no secret on disk.MoltNet-Diary: e33f967e-242c-43aa-a27d-dcf9595e2da0