You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 71dde59
Browse filesBrowse the repository at this point in the historyBrowse files
Make the plaintext credential fallback visible and refusable
The fallback to ~/.astro/credentials.json fired silently: a user asked for
keychain storage, didn't get it, and had no way to find out or refuse. That
is the one part of this design the GitHub CLI regrets shipping — cli/cli#10108
is still open two years on, and their maintainers now propose erroring out
instead. Our exposure is worse than theirs: gh stores a non-expiring token, so
a keyring failure is a one-time login annoyance, whereas we store refresh
tokens and rotate, making every refresh another chance to spill to plaintext
long after any login-time warning has scrolled away.
- Warn on every plaintext write (once per process), naming the file and how
to refuse it. Hung off the write rather than store construction because
that's when secrets actually hit the disk.
- Add no_insecure_fallback (config) / ASTRO_NO_INSECURE_FALLBACK (env), which
makes an unavailable secure store an error instead of a downgrade. It can't
be a flag: the store is built before cobra parses flags, and an env var
suits the CI and container settings where the fallback actually fires.
On Windows this always errors until the Credential Manager backend lands,
since plaintext is currently the only option there.
- Check storeErr before login returns early from the pre-run hook. login
doesn't need existing credentials but does need somewhere to put new ones,
and that's the moment the reason it can't is worth stating. logout still
passes through: it has local context to reset even with a broken store.
- Stop claiming credentials moved "to your system's secure store" during
migration — on a host with no keyring that store is the plaintext file, and
the message printed directly under a warning saying so.
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01CBiU94fsKuCgdVfpGdL7aD
0 commit comments