Repository navigation
fix(github-copilot): device login no longer leaves plaintext tokens - #133033
Merged
Merged
Conversation
Contributor
|
🦞👀 Pull request received. I will update this pull request when review starts. |
Member
Author
|
Merged via squash.
|
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Aug 30, 2026
Co-authored-by: Jason Sy <[email protected]>
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.
Related: #106724
What Problem This Solves
Fixes an issue where users completing GitHub Copilot device login would have the resulting GitHub token stored inline in the agent auth profile.
openclaw secrets audit --checkthen correctly reported the durable plaintext credential, even though noninteractive onboarding could already persist an environment-backedtokenRef.Why This Change Was Made
GitHub Copilot device login now requests host-owned protected persistence by default. OpenClaw keeps the token inline only while staged validation runs, then writes it to the built-in local secret store and persists a stable
tokenRefat the final auth commit boundary. Public and enterprise login use the same path.An explicit
--secret-input-mode plaintextchoice remains supported and visible to the audit. If the protected store cannot be written, login fails with repair guidance before replacing the previous auth profile; it never silently falls back to plaintext. Existing ref-backed profiles and noninteractive onboarding are unchanged.The built-in store requires no external secret-provider configuration. It is write-only through OpenClaw's user-facing secret APIs, but it is not encrypted at rest and continues to rely on state-directory permissions.
User Impact
Interactive GitHub Copilot login no longer leaves a durable access token inline by default. Existing installations without an external secret provider still get protected-store persistence automatically, while operators who explicitly select plaintext mode keep the previous compatibility behavior and audit warning.
Evidence
c40316696968e53571c1432026fe8f281e58c000: the focused device-token persistence test expected a protected-store write and observed zero writes; the synthetic auth profile producedPLAINTEXT_FOUNDatprofiles.github-copilot:github.token.openclaw secrets audit --checkcontinues to report it.Focused command:
Production LOC: +374/-28 (net +346) | Tests/test support: +207/-2 | Docs: +49/-10. The production growth establishes the generic provider-auth storage and compensation boundary; it adds no config or schema surface.