Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

`wrapMcpServerWithSentry` defaults `recordInputs` / `recordOutputs` to `true` (via `dataCollection.genAI`) |

Offen
#24,604 4 Kommentare 0 Reaktionen 1 zugewiesene Person Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
55/100
Issue-Typ
Bug
Klarheit
Größtenteils klar
Aktivitätsstatus
Aktiv
Tech-Stack
typescript

Rechercherichtung

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.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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 unless recordInputs/recordOutputs or dataCollection.genAI is explicitly enabled; or
  • Keep genAI defaults but make wrapMcpServerWithSentry() document and prefer explicit { recordInputs, recordOutputs } with a one-time startup log when both resolve to true.
  • 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.

Vorherrschende Sprache
TypeScript
Sterne
8.7k
Forks
1.9k
Ø Merge
1 T. 16 Std.
Gemergte PRs (30 T.)
576

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus getsentry/sentry-javascript

Alle Issues in getsentry/sentry-javascript

Ähnliche Issues

Weitere Issues zu TypeScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.