-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
PPOM - Signature Metric events have the flagged_as_malicious
and Blockaid info when using a different network than Mainnet
#8282
Conversation
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
0d6b123
to
c2d5914
Compare
E2E test started on Bitrise: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/64dcc985-bdc6-425b-be74-05d68487c138 |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #8282 +/- ##
==========================================
+ Coverage 40.21% 40.23% +0.01%
==========================================
Files 1235 1235
Lines 29885 29894 +9
Branches 2863 2865 +2
==========================================
+ Hits 12018 12027 +9
Misses 17176 17176
Partials 691 691 ☔ View full report in Codecov by Sentry. |
0cbb464
to
e36284b
Compare
Quality Gate passedKudos, no new issues were introduced! 0 New issues |
Description
Whenever I am on a different network than Mainnet (i.e. Sepolia) if I perform signatures from the test dapp I can see how the metrics information for that event displays PPOM information (i.e. flagged as malicious, reason, RPC counts, etc).
Analytics 'trackEventWithParameters' - {"category": "Signature Rejected"} {"account_type": "MetaMask", "chain_id": "11155111", "dapp_host_name": "metamask.github.io", "ppom_debug_traceCall_count": 1, "ppom_eth_call_count": 12, "ppom_eth_getBalance_count": 1, "ppom_eth_getBlockByNumber_count": 1, "request_platform": undefined, "request_source": "In-App-Browser", "security_alert_reason": "seaport_farming", "security_alert_response": "Malicious", "signature_type": "eth_signTypedData_v4", "ui_customizations": ["flagged_as_malicious"], "version": "V4"}
Expected behavior
For not supported networks, we should see the same as we see in Extension:
and no RPC counts
The direction taken in this solution is to create a supported networks list (with only mainnet for now) and check if the current chainId is in supported networks.
I think this will make multichain support easier to add/implement when we are ready to go to multichain
Related issues
Fixes: #8065
Manual testing steps
yarn watch
is runningyarn watch
and see that PPOM security alert metrics are sentNotApplicable
are now sent in metrics now.Pre-merge author checklist
Pre-merge reviewer checklist