Port MASTG-TEST-0004: App Exposing Sensitive Data to Embedded Libraries - #3485
Conversation
|
A couple of things are going on here: FIrst of all just to clarify scope. The weaknesses we should be targeting are:
TestThe original test has several parts. Part 1
This isn't good, and parts of it actually belong somewhere else. Your new test addresses the "identification of potentially sensitive data that may have been passed to embedded third-party libraries used by the application." TODO:
Part 2
This seems to be related to MASWE-0109: Lack of Anonymization or Pseudonymisation Measures. TODO:
Part 3
This is MASTG-TEST-0206: Undeclared PII in Network Traffic Capture and the new suggested test that uses MASTG-TECH-0119 ("Method 1" in your current test). DemoThe proposed demo is a bit misleading. When analyzing the issue statically, you won't find the sensitive user data (e.g., email, name, username) in the results. We would need to make this more realistic.
TODO: update demo title to "Uses of Firebase Analytics APIs on Potential PII with Semgrep" New DemoWe need a dynamic demo and test: we hook all those APIs and will find out which ones are actually used and what they contain. We can then correlate that with the hooks to the network APIs and the traffic capture. For the data we detect using these tests, the final questions are:
Putting it all togetherNow we have a pretty solid test strategy: Static:
Dynamic:
Network:
Summary of ## Required Actions for This PR
Separate Follow-Up Issues (not part of this PR)Create issues for:
|
Adjust demo addressing test number 1
|
Adjusted the scope of this PR + see point 4 bellow. 1. A new test based on Method 2, point 1: "Use of Third-Party Tracking & Analytics SDKs." 2. A new test based on Method 1 using MASTG-TECH-0119 (network API hooking). 3. A new test for anonymization/pseudonymisation (MASWE-0109). 4. A new dynamic test for discovering actual sensitive data passed to SDKs. 5. A new network-analysis test for verifying transmission of sensitive data. |
Co-authored-by: Carlos Holguera <perezholguera@gmail.com>
Co-authored-by: Carlos Holguera <perezholguera@gmail.com>
Co-authored-by: Carlos Holguera <perezholguera@gmail.com>
…y section, API URLs, etc. Removed unused rule
This PR closes #2942
Description
Port MASTG-TEST-0004: Sensitive Data Leaked via Embedded Libraries (android)
As I could not create a generic Semgrep rule for all kinds of libraries, the demo uses Firebase Analytics as an example.
TODOs before merging: