Repository navigation
Explain and the MCP check tool mask credential values (#134) - #139
Merged
Merged
Conversation
Every credential form block messages already hide (--token, --password, --kube-token, Vercel's -t VALUE, -t=VALUE, -tVALUE and -dt VALUE) is checked in explain's text output, its --json and the MCP cloudpin_check result. Controls: other words stay as typed, the --json argv keeps its length and positions, and the verdict still comes from the real token. Fails until explain masks the words it repeats. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
cloudpin explain (text and --json) and the MCP cloudpin_check tool repeated a command's words unmasked, so a --token value reached the terminal or the agent transcript. The word-level masking behind block and confirmation messages (#123) is now maskArgv in src/format.ts, and explain uses it when it builds each call, after the guard has decided on the real words. The --json argv array keeps its length and positions; only the values change to ***. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Closes #134. Draft until the v1.2.0 tag; the CHANGELOG and ROADMAP lines get added then.
cloudpin explain(text and--json) and the MCPcloudpin_checktool repeated the command's words unmasked, tokens included. The word-level masking fromdisplayCommandis nowmaskArgvinsrc/format.ts. It keeps the same length and positions and still has a single list of secret flags.explain()builds each call'sargvwith it, afterguard()has read the real words, so all three outputs are masked and verdicts don't change.test/explain.test.tsreadargv. paureis/cloudpin-action doesn't read it.Checks
test/explain-secrets.test.ts(new, 103 tests) covers 12 credential forms (Vercel throughvercelandvc, kubectl--token/--password, helm--kube-token).--jsonand MCP.npm run typecheck: exit 0.npm test: 1370 passed, 8 skipped.🤖 Generated with Claude Code