Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sanitize sensitive data from URLs (span desc, span data, crumbs, client errors) #1327

Merged
merged 44 commits into from
Mar 27, 2023

Conversation

denrase
Copy link
Collaborator

@denrase denrase commented Mar 14, 2023

📜 Description

  • Redact authority if present
  • Remove authorization, Authorization, cookies, Cookies, cookie, Cookie header fields
  • Remove query and framgnet from url
  • Add query and fragment as data to span and requests

💡 Motivation and Context

Fixes #1171

Based on the implementation of getsentry/sentry-java#2365

💚 How did you test it?

Unit tests

📝 Checklist

  • I reviewed submitted code
  • I added tests to verify changes
  • No new PII added or SDK only sends newly added PII if sendDefaultPii is enabled
  • I updated the docs if needed
  • All tests passing
  • No breaking changes

Whats next?

In the spec the field is called Cookies, but elsewhere i have found it defined as Cookie. Opted to remove both versions for now.

@denrase denrase changed the base branch from main to v7.0.0 March 14, 2023 08:56
@github-actions
Copy link
Contributor

github-actions bot commented Mar 14, 2023

Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Generated by 🚫 dangerJS against 4327595

@codecov
Copy link

codecov bot commented Mar 14, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: -0.04 ⚠️

Comparison is base (df16b96) 89.78% compared to head (4327595) 89.74%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1327      +/-   ##
==========================================
- Coverage   89.78%   89.74%   -0.04%     
==========================================
  Files         177       59     -118     
  Lines        5676     2009    -3667     
==========================================
- Hits         5096     1803    -3293     
+ Misses        580      206     -374     
Impacted Files Coverage Δ
dio/lib/src/breadcrumb_client_adapter.dart 82.60% <100.00%> (+2.60%) ⬆️
dio/lib/src/sentry_transformer.dart 96.15% <100.00%> (+1.70%) ⬆️
dio/lib/src/tracing_client_adapter.dart 88.00% <100.00%> (+2.28%) ⬆️

... and 118 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@denrase denrase changed the title Remove authority from URLs sent to Sentry - Sanitize sensitive data from URLs (span desc, span data, crumbs, client errors) Mar 14, 2023
@denrase denrase changed the title - Sanitize sensitive data from URLs (span desc, span data, crumbs, client errors) Sanitize sensitive data from URLs (span desc, span data, crumbs, client errors) Mar 14, 2023
@denrase denrase marked this pull request as ready for review March 14, 2023 14:38
Base automatically changed from v7.0.0 to main March 15, 2023 12:41
Copy link
Contributor

@marandaneto marandaneto left a comment

Choose a reason for hiding this comment

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

thanks @adinauer
@denrase after addressing #1327 (comment) and making CI happy, we can merge it :)

@marandaneto
Copy link
Contributor

marandaneto commented Mar 27, 2023

@denrase please run the formatter.
Btw #1357

@marandaneto marandaneto enabled auto-merge (squash) March 27, 2023 10:17
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.

Sanitize sensitive data from URLs (span desc, span data, crumbs, client errors)
3 participants