`wrapMcpServerWithSentry` defaults `recordInputs` / `recordOutputs` to `true` (via `dataCollection.genAI`) |
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 55/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- typescript
調査の方向性
Start in packages/core/src/integrations/mcp-server/transport.ts, especially resolveMcpOptions, and compare its capture defaults with dataCollection.genAI and the scrubbing posture in piiFiltering.ts. Clarify which explicit-option and genAI settings should enable capture, then verify that a bare MCP wrapper is metadata-only or emits the documented warning when both flags resolve true.
索引モデルが issue の本文から書いたものです。
説明
Static review of public source at commit b633c8153250. No traffic was sent to any Sentry environment.
MCP server instrumentation resolves capture flags like this:
packages/core/src/integrations/mcp-server/transport.ts:
function resolveMcpOptions(options: McpServerWrapperOptions): ResolvedMcpOptions {
// ...
const genAI = getClient()?.getDataCollectionOptions().genAI;
return {
recordInputs: options.recordInputs ?? genAI?.inputs ?? true,
recordOutputs: options.recordOutputs ?? genAI?.outputs ?? true,
};
}
dataCollection.genAI itself documents { inputs: true, outputs: true } as the default. So a bare Sentry.wrapMcpServerWithSentry(server) will put tool/prompt arguments and results on spans (tokens, file paths, user content, etc.) unless the operator remembers to pass { recordInputs: false, recordOutputs: false } or tighten dataCollection.genAI.
That is great for AI debugging; it is a surprising default for MCP servers that often proxy secrets and private data.
Suggested change:
- Default MCP wrapper capture to
false/ metadata-only unlessrecordInputs/recordOutputsordataCollection.genAIis explicitly enabled; or - Keep genAI defaults but make
wrapMcpServerWithSentry()document and prefer explicit{ recordInputs, recordOutputs }with a one-time startup log when both resolve totrue. - Mirror the scrubbing posture already used for network PII in
piiFiltering.ts.
Severity: low–medium / privacy & data-minimization defense-in-depth (parallel to the Python SDK EventScrubber recursive default discussion). Not claiming a Sentry platform vulnerability. No proof-of-concept.
Happy to send a focused PR if useful.
- 主要言語
- TypeScript
- スター
- 8.7k
- フォーク
- 1.9k
- 平均マージ
- 1日 16時間
- マージ済み PR(30日)
- 576
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
getsentry/sentry-javascript のほかの issue
-
Browser Bug Next.js Traces Waiting for: Product Owner
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
getsentry/sentry-javascript#24672 · コメント 1 件 ·
-
Flaky Test React Router Framework Spans Tests
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
getsentry/sentry-javascript#24348 · コメント 1 件 ·
-
javascript
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
getsentry/sentry-javascript#24200 · コメント 2 件 ·
-
javascript Task
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
getsentry/sentry-javascript#24134 · コメント 1 件 ·
-
Cloudflare Workers javascript Tests
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
getsentry/sentry-javascript#24051 · コメント 1 件 ·
getsentry/sentry-javascript の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
mksglu/context-mode#1200 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
jaegertracing/jaeger-ui#4506 ·
-
area:desktop area:ui bug platform:macos
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
anthropics/claude-code#96687 ·
-
good first issue
難易度 1/5 1時間未満 初心者へのやさしさ 95/100
AOSSIE-Org/DebateAI#582 · コメント 2 件 ·