Skip to content
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

feat: Update Phishing Controller to version 6.0.0 #8848

Merged
merged 4 commits into from
Mar 6, 2024

Conversation

tommasini
Copy link
Contributor

Description

Update Phishing Controller to version 6.0.0

Related issues

Fixes:

Manual testing steps

  1. Go to this page...

Screenshots/Recordings

http://recordit.co/TZ9KbX6rFq

Before

After

Pre-merge author checklist

  • I’ve followed MetaMask Coding Standards.
  • I've clearly explained what problem this PR is solving and how it is solved.
  • I've linked related issues
  • I've included manual testing steps
  • I've included screenshots/recordings if applicable
  • I’ve included tests if applicable
  • I’ve documented my code using JSDoc format if applicable
  • I’ve applied the right labels on the PR (see labeling guidelines). Not required for external contributors.
  • I’ve properly set the pull request status:
    • In case it's not yet "ready for review", I've set it to "draft".
    • In case it's "ready for review", I've changed it from "draft" to "non-draft".

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

@tommasini tommasini added needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) team-mobile-platform labels Mar 5, 2024
@tommasini tommasini requested a review from a team as a code owner March 5, 2024 15:40
Copy link
Contributor

github-actions bot commented Mar 5, 2024

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.

Copy link

socket-security bot commented Mar 5, 2024

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@babel/plugin-proposal-export-default-from@7.22.17 Transitive: environment, filesystem, shell, unsafe +52 10.9 MB nicolo-ribaudo
npm/@babel/plugin-syntax-export-default-from@7.22.5 Transitive: environment, filesystem, shell, unsafe +51 10.9 MB nicolo-ribaudo
npm/@babel/plugin-syntax-jsx@7.22.5 Transitive: environment, filesystem, shell, unsafe +51 10.9 MB nicolo-ribaudo
npm/@babel/plugin-syntax-typescript@7.22.5 Transitive: environment, filesystem, shell, unsafe +51 10.9 MB nicolo-ribaudo
npm/@babel/plugin-transform-react-display-name@7.22.5 Transitive: environment, filesystem, shell, unsafe +51 10.9 MB nicolo-ribaudo
npm/@babel/plugin-transform-react-jsx@7.22.15 Transitive: environment, filesystem, shell, unsafe +53 11 MB nicolo-ribaudo
npm/@babel/plugin-transform-typescript@7.22.15 Transitive: environment, filesystem, shell, unsafe +58 11.3 MB nicolo-ribaudo
npm/@babel/preset-env@7.22.6 environment Transitive: filesystem, shell, unsafe +71 15 MB nicolo-ribaudo
npm/@babel/preset-typescript@7.23.0 Transitive: environment, filesystem, shell, unsafe +61 11.4 MB nicolo-ribaudo
npm/@babel/register@7.22.15 environment, filesystem, unsafe Transitive: shell +66 11.2 MB nicolo-ribaudo
npm/@blockaid/ppom_release@1.2.8 network 0 3.18 MB blockaiduser
npm/@jimp/core@0.22.12 Transitive: eval, network +22 3.71 MB alisowski
npm/@jimp/custom@0.22.12 Transitive: eval, network +23 3.75 MB alisowski
npm/@jimp/plugin-crop@0.22.12 Transitive: eval, network +24 3.84 MB alisowski
npm/@jimp/plugin-rotate@0.22.12 Transitive: eval, network +30 5.16 MB alisowski
npm/@jimp/plugin-scale@0.22.12 Transitive: eval, network +25 4 MB alisowski
npm/@metamask/phishing-controller@6.0.0 network Transitive: environment, filesystem +75 17.1 MB metamaskbot
npm/@react-native-community/cli-clean@13.5.1 filesystem Transitive: environment, network, shell +64 1.94 MB thymikee
npm/@react-native-community/cli-config@13.5.1 filesystem Transitive: environment, eval, network, shell, unsafe +72 3.27 MB thymikee
npm/@react-native-community/cli-debugger-ui@13.5.1 Transitive: environment, eval, filesystem, network +16 507 kB thymikee
npm/@react-native-community/cli-doctor@13.5.1 environment, filesystem, shell Transitive: eval, network, unsafe +119 7.17 MB thymikee
npm/@react-native-community/cli-hermes@13.5.1 environment, filesystem, shell Transitive: network +90 4.16 MB thymikee
npm/@react-native-community/cli-platform-android@13.5.1 environment, filesystem, shell Transitive: network +86 3.51 MB thymikee
npm/@react-native-community/cli-platform-ios@13.5.1 Transitive: environment, filesystem, network, shell +66 2.34 MB thymikee
npm/@react-native-community/cli-plugin-metro@12.3.6 None 0 2.06 kB thymikee
npm/@react-native-community/cli-server-api@13.5.1 environment, filesystem, shell Transitive: eval, network +86 7.54 MB thymikee
npm/@react-native-community/cli-tools@13.5.1 environment, filesystem, network, shell +42 1.6 MB thymikee
npm/@react-native-community/cli-types@13.5.1 None +6 677 kB thymikee
npm/@react-native-community/cli@13.5.1 environment, filesystem, shell Transitive: eval, network, unsafe +180 14 MB thymikee
npm/@react-navigation/core@5.16.1 environment +11 1.67 MB satya164
npm/@react-navigation/native@5.9.8 Transitive: environment, eval, filesystem, network, shell, unsafe +546 187 MB satya164
npm/@react-navigation/routers@5.7.4 None +1 259 kB satya164
npm/@types/node@20.8.0 None 0 3.92 MB types
npm/@wdio/cli@7.35.0 environment, filesystem, shell Transitive: eval, network, unsafe +251 98.9 MB wdio-user
npm/@wdio/repl@7.33.0 unsafe Transitive: environment, filesystem, network +43 73.8 MB wdio-user
npm/@wdio/utils@7.33.0 environment, filesystem Transitive: network +42 73.8 MB wdio-user
npm/abstract-leveldown@2.6.3 None +1 138 kB ralphtheninja
npm/array-buffer-byte-length@1.0.1 Transitive: eval +9 170 kB ljharb
npm/array-includes@3.1.7 Transitive: eval +60 3.35 MB ljharb
npm/array.prototype.filter@1.0.3 Transitive: eval +61 3.35 MB ljharb
npm/array.prototype.flat@1.3.2 Transitive: eval +61 3.35 MB ljharb
npm/arraybuffer.prototype.slice@1.0.3 Transitive: eval +59 3.32 MB ljharb
npm/babel-loader@9.1.2 filesystem Transitive: environment, eval, network, shell, unsafe +36 23.4 MB nicolo-ribaudo
npm/bufferutil@4.0.7 None 0 409 kB lpinca
npm/bunyan@2.0.5 environment, filesystem +19 5.19 MB trentm
npm/chokidar@3.6.0 environment, filesystem +13 519 kB paulmillr
npm/chrome-launcher@0.15.2 environment, filesystem, network, shell +6 4.11 MB hoten
npm/deprecated-react-native-prop-types@5.0.0 Transitive: environment +6 189 kB rh389
npm/devtools@7.35.0 environment, filesystem, shell Transitive: eval, network +98 80.2 MB wdio-user
npm/envinfo@7.11.1 environment, eval, filesystem, shell 0 162 kB tabrindle
npm/enzyme@3.11.0 Transitive: eval, network +95 7.67 MB ljharb
npm/es-set-tostringtag@2.0.3 None +4 85.4 kB ljharb
npm/es-shim-unscopables@1.0.2 None +2 53.3 kB ljharb
npm/eslint-import-resolver-node@0.3.9 Transitive: environment, filesystem +7 290 kB ljharb
npm/eslint-module-utils@2.8.1 Transitive: environment +1 104 kB ljharb
npm/eslint-plugin-import@2.29.1 filesystem, unsafe Transitive: environment, eval, shell +169 17.9 MB ljharb
npm/fast-xml-parser@4.3.5 None +1 185 kB amitgupta
npm/flow-parser@0.206.0 None 0 768 kB flowtype
npm/get-symbol-description@1.0.2 Transitive: eval +6 138 kB ljharb
npm/hermes-parser@0.19.1 filesystem 0 1.06 MB hermes-team
npm/html-inline-script-webpack-plugin@3.2.0 Transitive: environment, eval, filesystem, network, shell, unsafe +22 14.5 MB icelam
npm/ignore@5.2.4 None 0 51.2 kB kael
npm/image-size@1.1.1 filesystem +2 71.6 kB netroy
npm/internal-slot@1.0.7 Transitive: eval +10 272 kB ljharb
npm/is-array-buffer@3.0.4 Transitive: eval +6 134 kB ljharb
npm/is-negative-zero@2.0.3 None 0 27.1 kB ljharb
npm/is-shared-array-buffer@1.0.3 None +5 101 kB ljharb
npm/jest-get-type@29.6.3 None 0 3.79 kB simenb
npm/jest-validate@29.7.0 Transitive: environment +18 4.71 MB simenb
npm/metro-babel-transformer@0.79.1 environment Transitive: filesystem, shell, unsafe +52 11.2 MB metro-bot
npm/metro-cache-key@0.79.1 filesystem 0 1.62 kB metro-bot
npm/metro-cache@0.79.1 filesystem, network Transitive: environment +12 261 kB metro-bot
npm/metro-config@0.79.1 filesystem Transitive: environment, eval, network, shell, unsafe +190 26.3 MB metro-bot
npm/metro-core@0.79.1 None +2 145 kB metro-bot
npm/metro-file-map@0.79.1 filesystem, shell, unsafe Transitive: environment, network +36 5.18 MB metro-bot
npm/metro-minify-terser@0.79.1 Transitive: environment, eval, filesystem +10 3.33 MB metro-bot
npm/metro-resolver@0.79.1 None 0 103 kB metro-bot
npm/metro-runtime@0.80.6 None +2 348 kB metro-bot
npm/metro-transform-plugins@0.79.1 Transitive: environment, filesystem, shell, unsafe +51 10.9 MB metro-bot
npm/metro-transform-worker@0.79.1 Transitive: environment, eval, filesystem, network, shell, unsafe +190 26.3 MB metro-bot
npm/metro@0.79.1 environment, filesystem, network Transitive: eval, shell, unsafe +190 26.3 MB metro-bot
npm/object.assign@4.1.5 Transitive: eval +11 281 kB ljharb
npm/react-devtools-core@5.0.0 None +3 18.5 MB hoxyq
npm/react-native-gesture-handler@2.15.0 Transitive: environment, eval, filesystem, network, shell, unsafe +542 191 MB jakub.piasecki
npm/react-native-get-random-values@1.10.0 Transitive: environment, eval, filesystem, network, shell, unsafe +538 186 MB linusu
npm/react-native-safe-area-context@4.9.0 environment Transitive: eval, filesystem, network, shell, unsafe +537 186 MB janicduplessis
npm/react-native-screens@3.29.0 Transitive: environment, eval, filesystem, network, shell, unsafe +539 187 MB kkafar
npm/react-native@1000.0.0 environment, network Transitive: eval, filesystem, shell, unsafe +536 186 MB react-native-bot
npm/regexp.prototype.flags@1.5.2 Transitive: eval +13 275 kB ljharb
npm/safe-array-concat@1.1.0 None +5 101 kB ljharb
npm/safe-regex-test@1.0.3 Transitive: eval +10 190 kB ljharb
npm/tsconfig-paths@3.15.0 environment, filesystem, unsafe +2 252 kB jonaskello
npm/typed-array-buffer@1.0.2 Transitive: eval +10 187 kB ljharb
npm/typed-array-byte-length@1.0.1 Transitive: eval +10 194 kB ljharb
npm/typed-array-byte-offset@1.0.2 Transitive: eval +10 194 kB ljharb
npm/typed-array-length@1.0.5 Transitive: eval +10 200 kB ljharb
npm/url-parse@1.5.10 None +2 78.5 kB swaagie
npm/url@0.11.3 Transitive: eval +9 329 kB ljharb
npm/webpack@5.88.1 environment, filesystem, network, unsafe Transitive: eval, shell +15 14.1 MB thelarkinn

🚮 Removed packages: npm/@babel/compat-data@7.22.20, npm/@babel/helper-module-transforms@7.23.3, npm/@babel/parser@7.24.0, npm/@babel/plugin-proposal-export-default-from@7.23.3, npm/@babel/plugin-syntax-export-default-from@7.23.3, npm/@babel/plugin-syntax-jsx@7.23.3, npm/@babel/plugin-syntax-typescript@7.23.3, npm/@babel/plugin-transform-react-jsx@7.23.4, npm/@babel/plugin-transform-typescript@7.23.6, npm/@babel/preset-env@7.22.20, npm/@babel/preset-typescript@7.23.3, npm/@babel/register@7.23.7, npm/@babel/template@7.24.0, npm/@babel/types@7.23.0, npm/@blockaid/ppom_release@1.4.2, npm/@cucumber/messages@22.0.0, npm/@jridgewell/gen-mapping@0.3.5, npm/@jridgewell/set-array@1.2.1, npm/@keystonehq/bc-ur-registry-eth@0.7.7, npm/@keystonehq/metamask-airgapped-keyring@0.3.0, npm/@metamask/eth-sig-util@4.0.1, npm/@metamask/phishing-controller@5.0.0, npm/@react-native-community/cli-platform-android@10.2.0, npm/@react-native-community/cli-platform-ios@10.2.5, npm/@react-navigation/native@5.9.4, npm/@types/estree@1.0.2, npm/@types/json-schema@7.0.13, npm/@types/react-native@0.64.13, npm/@types/semver@7.5.3, npm/@typescript-eslint/eslint-plugin@5.62.0, npm/@typescript-eslint/parser@5.62.0, npm/@wdio/cli@7.32.4, npm/appium-adb@9.14.11, npm/array-includes@3.1.6, npm/array.prototype.flat@1.3.1, npm/base-64@1.0.0, npm/body-parser@1.20.1, npm/browserslist@4.23.0, npm/buffer@5.2.1, npm/caniuse-lite@1.0.30001594, npm/chokidar@3.5.3, npm/core-js-compat@3.32.2, npm/d3-shape@3.2.0, npm/electron-to-chromium@1.4.692, npm/envinfo@7.11.0, npm/enzyme@3.9.0, npm/eslint-plugin-import@2.27.5, npm/eslint-plugin-jsdoc@39.9.1, npm/eslint-plugin-react-native@4.0.0, npm/eslint-plugin-react@7.16.0, npm/eth-json-rpc-errors@2.0.2, npm/eth-json-rpc-middleware@4.3.0, npm/ethereumjs-abi@0.6.6, npm/ethereumjs-util@6.1.0, npm/ethjs-contract@0.2.3, npm/events@3.0.0, npm/fast-xml-parser@4.2.4, npm/html-inline-script-webpack-plugin@3.2.1, npm/https-browserify@0.0.1, npm/ignore@5.3.1, npm/internal-slot@1.0.5, npm/is-array-buffer@3.0.2, npm/json-rpc-middleware-stream@3.0.0, npm/metro-config@0.73.10, npm/multihashes@0.4.14, npm/node-releases@2.0.14, npm/object.assign@4.1.4, npm/prop-types@15.7.2, npm/qs@6.7.3, npm/react-native-gesture-handler@1.10.3, npm/react-native-get-random-values@1.8.0, npm/react-native-modal@12.1.0, npm/react-native-safe-area-context@3.4.1, npm/react-native-screens@3.19.0, npm/react-native-svg@12.1.1, npm/react-native-swipe-gestures@1.0.3, npm/react-native-url-polyfill@1.3.0, npm/react-native@0.71.15, npm/readable-stream@2.3.7, npm/redux@4.1.1, npm/regenerator-runtime@0.13.9, npm/regexp.prototype.flags@1.5.1, npm/resolve@1.22.6, npm/safe-array-concat@1.0.1, npm/through2@3.0.1, npm/url-parse@1.5.9, npm/url@0.11.0

View full report↗︎

Copy link

socket-security bot commented Mar 5, 2024

🚨 Potential security issues detected. Learn more about Socket for GitHub ↗︎

To accept the risk, merge this PR and you will not be notified again.

Alert Package NoteSource
Deprecated npm/@babel/plugin-proposal-logical-assignment-operators@7.20.7
  • Reason: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-logical-assignment-operators instead.
Deprecated npm/@babel/plugin-proposal-numeric-separator@7.18.6
  • Reason: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-numeric-separator instead.
Deprecated npm/@babel/plugin-proposal-unicode-property-regex@7.18.6
  • Reason: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-unicode-property-regex instead.
Mild CVE npm/semver@6.3.0
New author npm/react-refresh@0.14.0
Native code npm/bufferutil@4.0.7
Native code npm/utf-8-validate@5.0.10
Critical CVE npm/@babel/traverse@7.22.6
New author npm/babel-plugin-transform-flow-enums@0.0.2
New author npm/flow-enums-runtime@0.0.6
Shell access npm/chromium-edge-launcher@1.0.0
Network access npm/chromium-edge-launcher@1.0.0
Network access npm/chromium-edge-launcher@1.0.0
Deprecated npm/react-native@1000.0.0
  • Reason: This version of React Native was accidentally published and should not be used in production
Shell access npm/@react-native-community/cli-doctor@13.5.1
Shell access npm/@react-native-community/cli-platform-apple@13.5.1
Shell access npm/@rnx-kit/chromium-edge-launcher@1.0.0
Network access npm/@rnx-kit/chromium-edge-launcher@1.0.0
Network access npm/@rnx-kit/chromium-edge-launcher@1.0.0
Shell access npm/@react-native-community/cli-doctor@12.3.6

View full report↗︎

Next steps

What is a deprecated package?

The maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.

Research the state of the package and determine if there are non-deprecated versions that can be used, or if it should be replaced with a new, supported solution.

What is a mild CVE?

Contains a low severity Common Vulnerability and Exposure (CVE).

Remove or replace dependencies that include known low severity CVEs. Consumers can use dependency overrides or npm audit fix --force to remove vulnerable dependencies.

What is new author?

A new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.

Scrutinize new collaborator additions to packages because they now have the ability to publish code into your dependency tree. Packages should avoid frequent or unnecessary additions or changes to publishing rights.

What's wrong with native code?

Contains native code which could be a vector to obscure malicious code, and generally decrease the likelihood of reproducible or reliable installs.

Ensure that native code bindings are expected. Consumers may consider pure JS and functionally similar alternatives to avoid the challenges and risks associated with native code bindings.

What is a critical CVE?

Contains a Critical Common Vulnerability and Exposure (CVE).

Remove or replace dependencies that include known critical CVEs. Consumers can use dependency overrides or npm audit fix --force to remove vulnerable dependencies.

What is shell access?

This module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.

Packages should avoid accessing the shell which can reduce portability, and make it easier for malicious shell access to be introduced.

What is network access?

This module accesses the network.

Packages should remove all network access that is functionally unnecessary. Consumers should audit network access to ensure legitimate use.

Take a deeper look at the dependency

Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support [AT] socket [DOT] dev.

Remove the package

If you happen to install a dependency that Socket reports as Known Malware you should immediately remove it and select a different dependency. For other alert types, you may may wish to investigate alternative packages or consider if there are other ways to mitigate the specific risk posed by the dependency.

Mark a package as acceptable risk

To ignore an alert, reply with a comment starting with @SocketSecurity ignore followed by a space separated list of ecosystem/package-name@version specifiers. e.g. @SocketSecurity ignore npm/foo@1.0.0 or ignore all packages with @SocketSecurity ignore-all

  • @SocketSecurity ignore npm/@babel/plugin-proposal-logical-assignment-operators@7.20.7
  • @SocketSecurity ignore npm/@babel/plugin-proposal-numeric-separator@7.18.6
  • @SocketSecurity ignore npm/@babel/plugin-proposal-unicode-property-regex@7.18.6
  • @SocketSecurity ignore npm/semver@6.3.0
  • @SocketSecurity ignore npm/react-refresh@0.14.0
  • @SocketSecurity ignore npm/bufferutil@4.0.7
  • @SocketSecurity ignore npm/utf-8-validate@5.0.10
  • @SocketSecurity ignore npm/@babel/traverse@7.22.6
  • @SocketSecurity ignore npm/babel-plugin-transform-flow-enums@0.0.2
  • @SocketSecurity ignore npm/flow-enums-runtime@0.0.6
  • @SocketSecurity ignore npm/chromium-edge-launcher@1.0.0
  • @SocketSecurity ignore npm/react-native@1000.0.0
  • @SocketSecurity ignore npm/@react-native-community/cli-doctor@13.5.1
  • @SocketSecurity ignore npm/@react-native-community/cli-platform-apple@13.5.1
  • @SocketSecurity ignore npm/@rnx-kit/chromium-edge-launcher@1.0.0
  • @SocketSecurity ignore npm/@react-native-community/cli-doctor@12.3.6

Copy link

sonarcloud bot commented Mar 5, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

Copy link
Contributor

@MarioAslau MarioAslau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉🎉🎉

Copy link
Contributor

@Cal-L Cal-L left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tommasini
Copy link
Contributor Author

@SocketSecurity ignore-all
Ignoring all since there is no new dependency added to the phishing controller on this update

@tommasini tommasini merged commit f48af99 into main Mar 6, 2024
29 checks passed
@tommasini tommasini deleted the update/1579-phishing-controller-v6 branch March 6, 2024 21:45
@github-actions github-actions bot locked and limited conversation to collaborators Mar 6, 2024
@github-actions github-actions bot removed the needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) label Mar 6, 2024
@metamaskbot metamaskbot added the release-7.19.0 Issue or pull request that will be included in release 7.19.0 label Mar 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-7.19.0 Issue or pull request that will be included in release 7.19.0 team-mobile-platform
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

4 participants