Skip to content

feat(mcpx): surface Auth.Describe() in mcpx config and mcpx doctor (#1926) - #2593

Merged
dezren39 merged 4 commits into
mainfrom
queue/3220-1926-auth-describe
Oct 30, 2026
Merged

dezren39 merged 4 commits into
mainfrom
queue/3220-1926-auth-describe

Conversation

@dezren39

@dezren39 dezren39 commented Oct 30, 2026 •

Copy link
Copy Markdown
Member

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 by mcpx config and mcpx doctor" but had no production caller, and neither surface mentioned auth. Now:

  • mcpx config — each server row carries an auth field with the Describe() summary (bearer ${VAR}, none, …).
  • mcpx doctor — a new auth check 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): with MCPX_AUTH_TEST_TOKEN set in the environment, a bearer server shows bearer ${MCPX_AUTH_TEST_TOKEN} in config JSON and in doctor -v output, a no-auth server shows "auth": "none", and the resolved secret value appears in neither output. Laptop: cli package passes except the pre-existing TestParityDocumentIsCurrent (fails identically on clean base — generated parity doc, unrelated).

On merge, #1926's acceptance criteria are fully met and it can close.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

…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).
@dezren39
dezren39 requested a review from a team as a code owner October 30, 2026 06:10
@coderabbitai

coderabbitai Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You'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.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: da0ba214-e810-4174-bdca-f9410f67c808
Commits

Reviewing files that changed from the base of the PR and between 2aec81c and bb6082c.

Files selected for processing: 5
  • pkgs/mcpx/internal/cli/auth_describe_test.go
  • pkgs/mcpx/internal/cli/doctor.go
  • pkgs/mcpx/internal/cli/root.go
  • pkgs/mcpx/internal/mcpauth/mcpauth.go
  • pkgs/mcpx/internal/mcpauth/mcpauth_test.go
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-30T09:42:27.781296Z bb6082c New commits
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread pkgs/mcpx/internal/cli/root.go Resolved
#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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread pkgs/mcpx/internal/mcpauth/mcpauth.go Resolved
)

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.
@dezren39
dezren39 merged commit cc52976 into main Oct 30, 2026
1 check passed
@dezren39
dezren39 deleted the queue/3220-1926-auth-describe branch October 30, 2026 09:44
@dezren39
dezren39 restored the queue/3220-1926-auth-describe branch November 8, 2026 04:09
@dezren39
dezren39 deleted the queue/3220-1926-auth-describe branch November 8, 2026 13:21
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