Repository navigation
feat(mcpx): surface Auth.Describe() in mcpx config and mcpx doctor (#1926) - #2593
Conversation
…1926) The last open item of #1926: mcpauth.Auth.Describe() documented itself as used by mcpx config and mcpx doctor but had no production caller. CmdConfig rows now carry an auth field (s.Auth.Describe() — bearer/basic/header/query show only the variable reference, never the resolved value), and doctor gains an auth check listing each server posture in the same redacted form. Tests (internal/cli/auth_describe_test.go): a bearer-from-env server shows bearer ${VAR} in config JSON and in doctor -v output, a no-auth server shows none, and the resolved env value appears in neither. cli package passes except the pre-existing TestParityDocumentIsCurrent (fails on clean base too).
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 24 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b1041f8bc5
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
#1926) Codex P2 on PR #2593: redactRef trusted any value starting with $, so a mixed credential such as ${TOKEN_PREFIX}.private-secret-suffix was printed whole by the new mcpx config / mcpx doctor callers, leaking the literal (secret) half. A value is now shown only when it consists entirely of $VAR / ${VAR} references; anything with literal characters is redacted whole. Regression test covers mixed forms and pure-reference forms.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a6dc35b456
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
) Codex P2 on PR #2593 @a6dc35b4: the pure-reference scanner let an unbraced name run over digits and letters alike, so privateSecret scanned as one reference and Describe printed it whole -- while ResolveWith uses os.Expand, which reads as a complete one-character variable and leaves privateSecret literal. isPureRef now mirrors getShellName: an unbraced name starting with a shell special variable character (a digit or * # $ @ ! ? -) is exactly one character. Regression test covers the numeric-suffix leak and a pure composition.
The one remaining item of #1926 (queue task 3220; triage task 2822 verified the auth block itself is already applied by the pool).
mcpauth.Auth.Describe()documented itself as "Used bymcpx configandmcpx doctor" but had no production caller, and neither surface mentioned auth. Now:mcpx config— each server row carries anauthfield with theDescribe()summary (bearer ${VAR},none, …).mcpx doctor— a newauthcheck lists every server's posture in the same form.Both surfaces show only the variable reference, never the resolved value —
Describe()is redacted by design and these outputs are exactly what people paste into issues.Tests (
internal/cli/auth_describe_test.go): withMCPX_AUTH_TEST_TOKENset in the environment, a bearer server showsbearer ${MCPX_AUTH_TEST_TOKEN}in config JSON and indoctor -voutput, a no-auth server shows"auth": "none", and the resolved secret value appears in neither output. Laptop: cli package passes except the pre-existingTestParityDocumentIsCurrent(fails identically on clean base — generated parity doc, unrelated).On merge, #1926's acceptance criteria are fully met and it can close.
Need help on this PR? Tag
@codesmith-botwith what you need.