molecule-core/workspace/scripts
Molecule AI Core-DevOps 7ae3ee786f
Some checks failed
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 4s
sop-tier-check / tier-check (pull_request) Failing after 4s
feat(workspace): add static .github-token fallback to git credential helper
Adds a 4th fallback step to the token chain (cache > API > env > static)
so workspace git/gh operations survive a platform outage without requiring
a restart or platform-side fix. Addresses the 2026-05-08 incident where
every workspace lost git+gh auth simultaneously when the
/github-installation-token endpoint returned 500.

Operator places a PAT in ${CONFIGS_DIR:-/configs}/.github-token
(no root needed — /configs is agent-writable). Both _fetch_token
(git credential helper path) and _refresh_gh (gh CLI daemon path)
gain the static fallback so git and gh both recover post-incident.

Pure additive — existing cache > API > env chain is unchanged.
Empty static file is rejected (whitespace-stripped before use).
Static path never writes the cache, so the API recovers transparently
on the next refresh cycle when it comes back online.

Ref: issue #140.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-10 02:17:22 +00:00
..
gh-wrapper.sh ci(gh-wrapper): translate --assignee @me → --label team:<role> 2026-04-24 00:34:21 -07:00
molecule-gh-token-refresh.sh fix(workspace): credential helper security hardening (#1797) 2026-04-23 18:14:55 +00:00
molecule-git-token-helper.sh feat(workspace): add static .github-token fallback to git credential helper 2026-05-10 02:17:22 +00:00