TUI Info tab prints configured credentials (auth headers, URL tokens) in plain text

未关闭 适合新手
#3,131 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
80/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
react, typescript
领域
cli, security

调研方向

从 clients/tui/src/components/InfoTab.tsx 和 core/mcp/sensitiveNames.ts 中的敏感名称规则入手;比较 Network 标签页如何隐藏 header 和 URL 查询参数。更新 Info 标签页,按照这些规则屏蔽凭据值,然后验证配置的 URL 和 header 显示的是已屏蔽的值。

由索引模型根据 Issue 内容生成。

描述

bug v2

Found during the v2.18.0 release smoke (#3127). Pre-existing, not caused by a 2.18.0 change.

Problem

The TUI's Info tab, under "Server Configuration", prints the configured server URL and headers verbatim, credentials included:

URL: …/mcp?access_token=SECRETQ999&tenant=acme
Headers: Authorization=Bearer SECRETAUTH123, X-Auth-Token=SECRETXAT456, Ocp-Apim-Subscription-Key=SECRETOCP789, DPoP=SECRETDPOP000, …

Each secret reached the terminal stream 7 times in one session. It is rendered by clients/tui/src/components/InfoTab.tsx (since 373f346e5).

That contradicts the rule PR #3078 (#3077) set for the TUI: the TUI has no Reveal control, so it shows redacted copies. Its Network tab now does, showing authorization: [REDACTED], access_token=%5BREDACTED%5D and so on, while the Info tab shows the same values in plain text. A screen share or a terminal recording exposes them.

Repro

  1. Run --tui --config with a streamable-HTTP entry whose URL carries ?access_token=… and whose headers include Authorization, X-Auth-Token and Ocp-Apim-Subscription-Key.
  2. Connect, then open the Info tab.

Expected

The Info tab masks sensitive header values and credential-like query parameters, using the same sensitive-name rules (core/mcp/sensitiveNames.ts) as the Network tab.

主要语言
TypeScript
星标
11.4k
派生
1.6k
平均合并
2 小时 27 分钟
30 天内合并 PR
121

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

modelcontextprotocol/inspector 的其他 Issue

查看 modelcontextprotocol/inspector 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。