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

Đang mở Phù hợp với người mới
#2,777 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
84/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
typescript
Lĩnh vực
backend-api-design

Hướng nghiên cứu

Bắt đầu với packages/mcp-core/src/internal/tool-helpers/validate-region-url.ts ở khoảng dòng 58–65 và đọc thông báo từ chối hiện có. Giữ nguyên cách hoạt động của danh sách cho phép, sau đó sửa lỗi để giải thích rằng bên gọi nên dùng regionUrl từ find_organizations thay vì webUrl, hoặc bỏ qua regionUrl. Hoàn tất khi các URL web của tổ chức bị từ chối vẫn không vượt qua bước xác thực và lỗi có nêu các cách khắc phục đó.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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]

Ngôn ngữ chính
TypeScript
Star
975
Fork
189
Merge trung bình
1 ngày 2 giờ
Pull request đã merge (30 ngày)
571

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của getsentry/toolkit

Tất cả issue của getsentry/toolkit

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.