Skip to content

refa: extract scrubber#1050

Merged
solnic merged 2 commits intomasterfrom
refa/extract-scrubber
May 7, 2026
Merged

refa: extract scrubber#1050
solnic merged 2 commits intomasterfrom
refa/extract-scrubber

Conversation

@solnic
Copy link
Copy Markdown
Collaborator

@solnic solnic commented May 6, 2026

This just extracts default scrubber so that we will be able to use it in live view scrubbing too (see follow-up #1048 that relies on this one).

Eventually, we'll fully implement scrubbing/data collection API to conform to the upcoming data collection spec.

@solnic solnic changed the title Refa/extract scrubber refa: extract scrubber May 6, 2026
solnic and others added 2 commits May 6, 2026 10:52
Adds a framework-agnostic module that owns the canonical default sensitive
key lists, the redaction placeholder, the credit-card detection heuristic,
and the recursive map/list traversal used to scrub data before it is sent
to Sentry. Existing integrations duplicate these primitives today; this
module provides a single source of truth that follow-up commits will route
PlugContext, PlugCapture, and LiveViewHook through.

The default behavior matches the existing Sentry.PlugContext defaults
("*********" placeholder, ["password", "passwd", "secret"] for params,
["authorization", "authentication", "cookie"] for headers) so no
existing scrubbing output changes.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Removes the duplicated denylist constants, placeholder, credit-card
regex, and recursive scrub_map/scrub_list helpers from
Sentry.PlugContext in favor of the shared Sentry.Scrubber module.
Public function signatures and the documented default key sets are
unchanged.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@solnic solnic force-pushed the refa/extract-scrubber branch from c9388da to ee7d131 Compare May 6, 2026 10:52
@solnic solnic marked this pull request as ready for review May 6, 2026 10:59
@solnic solnic merged commit 363b5f2 into master May 7, 2026
11 checks passed
@solnic solnic deleted the refa/extract-scrubber branch May 7, 2026 06:06
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.

2 participants