Skip to content

RUM-938 Implement heuristic image classification#1640

Merged
jonathanmos merged 1 commit into
developfrom
jmoskovich/rum-938/implement-image-classification
Sep 27, 2023
Merged

RUM-938 Implement heuristic image classification#1640
jonathanmos merged 1 commit into
developfrom
jmoskovich/rum-938/implement-image-classification

Conversation

@jonathanmos

Copy link
Copy Markdown
Member

What does this PR do?

Implement a heuristic image classification to determine whether an image is PII or not. If the image is PII then send a placeholder wireframe identifying the image as a content image.

The identification is by checking that the dimensions of the image do not exceed 48dp (the largest icon in the material design guidelines). In the case of GradientDrawable we ignore this check, since GradientDrawables cannot be PII and constitute the backgrounds for RippleDrawables.

Motivation

Avoid sending PII as part of base64.

Additional Notes

Anything else we should know when reviewing?

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • Make sure you discussed the feature or bugfix with the maintaining team in an Issue
  • Make sure each commit and the PR mention the Issue number (cf the CONTRIBUTING doc)

@jonathanmos
jonathanmos force-pushed the jmoskovich/rum-938/implement-image-classification branch from 195cdf5 to 7f5d08b Compare September 26, 2023 07:47
@codecov-commenter

codecov-commenter commented Sep 26, 2023

Copy link
Copy Markdown

Codecov Report

Merging #1640 (c370b54) into develop (268049e) will increase coverage by 0.05%.
Report is 11 commits behind head on develop.
The diff coverage is 93.10%.

❗ Current head c370b54 differs from pull request most recent head ecac21d. Consider uploading reports for the commit ecac21d to get more accurate results

@@             Coverage Diff             @@
##           develop    #1640      +/-   ##
===========================================
+ Coverage    83.71%   83.77%   +0.05%     
===========================================
  Files          456      457       +1     
  Lines        15713    15735      +22     
  Branches      2339     2344       +5     
===========================================
+ Hits         13154    13181      +27     
- Misses        1927     1930       +3     
+ Partials       632      624       -8     
Files Coverage Δ
...play/internal/recorder/base64/ImageTypeResolver.kt 100.00% <100.00%> (ø)
...y/internal/recorder/base64/ImageWireframeHelper.kt 94.69% <91.67%> (-1.14%) ⬇️

... and 16 files with indirect coverage changes

@jonathanmos
jonathanmos force-pushed the jmoskovich/rum-938/implement-image-classification branch 2 times, most recently from 8e3d083 to 62d78d7 Compare September 26, 2023 11:38
@jonathanmos
jonathanmos marked this pull request as ready for review September 26, 2023 12:51
@jonathanmos
jonathanmos requested a review from a team as a code owner September 26, 2023 12:51
mariusc83
mariusc83 previously approved these changes Sep 26, 2023
@jonathanmos
jonathanmos force-pushed the jmoskovich/rum-938/implement-image-classification branch from c370b54 to ecac21d Compare September 27, 2023 11:29
@jonathanmos
jonathanmos force-pushed the jmoskovich/rum-938/implement-image-classification branch from ecac21d to 6267858 Compare September 27, 2023 11:36
@jonathanmos
jonathanmos merged commit 458c8ce into develop Sep 27, 2023
@jonathanmos
jonathanmos deleted the jmoskovich/rum-938/implement-image-classification branch September 27, 2023 12:08
@xgouchet xgouchet added this to the 2.2.0 milestone Dec 13, 2023
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.

5 participants