Skip to content

fix(sentry): guard operator privacy against SDK v11 defaults - #752

Merged
unjica merged 3 commits into
developfrom
codex/sentry-v11-guard
Oct 11, 2026
Merged

unjica merged 3 commits into
developfrom
codex/sentry-v11-guard

Conversation

@unjica

@unjica unjica commented Oct 9, 2026 •

Copy link
Copy Markdown
Collaborator

Builds on merged privacy hardening #736 (f21e053); leaves its EU privacy copy and existing scrubber intact. Prevents a future Sentry v11 default change from broadening operator monitoring. No dependency, DSN, secret, production-data, deployment, or main-branch changes.

Policy and tightening

  • API and all dashboard runtimes share mirrored, parity-tested options. sendDefaultPii: false, includeLocalVariables: false, tracesSampleRate: 0, tracePropagationTargets: [], replay rates 0, enableLogs: false; Replay integrations are removed. Existing Http body buffering suppression and Next incoming-span suppression stay.
  • Complete dataCollection: userInfo, cookies, request/response httpHeaders, queryParams, urlQueryParams, databaseQueryData, stackFrameVariables, queues all false; httpBodies: []; GraphQL document/variables and GenAI inputs/outputs false. frameContextLines: 7 retains the v10 source-context baseline.
  • beforeSend extends existing filtering to nested users/IPs, response bodies, DB/AI/GraphQL contexts and dotted attributes, and frame variables. Existing Authorization/X-API-Key/Cookie/Set-Cookie filtering, query stripping and tt_live_* redaction remain. Request data is dropped even without other request metadata. If traversal throws, risky headers/contexts/extras/breadcrumbs/response fields are removed.
  • beforeBreadcrumb scrubs retained breadcrumbs and strips navigation URL queries; console, DB/query, AI and GraphQL breadcrumbs are dropped to prevent unstructured payload collection. beforeSendTransaction drops transactions defensively.
  • Tightenings versus fix(sentry): harden operational error privacy filters #736/current develop: no automatic HTTP headers or URL query collection at all; no trace propagation; explicit no replay/logs; GraphQL payloads and DB/AI payloads disabled; nested user/IP/response/frame-variable filtering; breadcrumb filtering and category drops; stronger sanitizer exception fallback. Error type/message, stack location, environment, and dashboard release remain. Arbitrary personal data in free-text error messages is not comprehensively scrubbed.

SDK verification

Installed 10.66.0 types and resolver confirm dataCollection exists; partial objects bypass restrictive sendDefaultPii defaults. The complete policy covers every installed resolver category. Verified 10.66 resolver, develop resolver, and v11 migration guide. v11 renames queryParams to urlQueryParams and adds queues; those future fields are ignored by v10. A major-version test fails for either installed SDK until a privacy review, including v11 span streaming. No claim that v11 runtime behavior was tested.

Validation

  • pnpm install --frozen-lockfile, pnpm lint, pnpm build: passed.
  • pnpm test: 1,417 passed, 128 skipped (API 1,050/128; dashboard 227; core 67; vite plugin 14; node 27; next 15; publish guards 17).
  • Sentry tests: API 17 + dashboard 20 passed. New guards check installed majors, policy parity, actual SDK effective options, representative scrubbers, and a real SDK capture through a network-free transport.
  • pnpm --filter api exec tsc --noEmit and dashboard equivalent: fail with exactly the base diagnostics (106 API and 6 dashboard), confirmed by temporarily testing unchanged HEAD and comparing error lines. Production build passes; no new type errors.
  • Local DB integration verification blocked: PostgreSQL 14 lacks migration security_invoker; isolated PostgreSQL 16 cannot initialize shared memory under the sandbox. CI uses PostgreSQL 16 and enables DB integration tests.

CI on final commit a2d6748: all checks passed. CI run passed install, lint, PostgreSQL 16 migrations, tests with DB integration enabled, production builds, and committed SDK dist verification. CI tests: 1,537 passed, 8 skipped (API 1,170/8; dashboard 227; core 67; vite plugin 14; node 27; next 15; publish guards 17). CodeQL, maintainer-review workflow, and bugbot-review workflow passed; no review comments were present at completion. Human approval is still part of the normal review flow. PR remains open, unmerged, and undeployed.

Do not merge or deploy this PR.

@unjica
unjica merged commit 79eeb27 into develop Oct 11, 2026
7 checks passed
@unjica unjica mentioned this pull request Oct 11, 2026
2 tasks
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.

1 participant