`wrapMcpServerWithSentry` defaults `recordInputs` / `recordOutputs` to `true` (via `dataCollection.genAI`) |
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 55/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- typescript
- Ambito
- backend-api-design, security
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- TypeScript
- Stelle
- 8.7k
- Fork
- 1.9k
- Merge medio
- 1g 16h
- PR unite (30g)
- 576
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di getsentry/sentry-javascript
-
Browser Bug Next.js Traces Waiting for: Product Owner
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
getsentry/sentry-javascript#24672 · 1 commento ·
-
Flaky Test React Router Framework Spans Tests
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
getsentry/sentry-javascript#24348 · 1 commento ·
-
javascript
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
getsentry/sentry-javascript#24200 · 2 commenti ·
-
javascript Task
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
getsentry/sentry-javascript#24134 · 1 commento ·
-
Cloudflare Workers javascript Tests
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
getsentry/sentry-javascript#24051 · 1 commento ·
Tutte le issue di getsentry/sentry-javascript
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
mksglu/context-mode#1200 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
jaegertracing/jaeger-ui#4506 ·
-
area:desktop area:ui bug platform:macos
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
anthropics/claude-code#96687 ·
-
good first issue
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 95/100
AOSSIE-Org/DebateAI#582 · 2 commenti ·