Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

A stripped stamp re-adopted on a different secret-store backend still loses what only the old backend held

未关闭
#2,672 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
typescript
领域
backend, security

调研方向

Read the linked issue #2630 and PR #2671, then trace the ledger and secret-store carry-over and purge paths described in this report. Reproduce the sequence with mixed versions and a backend switch, including a changed client registration. Done means a design prevents loss of secrets without restoring values deliberately cleared under the successor namespace.

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

描述

bug v2

Problem

Follow-up to #2630 (PR #2671, raised in its Copilot review). #2671 carries an unstamped file's missing secrets over from the namespaces its ledger records before purging them. It reads those namespaces through the current run's secret store only. The ledger records entries per store location, so the carry-over has a gap when the backend changes in between:

  1. 2.10 saves on the keychain under namespace ns1, including a confidential DCR client's client_secret.
  2. A ≤ 2.9.x save strips the stamp.
  3. The next 2.10 run lands on a different backend (locked keychain → secrets.json, or the memory fallback). It re-adopts under ns2. The carry-over reads ns1 from that backend, finds nothing, and the stamp commits. The keychain's ns1 record is correctly kept, because only a keychain run purges keychain records.
  4. A later keychain run sees a stamped file (ns2), which never falls back, and purges ns1 from the keychain. That deletes the only copy of the secret.

Why it was not fixed in #2671

The obvious fix is to reconcile missing fields from a superseded namespace into the current, stamped namespace before purging it. That is unsafe as it stands:

  • A field missing from ns2 may be one the user deliberately cleared under ns2 (a logout, a policy downgrade). Carrying ns1's value back would resurrect it. This is why a stamped file never falls back.
  • The store holds a client_secret without the client_id it belongs to. If ns2 re-registered as a public client, a carried-over secret would be paired with the wrong client.

Expected

A design that tells "never carried, because the backend was absent" apart from "cleared since". For example, the ledger could record per location whether a namespace's contents were carried into its successor, and the purge could reconcile only namespaces that were never carried, for the entries the stamped file still indexes. Alternatively, defer the purge and accept the leak, with a warning. Needs both mixed versions and a backend switch between runs, so it is narrower than #2630.

主要语言
TypeScript
星标
11.1k
派生
1.5k
平均合并
4 小时 14 分钟
30 天内合并 PR
162

环境准备

从这里开始

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

modelcontextprotocol/inspector 的其他 Issue

查看 modelcontextprotocol/inspector 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

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