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

feat: fail screenshot/replay creation when a potentially sensitive widget is not masked #2375

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

vaind
Copy link
Collaborator

@vaind vaind commented Oct 24, 2024

📜 Description

When a potentionally sensitive-content-containing widget is encountered and it is not masked (or unmasked explicitly), fail capturing replay in debug build by throwing an exception.

💡 Motivation and Context

This should help point users that they need to make adjustments to the privacy configuration. The code is only included in debug builds so it won't affect release builds in any way.

💚 How did you test it?

📝 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

🔮 Next steps

Copy link
Contributor

github-actions bot commented Oct 24, 2024

Fails
🚫 Please consider adding a changelog entry for the next release.
Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Instructions and example for changelog

Please add an entry to CHANGELOG.md to the "Unreleased" section. Make sure the entry includes this PR's number.

Example:

## Unreleased

- fail screenshot/replay creation when a potentially sensitive widget is not masked ([#2375](https://github.com/getsentry/sentry-dart/pull/2375))

If none of the above apply, you can opt out of this check by adding #skip-changelog to the PR description.

Generated by 🚫 dangerJS against bb49dd5

Copy link

codecov bot commented Oct 24, 2024

Codecov Report

Attention: Patch coverage is 80.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 85.01%. Comparing base (8f95e33) to head (bb49dd5).

Files with missing lines Patch % Lines
flutter/lib/src/sentry_replay_options.dart 80.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2375      +/-   ##
==========================================
+ Coverage   84.78%   85.01%   +0.22%     
==========================================
  Files         253       79     -174     
  Lines        9070     2796    -6274     
==========================================
- Hits         7690     2377    -5313     
+ Misses       1380      419     -961     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

github-actions bot commented Oct 24, 2024

Android Performance metrics 🚀

  Plain With Sentry Diff
Startup time 523.42 ms 570.79 ms 47.37 ms
Size 6.49 MiB 7.57 MiB 1.08 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
117d988 376.32 ms 450.85 ms 74.53 ms
b98109e 296.46 ms 362.68 ms 66.22 ms
90a08ea 477.25 ms 534.10 ms 56.85 ms
40680d3 323.55 ms 390.29 ms 66.73 ms
deaeece 347.42 ms 381.10 ms 33.68 ms
95d0636 301.46 ms 357.98 ms 56.52 ms
24b6e60 440.64 ms 557.96 ms 117.32 ms
c328ffc 394.35 ms 480.94 ms 86.59 ms
26e955b 369.52 ms 458.60 ms 89.07 ms
8d64376 302.88 ms 356.84 ms 53.96 ms

App size

Revision Plain With Sentry Diff
117d988 6.33 MiB 7.26 MiB 947.03 KiB
b98109e 6.06 MiB 7.03 MiB 993.53 KiB
90a08ea 6.49 MiB 7.55 MiB 1.06 MiB
40680d3 6.06 MiB 7.03 MiB 989.25 KiB
deaeece 5.94 MiB 6.96 MiB 1.02 MiB
95d0636 6.16 MiB 7.14 MiB 1007.32 KiB
24b6e60 6.33 MiB 7.26 MiB 950.14 KiB
c328ffc 6.35 MiB 7.42 MiB 1.07 MiB
26e955b 6.27 MiB 7.20 MiB 956.49 KiB
8d64376 5.94 MiB 6.96 MiB 1.02 MiB

Previous results on branch: feat/fail-unmasked-sensitive-widgets

Startup times

Revision Plain With Sentry Diff
16bd19d 543.83 ms 574.56 ms 30.73 ms

App size

Revision Plain With Sentry Diff
16bd19d 6.49 MiB 7.57 MiB 1.08 MiB

Copy link
Contributor

github-actions bot commented Oct 24, 2024

iOS Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1249.61 ms 1282.61 ms 33.00 ms
Size 8.38 MiB 9.75 MiB 1.37 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
a7acb24 1296.71 ms 1317.69 ms 20.98 ms
1e094d3 1237.54 ms 1243.51 ms 5.97 ms
ca9f398 1227.29 ms 1236.20 ms 8.92 ms
6f3717a 1259.84 ms 1280.90 ms 21.06 ms
0118295 1211.31 ms 1227.02 ms 15.71 ms
2e1e4ae 1254.41 ms 1278.55 ms 24.14 ms
136c365 1248.12 ms 1277.33 ms 29.20 ms
689d2fd 1257.71 ms 1265.16 ms 7.45 ms
d7758e8 1271.69 ms 1288.08 ms 16.39 ms
d61cecf 1276.96 ms 1290.02 ms 13.06 ms

App size

Revision Plain With Sentry Diff
a7acb24 8.16 MiB 9.17 MiB 1.01 MiB
1e094d3 8.29 MiB 9.37 MiB 1.08 MiB
ca9f398 8.38 MiB 9.74 MiB 1.36 MiB
6f3717a 8.33 MiB 9.62 MiB 1.29 MiB
0118295 8.32 MiB 9.38 MiB 1.05 MiB
2e1e4ae 8.34 MiB 9.65 MiB 1.31 MiB
136c365 8.38 MiB 9.75 MiB 1.37 MiB
689d2fd 8.10 MiB 9.16 MiB 1.06 MiB
d7758e8 8.15 MiB 9.12 MiB 989.76 KiB
d61cecf 8.10 MiB 9.18 MiB 1.08 MiB

Previous results on branch: feat/fail-unmasked-sensitive-widgets

Startup times

Revision Plain With Sentry Diff
16bd19d 1223.20 ms 1234.47 ms 11.27 ms

App size

Revision Plain With Sentry Diff
16bd19d 8.38 MiB 9.75 MiB 1.37 MiB

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