Title: Default EventScrubber exact-match denylist misses compound secret aliases · Issue #7542 · getsentry/sentry-python · GitHub
Open Graph Title: Default EventScrubber exact-match denylist misses compound secret aliases · Issue #7542 · getsentry/sentry-python
X Title: Default EventScrubber exact-match denylist misses compound secret aliases · Issue #7542 · getsentry/sentry-python
Description: Defence-in-depth follow-up from VULN-2964. Not a bounty-eligible vuln: default Relay datascrubbing still filters these keys before storage. The SDK-side gap is still worth closing because it is the only layer that prevents transmission. ...
Open Graph Description: Defence-in-depth follow-up from VULN-2964. Not a bounty-eligible vuln: default Relay datascrubbing still filters these keys before storage. The SDK-side gap is still worth closing because it is the...
X Description: Defence-in-depth follow-up from VULN-2964. Not a bounty-eligible vuln: default Relay datascrubbing still filters these keys before storage. The SDK-side gap is still worth closing because it is the...
Opengraph URL: https://github.com/getsentry/sentry-python/issues/7542
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Default EventScrubber exact-match denylist misses compound secret aliases","articleBody":"Defence-in-depth follow-up from [VULN-2964](\u003chttps://linear.app/getsentry/issue/VULN-2964>). Not a bounty-eligible vuln: default Relay datascrubbing still filters these keys before storage. The SDK-side gap is still worth closing because it is the only layer that prevents transmission.\n\n## Problem\n\n`EventScrubber.scrub_dict` uses exact set membership (`k.lower() in self.denylist`). Locals capture is on by default. Compound names such as `api_token`, `access_token`, `auth_token`, `refresh_token`, `client_secret`, and `secret_key` therefore leave the process unscrubbed, while `password`, `api_key`, `private_key`, and `token` do not.\n\n`DEFAULT_DENYLIST` is commented as stolen from Relay, but Relay's `@password:filter` matches keys by substring (`token`, `secret`, …). The SDK copied the word list, not the matching semantics.\n\nRelevant code:\n\n* `sentry_sdk/scrubber.py` (`DEFAULT_DENYLIST`, `scrub_dict`)\n* `sentry_sdk/client.py` (default scrubber install, `scrub_event`)\n* `sentry_sdk/consts.py` (`include_local_variables` defaults True)\n\n## Suggested fix\n\nEither is fine:\n\n1. Match keys by substring / root terms (`token`, `secret`, `auth`, `password`, `key`, `credentials`), similar to `_SENSITIVE_DENYLIST` in `sentry_sdk/data_collection.py`, **or**\n2. Keep exact match and add the missing literals.\n\nSubstring matching over-scrubs (`tokenizer`, `keyboard`, `author`). Relay already uses anchors (`^otp$`, `^two[-_]factor$`) for that reason. Expanding the literal list is equally defensible. Silently diverging from the list we copied is not.\n\n## Related, not this ticket\n\nEnabling `_experiments={\"data_collection\": ...}` uninstalls `EventScrubber` (`client.py` \\~355–368) and never key-filters `frame[\"vars\"]`. That path is worse than default, including for `password` / `api_key`. Raise it before `data_collection` becomes default.\n\nRelated: [PY-1691](\u003chttps://linear.app/getsentry/issue/PY-1691>) / [sentry-python#4441](\u003chttps://github.com/getsentry/sentry-python/issues/4441>).","author":{"url":"https://github.com/geoffg-sentry","@type":"Person","name":"geoffg-sentry"},"datePublished":"2026-09-18T15:47:05Z","url":"https://github.com/getsentry/sentry-python/issues/7542"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:0bb3772a-7913-2aa0-e4e4-84e5b3203b38 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | AC68:428E1:55F005:72F86E:6B00A7A2 |
| html-safe-nonce | 34195080d4e4cd00486435f9b8977ec1ecbdfba485ccbaf1e77d4811e1f1ba02 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBQzY4OjQyOEUxOjU1RjAwNTo3MkY4NkU6NkIwMEE3QTIiLCJ2aXNpdG9yX2lkIjoiNzE2MzcyNDE2OTgyMDAyMjY5MCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | de35c79652bbd04a8db0f94af9afd158b7f8df1a534fce532b30770a1eafd651 |
| hovercard-subject-tag | issue:5501582465 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/getsentry/sentry-python/7542/issue_layout |
| twitter:image | https://opengraph.githubassets.com/de139ee592769c0e579344d8be30ba5fa965d980605504df89fd56c21ceeb5a5/getsentry/sentry-python/issues/7542 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/de139ee592769c0e579344d8be30ba5fa965d980605504df89fd56c21ceeb5a5/getsentry/sentry-python/issues/7542 |
| og:image:alt | Defence-in-depth follow-up from VULN-2964. Not a bounty-eligible vuln: default Relay datascrubbing still filters these keys before storage. The SDK-side gap is still worth closing because it is the... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | geoffg-sentry |
| hostname | github.com |
| expected-hostname | github.com |
| None | 455b493e3402a3a3a06beac5d20bb7db3da060808b220aa48d6a7eca7c59863a |
| turbo-cache-control | no-preview |
| go-import | github.com/getsentry/sentry-python git https://github.com/getsentry/sentry-python.git |
| octolytics-dimension-user_id | 1396951 |
| octolytics-dimension-user_login | getsentry |
| octolytics-dimension-repository_id | 137814779 |
| octolytics-dimension-repository_nwo | getsentry/sentry-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 137814779 |
| octolytics-dimension-repository_network_root_nwo | getsentry/sentry-python |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 2f575159976167242d488c0b062eb355c4e198b7 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width