getsentry / getsentry/sentry-dotnet
DataCollection phase 0: always redact sensitive header values
- Dominant language
- C#
- Stars
- 770
- Forks
- 248
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 51
Description
Part of getsentry/sentry-dotnet#5420. Phase 0 — hardening pre-work, no new public API.
Today only `Authorization` and `Proxy-Authorization` header values are redacted (`src/Sentry/Internal/RedactedHeaders.cs`, `SentryRequest.AddHeaders`, `Protocol/Response.AddHeaders`), and only in some paths. Apply the full sensitive-terms denylist filter to header **values** unconditionally — regardless of `SendDefaultPii` — in:
* `src/Sentry/SentryRequest.cs` / `src/Sentry/Protocol/Response.cs` (`AddHeaders`)
* `src/Sentry.AspNetCore/ScopeExtensions.cs` (request header capture)
* `src/Sentry.AspNet/Internal/SystemWebRequestEventProcessor.cs`
* `src/Sentry/SentryHttpFailedRequestHandler.cs` / `SentryGraphQLHttpFailedRequestHandler.cs`
Key names are kept; values become `[Filtered]`. Depends on the denylist/filter utility issue.
JS reference: [getsentry/sentry-javascript#18311]() (shipped standalone in 10.27.0, well before the option existed).
Contributor guide
Research direction
Start with src/Sentry/Internal/RedactedHeaders.cs and the denylist/filter utility issue, then trace AddHeaders in src/Sentry/SentryRequest.cs and src/Sentry/Protocol/Response.cs. Review request capture in src/Sentry.AspNetCore/ScopeExtensions.cs, src/Sentry.AspNet/Internal/SystemWebRequestEventProcessor.cs, and the failed-request handlers. Done means sensitive header values are [Filtered] in every listed path regardless of SendDefaultPii, while header names remain unchanged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- security
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100