Skip to content

ref: Add internal sensitive-data denylist and key-value filter utility#5440

Draft
jamescrosswell wants to merge 1 commit into
mainfrom
feat/sensitive-data-filter
Draft

ref: Add internal sensitive-data denylist and key-value filter utility#5440
jamescrosswell wants to merge 1 commit into
mainfrom
feat/sensitive-data-filter

Conversation

@jamescrosswell

Copy link
Copy Markdown
Collaborator

Closes #5421 (part of #5420).

First step of the DataCollection migration: adds the internal sensitive-terms denylist and the shared key-value filtering utility that later PRs will wire into header, cookie and query-string collection (#5422, #5423, #5424).

  • SensitiveDataFilter — canonical sensitive-key denylist from the spec (case-insensitive substring matching), cookie-name-only extra terms, GDPR/PII terms (for the future SendDefaultPii=false bridge, DataCollection phase 1: resolver and SendDefaultPii bridge #5426), and FilterKeyValueData/FilterValue implementing the spec's filtering semantics: key names always preserved, sensitive values replaced with [Filtered].
  • KeyValueFilterBehavior — internal off / denyList / allowList behavior (precursor to the public behavior type that ships with the DataCollection option, DataCollection phase 1: add option types (no-op) #5425). The built-in denylist always applies, including in allowList mode.

Internal only — no public API change, and nothing is wired up yet, so no behavior change either. Mirrors filterKeyValueData.ts / filtering-snippets.ts from the JS reference implementation (getsentry/sentry-javascript#20965, getsentry/sentry-javascript#20989) so the two SDKs filter identically.

#skip-changelog

🤖 Generated with Claude Code

First step of the DataCollection migration (#5420, #5421). Internal only,
nothing wired up yet. Mirrors filterKeyValueData/filtering-snippets from
the JS reference implementation.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@codecov

codecov Bot commented Jul 22, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 97.53086% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 74.69%. Comparing base (65c0c59) to head (c5002e8).

Files with missing lines Patch % Lines
...try/Internal/DataCollection/SensitiveDataFilter.cs 97.22% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5440      +/-   ##
==========================================
+ Coverage   74.58%   74.69%   +0.10%     
==========================================
  Files         512      514       +2     
  Lines       18666    18747      +81     
  Branches     3659     3668       +9     
==========================================
+ Hits        13922    14003      +81     
  Misses       3869     3869              
  Partials      875      875              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DataCollection phase 0: sensitive-terms denylist and key-value filtering utility

1 participant