Skip to content

fix(sanic): Gate url.full, url.path, and http.query behind send_default_pii#6663

Merged
ericapisani merged 1 commit into
masterfrom
py-2555-sanic-url-path-attr
Jun 26, 2026
Merged

fix(sanic): Gate url.full, url.path, and http.query behind send_default_pii#6663
ericapisani merged 1 commit into
masterfrom
py-2555-sanic-url-path-attr

Conversation

@ericapisani

@ericapisani ericapisani commented Jun 25, 2026

Copy link
Copy Markdown
Member

The url.full, url.path, and http.query span attributes on Sanic request spans are now only set when send_default_pii=True. Previously url.full was always set, which could leak sensitive path or query parameter values.

This matches the same fix already applied to the aiohttp, wsgi, and asgi integrations.

Fixes PY-2555
Fixes #6660

…lt_pii

Move url.full, url.path, and http.query span attributes behind the
send_default_pii flag to avoid leaking PII in Sanic request spans.
Consistent with the same fix applied to aiohttp, wsgi, and asgi.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@linear-code

linear-code Bot commented Jun 25, 2026

Copy link
Copy Markdown

PY-2555

@ericapisani ericapisani marked this pull request as ready for review June 25, 2026 17:10
@ericapisani ericapisani requested a review from a team as a code owner June 25, 2026 17:10
@github-actions

Copy link
Copy Markdown
Contributor

Codecov Results 📊

89965 passed | ⏭️ 6300 skipped | Total: 96265 | Pass Rate: 93.46% | Execution Time: 322m 47s

📊 Comparison with Base Branch

Metric Change
Total Tests 📈 +120
Passed Tests 📈 +60
Failed Tests
Skipped Tests 📈 +60

All tests are passing successfully.

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

Coverage diff
@@            Coverage Diff             @@
##          main       #PR       +/-##
==========================================
- Coverage    89.93%    89.90%    -0.03%
==========================================
  Files          192       192         —
  Lines        23784     23786        +2
  Branches      8210      8212        +2
==========================================
+ Hits         21389     21384        -5
- Misses        2395      2402        +7
- Partials      1342      1343        +1

Generated by Codecov Action

@ericapisani ericapisani merged commit 4296334 into master Jun 26, 2026
144 checks passed
@ericapisani ericapisani deleted the py-2555-sanic-url-path-attr branch June 26, 2026 11:18
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.

sanic missing url.path attribute

2 participants