You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Filter sensitive GraphQL variable values by name when variables are collected #5965
When GraphQL variables are collected, SentryGraphQLHttpFailedRequestHandler attaches them to Request.Data exactly as sent. A variable named password, token or apiKey reaches Sentry with its value.
The other key-value data DataCollection covers (headers, cookies, URL query params) goes through the sensitive denylist in SensitiveDataFilter: the key is kept and a matching value becomes [Filtered]. GraphQL variables are key-value data too, but DataCollection.GraphQL.Variables is all or nothing.
This isn't a regression. SendDefaultPii = true has always sent variables as-is, and #5934 keeps that. It came up as an optional suggestion in the automated review of #5934.
Before implementing
The Data Collection spec defines graphQL.variables as a Boolean, with no filtering by name. sentry-java's GraphqlUtils.filterRequestBody keeps or removes the whole variables member and doesn't scrub values. So this needs either a spec change (for example, letting variables take a KeyValueCollectionBehavior, as stackFrameVariables can since 0.9.0) or a decision to do it in .NET only.
Variables are arbitrary JSON. Decide whether nested keys are matched too, as in {"input": {"password": "..."}}.
Where
src/Sentry/GraphQLRequestContent.cs: FilterRequestContent already rewrites the body with Utf8JsonWriter, so filtering values could happen there.
src/Sentry/Internal/DataCollection/SensitiveDataFilter.cs: the denylist.
Activity
linear-code commentedon Nov 18, 2026
NET-941
jamescrosswell commentedon Nov 18, 2026
Not planned: we're matching sentry-java, which keeps or drops the whole
variablesmember and doesn't filter values by name. #5934 already does this.