Skip to content

fix(asgi): Gate query string and client IP behind send_default_pii#6501

Open
ericapisani wants to merge 2 commits into
masterfrom
py-2514-gate-asgi-values-behind-pii
Open

fix(asgi): Gate query string and client IP behind send_default_pii#6501
ericapisani wants to merge 2 commits into
masterfrom
py-2514-gate-asgi-values-behind-pii

Conversation

@ericapisani
Copy link
Copy Markdown
Member

Move http.query and client.address attribute collection inside the
should_send_default_pii() check so sensitive values are not captured
by default.

Fixes PY-2514
Fixes #6499

Move http.query and client.address attribute collection inside the
should_send_default_pii() check so sensitive values are not captured
by default.

Fixes PY-2514
Fixes #6499
@linear-code
Copy link
Copy Markdown

linear-code Bot commented Jun 4, 2026

PY-2514

@ericapisani
Copy link
Copy Markdown
Member Author

bugbot run
@sentry review

Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 666e6fb. Configure here.

Comment thread sentry_sdk/integrations/_asgi_common.py Outdated
Comment thread sentry_sdk/integrations/_asgi_common.py Outdated
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 4, 2026

Codecov Results 📊

88436 passed | ⏭️ 6022 skipped | Total: 94458 | Pass Rate: 93.62% | Execution Time: 298m 12s

📊 Comparison with Base Branch

Metric Change
Total Tests 📈 +10
Passed Tests 📈 +10
Failed Tests
Skipped Tests

All tests are passing successfully.

✅ Patch coverage is 100.00%. Project has 2481 uncovered lines.
❌ Project coverage is 89.35%. Comparing base (base) to head (head).

Coverage diff
@@            Coverage Diff             @@
##          main       #PR       +/-##
==========================================
- Coverage    89.38%    89.35%    -0.03%
==========================================
  Files          192       192         —
  Lines        23285     23286        +1
  Branches      8002      8004        +2
==========================================
+ Hits         20811     20805        -6
- Misses        2474      2481        +7
- Partials      1309      1309         —

Generated by Codecov Action

@ericapisani ericapisani marked this pull request as ready for review June 4, 2026 12:56
@ericapisani ericapisani requested a review from a team as a code owner June 4, 2026 12:56
Comment thread tests/integrations/asgi/test_asgi.py
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.

Gate the setting of url.fulland http.query within ASGI middleware behind the PII flag

1 participant