Skip to content

Mask API tokens in auth:token --list - #200

Merged
joetannenbaum merged 1 commit into
mainfrom
mask-secrets
Aug 19, 2026
Merged

Mask API tokens in auth:token --list#200
joetannenbaum merged 1 commit into
mainfrom
mask-secrets

Conversation

@joetannenbaum

Copy link
Copy Markdown
Collaborator

auth:token --list printed saved API tokens in full, in the table and in the JSON. Every other secret in the CLI is masked by default, and this one is the most valuable of the lot: --list is documented with -n, which means JSON, so a live credential ends up in CI logs and agent transcripts from a command whose job is just to name the source of each token.

Tokens now show as ***** plus their last four characters, which is enough to tell apart two tokens for the same organization. --show-sensitive prints them in full.

The masking elsewhere runs through DTO transformers, but this command built a raw array, so nothing applied. It now builds an ApiToken DTO, which also keeps --show-sensitive working.

@joetannenbaum
joetannenbaum merged commit 1e72e6b into main Aug 19, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant