Numeric issue IDs bypass project-scoped MCP sessions

オープン
#2,237 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
30/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
typescript
領域
cli, security

調査の方向性

Start with the project-scoped check added in commit 01b06bba (#1922) and see how it validates org-qualified targets and short IDs against the session's project. Then trace how issue view resolves a numeric ID to an issue and where the CLI could fetch the issue's project before reading or changing it. Done means a numeric ID outside the session's project is rejected in a sentry mcp --commands session, with tests covering the case.

索引モデルが issue の本文から書いたものです。

説明

Part of #1357. Found while reviewing #1922.

In a project-scoped sentry mcp --commands session, an issue command that takes a numeric ID can read or change an issue in another project of the same org. For example, issue view 12345 in an acme/web session reaches an issue that lives in acme/api. The command surface checks each target before the call, but a numeric ID doesn't say which project the issue belongs to, so it can't be checked there.

  • Org-qualified targets and issue short IDs are already checked against the session's project in #1922 (01b06bba). Numeric IDs are the remaining path.
  • The same gap applies to any other command that resolves an opaque ID to a project-owned resource.
  • Proposal (BYK, while reviewing #1922): after looking up the issue, the CLI compares its project with the session constraint before reading or changing anything. Since that's a CLI change outside #1922's command surface, it lands separately.

via @BYK.

--

View Session [Sentry]

主要言語
TypeScript
スター
961
フォーク
179
平均マージ
15時間 33分
マージ済み PR(30日)
476

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

getsentry/toolkit のほかの issue

getsentry/toolkit の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。