Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
bff69ae
feat: add address poisoning detection to PhishingController
AugmentedMode Mar 10, 2026
f6ce4ef
update yarn
AugmentedMode Mar 10, 2026
2c0cedd
fix
AugmentedMode Mar 10, 2026
2d624c9
fix errors
AugmentedMode Mar 10, 2026
78f3d48
fix
AugmentedMode Mar 10, 2026
f5c1825
fix: changelog
AugmentedMode Mar 11, 2026
e2235a7
fix
AugmentedMode Mar 11, 2026
7b515a6
fix: merge conflicts
AugmentedMode Mar 24, 2026
aa838dc
fix: merge conflicts
AugmentedMode Mar 24, 2026
5c6adb9
fix
AugmentedMode Mar 24, 2026
75b5a11
fix
AugmentedMode Mar 24, 2026
c210787
fix: yarn lock
AugmentedMode Mar 24, 2026
4a54dfa
fix: merge conflicts
AugmentedMode May 6, 2026
edde029
fix: readmem content
AugmentedMode May 6, 2026
8740ef4
fix: yarn install
AugmentedMode May 6, 2026
b1e742d
refactor: enhance address poisoning tests and logic
AugmentedMode May 11, 2026
dccdc5f
fix: merge conflicts
AugmentedMode May 11, 2026
4df8176
chore: bump address book controller
AugmentedMode May 11, 2026
ab45c2c
test: enhance phishing controller tests for transaction state changes
AugmentedMode May 11, 2026
a5da049
refactor: improve setupMessenger function in phishing controller tests
AugmentedMode May 11, 2026
b26ed3e
refactor: improve type handling and error logging in PhishingController
AugmentedMode May 11, 2026
df9c3bc
chore: remove unused ESLint suppressions for PhishingController tests
AugmentedMode May 11, 2026
cd15e53
fix: eslint spression
AugmentedMode May 11, 2026
b6cc631
test: enhance phishing controller tests for transaction recipient upd…
AugmentedMode May 11, 2026
6fa9a7c
fix: merge conflicts
AugmentedMode May 12, 2026
306647c
fix: merge conflicts
AugmentedMode May 14, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,7 @@ linkStyle default opacity:0.5
perps_controller --> profile_sync_controller;
perps_controller --> remote_feature_flag_controller;
perps_controller --> transaction_controller;
phishing_controller --> address_book_controller;
phishing_controller --> base_controller;
phishing_controller --> controller_utils;
phishing_controller --> messenger;
Expand Down
13 changes: 1 addition & 12 deletions eslint-suppressions.json
Original file line number Diff line number Diff line change
Expand Up @@ -1634,26 +1634,15 @@
"count": 2
}
},
"packages/phishing-controller/src/PhishingController.test.ts": {
"jest/unbound-method": {
"count": 7
},
"no-restricted-syntax": {
"count": 1
}
},
"packages/phishing-controller/src/PhishingController.ts": {
"@typescript-eslint/explicit-function-return-type": {
"count": 19
"count": 14
},
"@typescript-eslint/naming-convention": {
"count": 1
},
"@typescript-eslint/prefer-nullish-coalescing": {
"count": 6
},
"no-restricted-syntax": {
"count": 10
}
},
"packages/phishing-controller/src/PhishingDetector.test.ts": {
Expand Down
4 changes: 4 additions & 0 deletions packages/phishing-controller/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

- Add `findSimilarAddresses` utility and `PhishingController:checkAddressPoisoning` messenger action to detect address poisoning attempts against known recipients ([#8171](https://github.com/MetaMask/core/pull/8171))
- The controller now hydrates and maintains a set of known recipient addresses from confirmed transactions (`TransactionController`) and the address book (`AddressBookController`)
- Exposes match metadata including prefix/suffix match lengths, poisoning score, and diff indices
- Add `@metamask/address-book-controller` as a dependency ([#8171](https://github.com/MetaMask/core/pull/8171))
- Support path-based phishing lists (`blocklistPaths`, `whitelistPaths`) and path-aware URL scanning for shared gateways (for example IPFS gateways and `sites.google.com`) via `getPhishingDetectionScanUrlParam`, `isPhishingDetectionPathBasedHostname`, and `PHISHING_DETECTION_PATH_BASED_ROOT_DOMAINS` ([#8662](https://github.com/MetaMask/core/pull/8662))

### Changed
Expand Down
1 change: 1 addition & 0 deletions packages/phishing-controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
"test:watch": "NODE_OPTIONS=--experimental-vm-modules jest --watch"
},
"dependencies": {
"@metamask/address-book-controller": "^7.1.2",
"@metamask/base-controller": "^9.1.0",
"@metamask/controller-utils": "^12.1.0",
"@metamask/messenger": "^1.2.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,17 @@

import type { PhishingController } from './PhishingController';

/**
* Finds known recipient addresses that look like an address poisoning match.
*
* @param candidate - The recipient address being checked.
* @returns Similar known recipient matches sorted by score.
*/
export type PhishingControllerCheckAddressPoisoningAction = {
type: `PhishingController:checkAddressPoisoning`;
handler: PhishingController['checkAddressPoisoning'];
};

/**
* Conditionally update the phishing configuration.
*
Expand Down Expand Up @@ -121,6 +132,7 @@ export type PhishingControllerGetApprovalsAction = {
* Union of all PhishingController action types.
*/
export type PhishingControllerMethodActions =
| PhishingControllerCheckAddressPoisoningAction
| PhishingControllerMaybeUpdateStateAction
| PhishingControllerTestOriginAction
| PhishingControllerIsBlockedRequestAction
Expand Down
Loading
Loading