1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

Remove fallback phishing warning configuration (#20327)

* Remove fallback phishing warning configuration

The package `@metamask/phishing-controller` has been updated from v4
v6. The only breaking changes are a minimum Node.js version bump, and
the removal of the fallback phishing configuration.

The fallback phishing configuration was resulting in MetaMask being
incorrectly flagged as malware, and the stale config was causing
problems for sites that had been blocked in the past but have since
been unblocked. This should substantially reduce the bundle size as
well.

* Update LavaMoat policies

* Update test state to include example blocked site

---------

Co-authored-by: MetaMask Bot <metamaskbot@users.noreply.github.com>
This commit is contained in:
Mark Stacey 2023-07-31 22:26:40 -02:30 committed by Dan J Miller
parent 6f0caf4d3f
commit 1ed8f99fdf
8 changed files with 124 additions and 144 deletions

View File

@ -177,6 +177,18 @@ const firstTimeState = {
},
},
},
PhishingController: {
phishingLists: [
{
allowlist: [],
blocklist: ['test.metamask-phishing.io'],
fuzzylist: [],
tolerance: 0,
version: 0,
name: 'MetaMask',
},
],
},
};
const noop = () => undefined;
@ -205,7 +217,7 @@ describe('MetaMaskController', function () {
eth_phishing_detect_config: {
fuzzylist: [],
allowlist: [],
blocklist: ['127.0.0.1'],
blocklist: ['test.metamask-phishing.io'],
name: ListNames.MetaMask,
},
phishfort_hotlist: {
@ -218,7 +230,11 @@ describe('MetaMaskController', function () {
.reply(
200,
JSON.stringify([
{ url: '127.0.0.1', targetList: 'blocklist', timestamp: 0 },
{
url: 'test.metamask-phishing.io',
targetList: 'blocklist',
timestamp: 0,
},
]),
);
@ -960,7 +976,7 @@ describe('MetaMaskController', function () {
it('sets up phishing stream for untrusted communication', async function () {
const phishingMessageSender = {
url: 'http://myethereumwalletntw.com',
url: 'http://test.metamask-phishing.io',
tab: {},
};

View File

@ -884,8 +884,8 @@
"setTimeout": true
},
"packages": {
"@metamask/controller-utils>@metamask/utils": true,
"@metamask/controller-utils>@spruceid/siwe-parser": true,
"@metamask/utils": true,
"browserify>buffer": true,
"eslint>fast-deep-equal": true,
"eth-ens-namehash": true,
@ -893,6 +893,19 @@
"ethjs>ethjs-unit": true
}
},
"@metamask/controller-utils>@metamask/utils": {
"globals": {
"TextDecoder": true,
"TextEncoder": true
},
"packages": {
"@metamask/key-tree>@noble/hashes": true,
"browserify>buffer": true,
"nock>debug": true,
"semver": true,
"superstruct": true
}
},
"@metamask/controller-utils>@spruceid/siwe-parser": {
"globals": {
"console.error": true,
@ -1712,34 +1725,12 @@
"fetch": true
},
"packages": {
"@metamask/phishing-controller>@metamask/base-controller": true,
"@metamask/phishing-controller>@metamask/controller-utils": true,
"@metamask/base-controller": true,
"@metamask/controller-utils": true,
"@metamask/phishing-warning>eth-phishing-detect": true,
"punycode": true
}
},
"@metamask/phishing-controller>@metamask/base-controller": {
"packages": {
"immer": true
}
},
"@metamask/phishing-controller>@metamask/controller-utils": {
"globals": {
"URL": true,
"console.error": true,
"fetch": true,
"setTimeout": true
},
"packages": {
"@metamask/controller-utils>@spruceid/siwe-parser": true,
"@metamask/utils": true,
"browserify>buffer": true,
"eslint>fast-deep-equal": true,
"eth-ens-namehash": true,
"ethereumjs-util": true,
"ethjs>ethjs-unit": true
}
},
"@metamask/phishing-warning>eth-phishing-detect": {
"packages": {
"eslint>optionator>fast-levenshtein": true

View File

@ -884,8 +884,8 @@
"setTimeout": true
},
"packages": {
"@metamask/controller-utils>@metamask/utils": true,
"@metamask/controller-utils>@spruceid/siwe-parser": true,
"@metamask/utils": true,
"browserify>buffer": true,
"eslint>fast-deep-equal": true,
"eth-ens-namehash": true,
@ -893,6 +893,19 @@
"ethjs>ethjs-unit": true
}
},
"@metamask/controller-utils>@metamask/utils": {
"globals": {
"TextDecoder": true,
"TextEncoder": true
},
"packages": {
"@metamask/key-tree>@noble/hashes": true,
"browserify>buffer": true,
"nock>debug": true,
"semver": true,
"superstruct": true
}
},
"@metamask/controller-utils>@spruceid/siwe-parser": {
"globals": {
"console.error": true,
@ -1847,34 +1860,12 @@
"fetch": true
},
"packages": {
"@metamask/phishing-controller>@metamask/base-controller": true,
"@metamask/phishing-controller>@metamask/controller-utils": true,
"@metamask/base-controller": true,
"@metamask/controller-utils": true,
"@metamask/phishing-warning>eth-phishing-detect": true,
"punycode": true
}
},
"@metamask/phishing-controller>@metamask/base-controller": {
"packages": {
"immer": true
}
},
"@metamask/phishing-controller>@metamask/controller-utils": {
"globals": {
"URL": true,
"console.error": true,
"fetch": true,
"setTimeout": true
},
"packages": {
"@metamask/controller-utils>@spruceid/siwe-parser": true,
"@metamask/utils": true,
"browserify>buffer": true,
"eslint>fast-deep-equal": true,
"eth-ens-namehash": true,
"ethereumjs-util": true,
"ethjs>ethjs-unit": true
}
},
"@metamask/phishing-warning>eth-phishing-detect": {
"packages": {
"eslint>optionator>fast-levenshtein": true

View File

@ -884,8 +884,8 @@
"setTimeout": true
},
"packages": {
"@metamask/controller-utils>@metamask/utils": true,
"@metamask/controller-utils>@spruceid/siwe-parser": true,
"@metamask/utils": true,
"browserify>buffer": true,
"eslint>fast-deep-equal": true,
"eth-ens-namehash": true,
@ -893,6 +893,19 @@
"ethjs>ethjs-unit": true
}
},
"@metamask/controller-utils>@metamask/utils": {
"globals": {
"TextDecoder": true,
"TextEncoder": true
},
"packages": {
"@metamask/key-tree>@noble/hashes": true,
"browserify>buffer": true,
"nock>debug": true,
"semver": true,
"superstruct": true
}
},
"@metamask/controller-utils>@spruceid/siwe-parser": {
"globals": {
"console.error": true,
@ -1847,34 +1860,12 @@
"fetch": true
},
"packages": {
"@metamask/phishing-controller>@metamask/base-controller": true,
"@metamask/phishing-controller>@metamask/controller-utils": true,
"@metamask/base-controller": true,
"@metamask/controller-utils": true,
"@metamask/phishing-warning>eth-phishing-detect": true,
"punycode": true
}
},
"@metamask/phishing-controller>@metamask/base-controller": {
"packages": {
"immer": true
}
},
"@metamask/phishing-controller>@metamask/controller-utils": {
"globals": {
"URL": true,
"console.error": true,
"fetch": true,
"setTimeout": true
},
"packages": {
"@metamask/controller-utils>@spruceid/siwe-parser": true,
"@metamask/utils": true,
"browserify>buffer": true,
"eslint>fast-deep-equal": true,
"eth-ens-namehash": true,
"ethereumjs-util": true,
"ethjs>ethjs-unit": true
}
},
"@metamask/phishing-warning>eth-phishing-detect": {
"packages": {
"eslint>optionator>fast-levenshtein": true

View File

@ -884,8 +884,8 @@
"setTimeout": true
},
"packages": {
"@metamask/controller-utils>@metamask/utils": true,
"@metamask/controller-utils>@spruceid/siwe-parser": true,
"@metamask/utils": true,
"browserify>buffer": true,
"eslint>fast-deep-equal": true,
"eth-ens-namehash": true,
@ -893,6 +893,19 @@
"ethjs>ethjs-unit": true
}
},
"@metamask/controller-utils>@metamask/utils": {
"globals": {
"TextDecoder": true,
"TextEncoder": true
},
"packages": {
"@metamask/key-tree>@noble/hashes": true,
"browserify>buffer": true,
"nock>debug": true,
"semver": true,
"superstruct": true
}
},
"@metamask/controller-utils>@spruceid/siwe-parser": {
"globals": {
"console.error": true,
@ -1712,34 +1725,12 @@
"fetch": true
},
"packages": {
"@metamask/phishing-controller>@metamask/base-controller": true,
"@metamask/phishing-controller>@metamask/controller-utils": true,
"@metamask/base-controller": true,
"@metamask/controller-utils": true,
"@metamask/phishing-warning>eth-phishing-detect": true,
"punycode": true
}
},
"@metamask/phishing-controller>@metamask/base-controller": {
"packages": {
"immer": true
}
},
"@metamask/phishing-controller>@metamask/controller-utils": {
"globals": {
"URL": true,
"console.error": true,
"fetch": true,
"setTimeout": true
},
"packages": {
"@metamask/controller-utils>@spruceid/siwe-parser": true,
"@metamask/utils": true,
"browserify>buffer": true,
"eslint>fast-deep-equal": true,
"eth-ens-namehash": true,
"ethereumjs-util": true,
"ethjs>ethjs-unit": true
}
},
"@metamask/phishing-warning>eth-phishing-detect": {
"packages": {
"eslint>optionator>fast-levenshtein": true

View File

@ -1105,8 +1105,8 @@
"setTimeout": true
},
"packages": {
"@metamask/controller-utils>@metamask/utils": true,
"@metamask/controller-utils>@spruceid/siwe-parser": true,
"@metamask/utils": true,
"browserify>buffer": true,
"eslint>fast-deep-equal": true,
"eth-ens-namehash": true,
@ -1114,6 +1114,19 @@
"ethjs>ethjs-unit": true
}
},
"@metamask/controller-utils>@metamask/utils": {
"globals": {
"TextDecoder": true,
"TextEncoder": true
},
"packages": {
"@metamask/key-tree>@noble/hashes": true,
"browserify>buffer": true,
"nock>debug": true,
"semver": true,
"superstruct": true
}
},
"@metamask/controller-utils>@spruceid/siwe-parser": {
"globals": {
"console.error": true,
@ -1933,34 +1946,12 @@
"fetch": true
},
"packages": {
"@metamask/phishing-controller>@metamask/base-controller": true,
"@metamask/phishing-controller>@metamask/controller-utils": true,
"@metamask/base-controller": true,
"@metamask/controller-utils": true,
"@metamask/phishing-warning>eth-phishing-detect": true,
"punycode": true
}
},
"@metamask/phishing-controller>@metamask/base-controller": {
"packages": {
"immer": true
}
},
"@metamask/phishing-controller>@metamask/controller-utils": {
"globals": {
"URL": true,
"console.error": true,
"fetch": true,
"setTimeout": true
},
"packages": {
"@metamask/controller-utils>@spruceid/siwe-parser": true,
"@metamask/utils": true,
"browserify>buffer": true,
"eslint>fast-deep-equal": true,
"eth-ens-namehash": true,
"ethereumjs-util": true,
"ethjs>ethjs-unit": true
}
},
"@metamask/phishing-warning>eth-phishing-detect": {
"packages": {
"eslint>optionator>fast-levenshtein": true

View File

@ -250,7 +250,7 @@
"@metamask/notification-controller": "^3.0.0",
"@metamask/obs-store": "^8.1.0",
"@metamask/permission-controller": "^4.0.0",
"@metamask/phishing-controller": "^4.0.0",
"@metamask/phishing-controller": "^6.0.0",
"@metamask/post-message-stream": "^6.0.0",
"@metamask/providers": "^11.1.0",
"@metamask/rate-limit-controller": "^3.0.0",

View File

@ -3992,7 +3992,7 @@ __metadata:
languageName: node
linkType: hard
"@metamask/controller-utils@npm:^3.0.0, @metamask/controller-utils@npm:^3.1.0, @metamask/controller-utils@npm:^3.4.0":
"@metamask/controller-utils@npm:^3.0.0, @metamask/controller-utils@npm:^3.4.0":
version: 3.4.0
resolution: "@metamask/controller-utils@npm:3.4.0"
dependencies:
@ -4007,20 +4007,19 @@ __metadata:
languageName: node
linkType: hard
"@metamask/controller-utils@npm:^4.0.0, @metamask/controller-utils@npm:^4.0.1, @metamask/controller-utils@npm:^4.1.0, @metamask/controller-utils@npm:^4.2.0":
version: 4.2.0
resolution: "@metamask/controller-utils@npm:4.2.0"
"@metamask/controller-utils@npm:^4.0.0, @metamask/controller-utils@npm:^4.0.1, @metamask/controller-utils@npm:^4.1.0, @metamask/controller-utils@npm:^4.2.0, @metamask/controller-utils@npm:^4.3.0":
version: 4.3.1
resolution: "@metamask/controller-utils@npm:4.3.1"
dependencies:
"@metamask/utils": ^5.0.2
"@metamask/eth-query": ^3.0.1
"@metamask/utils": ^6.2.0
"@spruceid/siwe-parser": 1.1.3
babel-runtime: ^6.26.0
eth-ens-namehash: ^2.0.8
eth-query: ^2.1.2
eth-rpc-errors: ^4.0.2
ethereumjs-util: ^7.0.10
ethjs-unit: ^0.1.6
fast-deep-equal: ^3.1.3
checksum: e71779577c37038e6e605a43ef6b9c1af82e0b3887a72c01f48ae1e4e2005116fc9d09c8b690139478c04dd2929e227642c5fd80cfbc81814d667c415c714228
checksum: 5bb471df560a12fba1b7fa147fe0332e06b527637c04facff1774b1279dd388b4cf1d74340469adb13551c08cc156f204d90e36599ad69b54716b11e5842b348
languageName: node
linkType: hard
@ -4186,6 +4185,16 @@ __metadata:
languageName: node
linkType: hard
"@metamask/eth-query@npm:^3.0.1":
version: 3.0.1
resolution: "@metamask/eth-query@npm:3.0.1"
dependencies:
json-rpc-random-id: ^1.0.0
xtend: ^4.0.1
checksum: b9a323dff67328eace7d54fc8b0bc4dd763bf15760870656cbd5aad5380d1ee4489fb5c59506290d5f77cf55e74e530ee97b52702a329f1090ec03a6158434b7
languageName: node
linkType: hard
"@metamask/eth-sig-util@npm:5.0.2":
version: 5.0.2
resolution: "@metamask/eth-sig-util@npm:5.0.2"
@ -4511,16 +4520,16 @@ __metadata:
languageName: node
linkType: hard
"@metamask/phishing-controller@npm:^4.0.0":
version: 4.0.0
resolution: "@metamask/phishing-controller@npm:4.0.0"
"@metamask/phishing-controller@npm:^6.0.0":
version: 6.0.0
resolution: "@metamask/phishing-controller@npm:6.0.0"
dependencies:
"@metamask/base-controller": ^2.0.0
"@metamask/controller-utils": ^3.1.0
"@metamask/base-controller": ^3.2.0
"@metamask/controller-utils": ^4.3.0
"@types/punycode": ^2.1.0
eth-phishing-detect: ^1.2.0
punycode: ^2.1.1
checksum: 15de581f7bec21d75531167275c68d7bbeae7fdaad02268749ba0a71c4d3ccb53718d963d6583e90c337407f65b7fcc9a89eb76c6f731802c2668a8425d5df89
checksum: 13a85865cef1515f6d0ee1cd02da37e5e6b98c493676e3a80195294725b717aa17651a0c24d2e841f790bbd22ae16911cc16bab7846da8266f4ee03007a17f4e
languageName: node
linkType: hard
@ -24504,7 +24513,7 @@ __metadata:
"@metamask/notification-controller": ^3.0.0
"@metamask/obs-store": ^8.1.0
"@metamask/permission-controller": ^4.0.0
"@metamask/phishing-controller": ^4.0.0
"@metamask/phishing-controller": ^6.0.0
"@metamask/phishing-warning": ^2.1.0
"@metamask/post-message-stream": ^6.0.0
"@metamask/providers": ^11.1.0