MetaMask / MetaMask/metamask-mobile
Security alerts - We should run a new validation when transaction is edited on mobile
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 3k
- Forks
- 1.7k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 669
Description
**Describe the bug**
**Problem:** [same as in Extension](https://github.com/MetaMask/metamask-extension/issues/22554), whenever we edit a transaction, the PPOM validation is not updated. A benign transaction could be malicious, if we change the amount of Approve/Send. However this won't be captured by the Blockaid warning, as it does not re-run the validation on Edit.
**Expected behavior**
- Should we re-validate on edit? in all cases ,in some cases (i.e. if gas is changed no, but if recipient/ amounts are changed yes?)
**Screenshots/Recordings**
https://github.com/MetaMask/metamask-mobile/assets/54408225/c7327bde-5e66-4235-b2c4-a2b452b7ceab
**Steps to reproduce**
1. Enable Blockaid from Settings
2. Trigger a malicious Approve ERC20
3. See malicious warning is displayed
4. Change the approve value to 0
5. See malicious warning is still displayed / validation is not re-run
**Version**
7.15.0
**Build type**
None
**Device**
Pixel 6
**Operating system**
Android
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked Extension issue and trace the mobile transaction-edit flow, including where PPOM or Blockaid validation is invoked. Reproduce the listed Approve flow on Android, then establish which edited transaction fields require validation and verify that the displayed warning matches the edited transaction.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react-native, typescript
- Domain
- mobile, security
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100