Omit OAuth client credentials from auth help text#1309
Merged
Conversation
pscale auth login/logout/check --help was printing the built-in client-id and client-secret defaults, which agents often scrape into cloud context. Keep the flags, but resolve the built-in values only at runtime when the flags are unset. Co-authored-by: Mike Coutermarsh <coutermarsh.mike@gmail.com>
mscoutermarsh
marked this pull request as ready for review
July 23, 2026 13:57
auth check never used --client-id or --client-secret; drop them instead of registering empty placeholders. Co-authored-by: Mike Coutermarsh <coutermarsh.mike@gmail.com>
mscoutermarsh
commented
Jul 23, 2026
| } | ||
|
|
||
| cmd.Flags().StringVar(&clientID, "client-id", psauth.OAuthClientID, "The client ID for the PlanetScale CLI application.") | ||
| cmd.Flags().StringVar(&clientSecret, "client-secret", psauth.OAuthClientSecret, "The client ID for the PlanetScale CLI application") |
Member
Author
There was a problem hiding this comment.
Flags are unused by this command, can be removed.
nholden
approved these changes
Jul 23, 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.
Summary
Fixes #1279.
pscale auth login --help(and the same flags onlogout) printed the built-in--client-idand--client-secretdefaults. Agents often scrape help into cloud context, which leaks those values and can trigger credential rotation policies.Changes
--client-id/--client-secretwith empty defaults so Cobra help no longer prints the built-in OAuth credentials.login/logout).--client-id/--client-secretfromauth checkentirely.--client-secrethelp string (previously said "client ID").Test plan
go test ./internal/cmd/auth/pscale auth login --helpno longer shows client-id/secret defaultsauth logout --helpauth checkno longer defines those flags