Redact URL query secrets in error text displayed by the web and TUI clients
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 65/100
- Issue 类型
- 功能
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- typescript
调研方向
Start by examining core/mcp/fetchTracking.ts to understand redactUrlQuery and the existing redaction logic. Look at clients/cli/src/error-handler.ts to see the current redactUrlsInText implementation. Then, review the web client's error display in clients/web/src/App.tsx and the TUI client's error display in the mentioned files (App.tsx, ResourcesTab, etc.). The goal is to move the redaction logic to core, create a shared helper, and apply it at the display boundary in each client. Testing will involve the existing tests and potentially adding new ones in clients/web/src/test/core/.
由索引模型根据 Issue 内容生成。
描述
Raised in review of #2488 (which closes #2423) and declined there as out of scope.
Background
#2423 asked the CLI/TUI to match the web client's URL redaction. The web client redacts query secrets (code, access_token, client_secret, …) through redactUrlQuery in exactly two places: the recorded Network log (core/mcp/fetchTracking.ts) and OAuthRequestTimeoutError's message (core/auth/requestTimeout.ts). #2488 extends the same guarantee to the CLI's stderr JSON envelope, which is written to terminals, CI logs and pipes.
The gap
Neither interactive client redacts error text it displays on screen.
- Web:
clients/web/src/App.tsxputserr.messagestraight into toasts in several places (e.g. ~L138, ~L1304, ~L1417, ~L1634). - TUI: about 20 sites across
App.tsx,ResourcesTab,PromptsTab,SkillsTab,AuthTaband the*TestModals rendererr.message/String(err)as-is.
So a server or SDK error whose text contains https://…?code=… is shown verbatim. The risk is lower than the CLI case: this is the user's own screen, not a serialized or piped artifact. It is still a screenshot or screen-share away from leaking.
Suggested shape
- Move the CLI's
redactUrlsInText(added in #2488,clients/cli/src/error-handler.ts) intocore/mcp/fetchTracking.tsnext toredactUrlQuery, with its tests underclients/web/src/test/core/. - Have the CLI import it from core.
- Apply it at one display boundary per client rather than at each call site, e.g. a shared
errorMessage(err)helper in each client (web already hasutils/errorFormat).
- 主要语言
- TypeScript
- 星标
- 11k
- 派生
- 1.5k
- 平均合并
- 5 小时 48 分钟
- 30 天内合并 PR
- 143
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
modelcontextprotocol/inspector 的其他 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 68/100
modelcontextprotocol/inspector#2515 ·
维护者通常 1 天内回复
-
enhancement v2
难度 2/5 1-3 小时 新手友好度 76/100
modelcontextprotocol/inspector#2438 · 1 条评论 ·
维护者通常 1 天内回复
-
bug v2
难度 3/5 1-2 天 新手友好度 78/100
modelcontextprotocol/inspector#2517 · 1 条评论 ·
维护者通常 1 天内回复
-
bug
难度 3/5 1-2 天 新手友好度 65/100
modelcontextprotocol/inspector#2516 ·
维护者通常 1 天内回复
-
Document our software factory approach可能已有人在做 @BobDickinson 于 2 天前认领。 未关闭documentation v2
modelcontextprotocol/inspector#2497 · 已指派 1 人 ·
维护者通常 1 天内回复
查看 modelcontextprotocol/inspector 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
rohitg00/agentmemory#1428 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 86/100
boxlite-ai/boxlite#1729 ·
维护者通常 1 天内回复
-
detectors enhancement good first issue
难度 2/5 1-3 小时 新手友好度 86/100
SM260845/readme-gen#1 ·
-
难度 2/5 1-3 小时 新手友好度 88/100
angular/angularfire#3774 ·
维护者通常 2 天内回复