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
fix(cliExec): refresh credentials per CLI call instead of env-forwarding
Forwarding CODER_SESSION_TOKEN via the child env exposed it to any
sibling process via /proc/<pid>/environ on Linux and similar interfaces
elsewhere. Drop all env injection from cliExec and instead refresh the
file or keyring once via cliManager.configure inside resolveCliEnv,
mirroring the connection-time write in remote.ts. The CLI reads the
fresh token from the file (or keyring on supported systems) via the
existing --global-config / --url flags. mTLS still works since the
refresh accepts an empty token.
Also drop the keyringOnly option from storeToken (no longer needed now
that we always refresh) and update the matching tests.
Add writeStdoutJs / writeStderrJs helpers in test/utils/platform.ts that
generate fs.writeSync snippets, and use them in the cliExec and platform
tests. process.stdout/stderr.write is async on POSIX pipes and can be
lost on exit (nodejs/node#4112), which was making the version fallback
test flaky.
0 commit comments