Rejected regionUrl errors don't say how to recover when an agent passes the organization's web URL

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

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

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

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
84/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
typescript

調査の方向性

まず packages/mcp-core/src/internal/tool-helpers/validate-region-url.ts の58~65行付近を確認し、既存の拒否メッセージを読みます。許可リストの動作は維持したうえで、呼び出し元には webUrl ではなく find_organizations の regionUrl を使うか、regionUrl を省略するよう説明するエラーに変更します。拒否された組織のWeb URLが引き続き検証に失敗し、エラーにこれらの対処方法が含まれていれば完了です。

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

説明

mcp-feedback-pattern

Agents pass an organization's web URL (https://<org>.sentry.io, the webUrl from find_organizations) as regionUrl. The SSRF allowlist rightly rejects it, but the error only lists the allowed domains. It doesn't say the agent passed the wrong URL or that omitting regionUrl works, so agents retry with a guessed region or give up.

Where

  • packages/mcp-core/src/internal/tool-helpers/validate-region-url.ts (~L58-65) throws Invalid regionUrl. The domain '<org>.sentry.io' is not allowed. Allowed domains are: sentry.io, us.sentry.io, de.sentry.io with no next step.
  • ParamRegionUrl (packages/mcp-core/src/schema.ts ~L184-186) and find_organizations already describe regionUrl and webUrl correctly, so this is about recovery, not the description.

Expected

The rejection keeps the allowlist (no SSRF change) and tells the agent to pass the regionUrl from find_organizations, not the webUrl, or to omit regionUrl.

Reports

  • MCP-SERVER-GX7 (hosted, org-scoped URL): get_event_stacktrace rejected the org's web URL; the agent then guessed https://us.sentry.io and hit a 401 (also counted on #2495).
  • MCP-SERVER-GYN (hosted, org-scoped URL): get_issue_details and get_replay_details rejected the org's web URL as regionUrl; omitting regionUrl worked.

Report count: 2

via automation evt_905b9c478746fd9deeb853f85ad7441b · Run ID dispatch_d3a7b079a597fb34fdd749c9c82402a4.

--

View Session [Sentry]

主要言語
TypeScript
スター
975
フォーク
189
平均マージ
1日 2時間
マージ済み PR(30日)
571

環境構築

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

はじめの一歩

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

getsentry/toolkit のほかの issue

getsentry/toolkit の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

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

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