Skip to content

feat: Enable ppom on other chains#22070

Closed
segun wants to merge 15 commits intodevelopfrom
olu/enable-ppom-on-other-chains
Closed

feat: Enable ppom on other chains#22070
segun wants to merge 15 commits intodevelopfrom
olu/enable-ppom-on-other-chains

Conversation

@segun
Copy link
Contributor

@segun segun commented Nov 28, 2023

Description

This PR depends on

  1. Olu/enable ppom on more networks ppom-validator#90

Once these PRs are merged, and for the Controller PR, a new controller version released, we'll be able to support additional networks on extension and we should enable the feature on them.

The following networks are supported by this change.

Ethereum Mainnet (already done)
BNB chain
Polygon
Arbitrum
Optimism
Avalanche
Linea

NOTE: So that we can test this branch, we made some changes in the package.json, and ppom.js once the above 2 dependency PRs are merged, we should revert the changes and especially in the change below, we should be using the deployed version of PPOM Validator.

    "@metamask/ppom-validator": "MetaMask/ppom-validator#olu/send-ppom-on-more-networks",

Related issues

Fixes: #1692
Blocked By: #21436, #90

Manual testing steps

  1. Launch MM
  2. Change network to any of the chains above other than Mainnet
  3. Open this modified testdapp
  4. Connect MM and click on any of the PPOM buttons
  5. You should not see any blockaid banner
  6. Checkout this branch, build and restart MM
  7. Repeat 2-4
  8. You should see blockaid banner when you click on any of the PPOM buttons

Screenshots/Recordings

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.

@segun segun self-assigned this Nov 28, 2023
@segun segun requested a review from a team as a code owner November 28, 2023 12:38
@segun segun marked this pull request as draft November 28, 2023 12:38
@github-actions
Copy link
Contributor

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.

@segun segun force-pushed the olu/enable-ppom-on-other-chains branch from dee513e to 066c041 Compare November 29, 2023 12:37
@segun segun force-pushed the olu/enable-ppom-on-other-chains branch from 763e17e to 114d089 Compare January 15, 2024 13:22
@jpuri jpuri marked this pull request as ready for review January 17, 2024 09:35
jpuri
jpuri previously approved these changes Jan 17, 2024
@segun segun added team-confirmations-secure-ux-PR PRs from the confirmations team needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) labels Jan 17, 2024
@segun segun force-pushed the olu/enable-ppom-on-other-chains branch from cff378a to 18c04a7 Compare January 18, 2024 10:46
@segun segun requested review from a team as code owners January 18, 2024 11:06
@segun segun force-pushed the olu/enable-ppom-on-other-chains branch from 1d48d2e to 7391597 Compare January 18, 2024 12:28
@jpuri
Copy link
Contributor

jpuri commented Jan 19, 2024

@metamaskbot update-policies

@MetaMask MetaMask deleted a comment from metamaskbot Jan 19, 2024
@MetaMask MetaMask deleted a comment from metamaskbot Jan 19, 2024
@metamaskbot
Copy link
Collaborator

Policies updated

@socket-security
Copy link

socket-security bot commented Jan 19, 2024

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

Package New capabilities Transitives Size Publisher
npm/@metamask/ppom-validator@0.22.0 Transitive: environment, filesystem, network, shell, unsafe +148 27.2 MB brad.decker, danfinlay, gudahtt, ...9 more
npm/@scure/base@1.1.5 None 0 79.4 kB paulmillr
npm/@types/debug@4.1.12 None +1 9.65 kB types
npm/@types/eslint-scope@3.7.7 None +3 248 kB types
npm/acorn-import-assertions@1.9.0 None 0 25.7 kB xtuc
npm/agentkeepalive@4.5.0 network +1 47.4 kB fengmk2
npm/builtin-modules@3.3.0 unsafe 0 4.51 kB sindresorhus
npm/crypto-js@4.2.0 None 0 487 kB evanvosberg
npm/eslint-compat-utils@0.1.2 filesystem Transitive: environment, shell, unsafe +61 8.79 MB ota-meshi
npm/eslint-plugin-es-x@7.5.0 Transitive: environment, filesystem, shell, unsafe +62 9.16 MB eslint-community-bot
npm/eslint-plugin-n@16.6.2 filesystem Transitive: environment, shell, unsafe +74 9.96 MB weiran.zsd
npm/get-tsconfig@4.7.2 filesystem, unsafe +1 116 kB hirokiosame
npm/is-builtin-module@3.2.1 Transitive: unsafe +1 8.39 kB sindresorhus
npm/jsonschema@1.4.1 None 0 81.8 kB acubed
npm/make-fetch-happen@13.0.0 network Transitive: environment, filesystem, shell +57 4.28 MB npm-cli-ops
npm/minipass-fetch@3.0.4 environment, network +3 195 kB npm-cli-ops
npm/nopt@7.2.0 None +1 31 kB npm-cli-ops
npm/react-router@5.3.4 environment +15 1.62 MB mjackson
npm/resolve-pkg-maps@1.0.0 None 0 15 kB hirokiosame
npm/unique-slug@4.0.0 None +1 14.5 kB lukekarrys

🚮 Removed packages: npm/@babel/plugin-proposal-class-properties@7.18.6, npm/@babel/plugin-proposal-nullish-coalescing-operator@7.18.6, npm/@babel/plugin-proposal-optional-chaining@7.21.0, npm/@cspotcode/source-map-consumer@0.8.0, npm/@metamask/ppom-validator@0.10.0, npm/@scure/base@1.1.3, npm/@sinonjs/formatio@5.0.1, npm/@storybook/store@7.4.6, npm/@types/debug@4.1.7, npm/@types/glob@7.2.0, npm/babel-plugin-named-exports-order@0.0.2, npm/babel-plugin-react-docgen@4.2.1, npm/c8@7.14.0, npm/character-entities-html4@1.1.3, npm/collapse-white-space@1.0.5, npm/consolidate@0.16.0, npm/date-now@0.1.4, npm/detect-libc@1.0.3, npm/error-inject@1.0.0, npm/estree-to-babel@3.2.1, npm/exit-on-epipe@1.0.1, npm/generic-names@2.0.1, npm/gud@1.0.0, npm/hash-sum@2.0.0, npm/ignore-walk@3.0.1, npm/is-alphanumeric@1.0.0, npm/is-data-descriptor@0.1.4, npm/is-whitespace-character@1.0.3, npm/is-word-character@1.0.3, npm/jsonschema@1.2.4, npm/lodash.camelcase@4.3.0, npm/markdown-escapes@1.0.3, npm/mdast-util-compact@2.0.1, npm/mini-create-react-context@0.3.2, npm/needle@2.4.0, npm/node-pre-gyp@0.12.0, npm/npm-bundled@1.1.2, npm/npm-packlist@1.4.8, npm/os-tmpdir@1.0.2, npm/osenv@0.1.5, npm/postcss-modules@4.1.3, npm/printj@1.1.2, npm/query-ast@1.0.4, npm/react-resize-detector@7.1.2, npm/react-router-dom@5.1.2, npm/react-router@5.1.2, npm/regenerate-unicode-properties@10.1.0, npm/sax@1.3.0, npm/scss-parser@1.0.5, npm/simple-update-notifier@2.0.0, npm/state-toggle@1.0.2, npm/string-hash@1.1.3, npm/stringify-entities@3.0.1, npm/trim-trailing-lines@1.1.2, npm/trim@0.0.3, npm/unherit@1.1.2, npm/unist-util-remove-position@2.0.1, npm/vfile-location@3.2.0, npm/webpack@5.82.1

View full report↗︎

@socket-security
Copy link

socket-security bot commented Jan 19, 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
New author npm/nopt@7.2.0
New author npm/abbrev@2.0.0
Network access npm/@npmcli/agent@2.2.0
Network access npm/@npmcli/agent@2.2.0
Network access npm/@npmcli/agent@2.2.0
Network access npm/@npmcli/agent@2.2.0
Network access npm/@npmcli/agent@2.2.0
Unstable ownership npm/rfdc@1.3.1
New author npm/rfdc@1.3.1

Ignoring: npm/@metamask/ppom-validator@0.22.0

View full report↗︎

Next steps

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 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.

What is unstable ownership?

A new collaborator has begun publishing package versions. Package stability and security risk may be elevated.

Try to reduce the amount of authors you depend on to reduce the risk to malicious actors gaining access to your supply chain. Packages should remove inactive collaborators with publishing rights from packages on npm.

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/nopt@7.2.0
  • @SocketSecurity ignore npm/abbrev@2.0.0
  • @SocketSecurity ignore npm/@npmcli/agent@2.2.0
  • @SocketSecurity ignore npm/rfdc@1.3.1

@jpuri
Copy link
Contributor

jpuri commented Jan 19, 2024

@SocketSecurity ignore npm/@metamask/ppom-validator@0.22.0

jpuri
jpuri previously approved these changes Jan 19, 2024
segun and others added 7 commits January 22, 2024 14:13
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

use ppom validator from branch

Update ppom release to 1.3.3

Add Linea Mainnet to supported chain ids.

Update

Update PPOM validator

Fix build
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
segun added a commit that referenced this pull request Jan 24, 2024
…etwork coverage on extension (#22618)

## **Description**
- What's new copy should be updated to:
> Steer clear of known scams while still preserving your privacy with
security alerts powered by Blockaid. This feature is available on
Arbitrum, Avalanche, BNB chain, Ethereum Mainnet, Linea, Optimism and
Polygon.
> 
> Always do your own due diligence before approving requests.

- Settings copy should be updated to:
> Privacy preserving - no data is shared with third parties. Available
on Arbitrum, Avalanche, BNB chain, Ethereum Mainnet, Linea, Optimism and
Polygon.

## **Related issues**

Fixes:
[#1695](https://github.com/MetaMask/MetaMask-planning/issues/1695)

Blocked By: #22070 

## **Screenshots/Recordings**

### **Before**


https://github.com/MetaMask/metamask-extension/assets/44811/0e6b6103-efb0-4ed8-94c2-44ac0f281ff8

### **After**


https://github.com/MetaMask/metamask-extension/assets/44811/36740992-0af2-44c5-b62b-0ac522df4d17

## **Pre-merge author checklist**

- [x] I’ve followed [MetaMask Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md).
- [x] I've clearly explained what problem this PR is solving and how it
is solved.
- [x] I've linked related issues
- [x] I've included manual testing steps
- [x] I've included screenshots/recordings if applicable
- [x] I’ve included tests if applicable
- [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [x] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.
- [x] I’ve properly set the pull request status:
  - [ ] In case it's not yet "ready for review", I've set it to "draft".
- [x] 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.
montelaidev pushed a commit that referenced this pull request Jan 25, 2024
…etwork coverage on extension (#22618)

## **Description**
- What's new copy should be updated to:
> Steer clear of known scams while still preserving your privacy with
security alerts powered by Blockaid. This feature is available on
Arbitrum, Avalanche, BNB chain, Ethereum Mainnet, Linea, Optimism and
Polygon.
> 
> Always do your own due diligence before approving requests.

- Settings copy should be updated to:
> Privacy preserving - no data is shared with third parties. Available
on Arbitrum, Avalanche, BNB chain, Ethereum Mainnet, Linea, Optimism and
Polygon.

## **Related issues**

Fixes:
[#1695](MetaMask/MetaMask-planning#1695)

Blocked By: #22070 

## **Screenshots/Recordings**

### **Before**


https://github.com/MetaMask/metamask-extension/assets/44811/0e6b6103-efb0-4ed8-94c2-44ac0f281ff8

### **After**


https://github.com/MetaMask/metamask-extension/assets/44811/36740992-0af2-44c5-b62b-0ac522df4d17

## **Pre-merge author checklist**

- [x] I’ve followed [MetaMask Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md).
- [x] I've clearly explained what problem this PR is solving and how it
is solved.
- [x] I've linked related issues
- [x] I've included manual testing steps
- [x] I've included screenshots/recordings if applicable
- [x] I’ve included tests if applicable
- [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [x] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.
- [x] I’ve properly set the pull request status:
  - [ ] In case it's not yet "ready for review", I've set it to "draft".
- [x] 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.
dbrans pushed a commit that referenced this pull request Jan 25, 2024
…etwork coverage on extension (#22618)

## **Description**
- What's new copy should be updated to:
> Steer clear of known scams while still preserving your privacy with
security alerts powered by Blockaid. This feature is available on
Arbitrum, Avalanche, BNB chain, Ethereum Mainnet, Linea, Optimism and
Polygon.
> 
> Always do your own due diligence before approving requests.

- Settings copy should be updated to:
> Privacy preserving - no data is shared with third parties. Available
on Arbitrum, Avalanche, BNB chain, Ethereum Mainnet, Linea, Optimism and
Polygon.

## **Related issues**

Fixes:
[#1695](https://github.com/MetaMask/MetaMask-planning/issues/1695)

Blocked By: #22070 

## **Screenshots/Recordings**

### **Before**


https://github.com/MetaMask/metamask-extension/assets/44811/0e6b6103-efb0-4ed8-94c2-44ac0f281ff8

### **After**


https://github.com/MetaMask/metamask-extension/assets/44811/36740992-0af2-44c5-b62b-0ac522df4d17

## **Pre-merge author checklist**

- [x] I’ve followed [MetaMask Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md).
- [x] I've clearly explained what problem this PR is solving and how it
is solved.
- [x] I've linked related issues
- [x] I've included manual testing steps
- [x] I've included screenshots/recordings if applicable
- [x] I’ve included tests if applicable
- [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [x] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.
- [x] I’ve properly set the pull request status:
  - [ ] In case it's not yet "ready for review", I've set it to "draft".
- [x] 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.
@github-actions
Copy link
Contributor

This PR has been automatically marked as stale because it has not had recent activity in the last 60 days. It will be closed in 14 days. Thank you for your contributions.

@github-actions github-actions bot added the stale issues and PRs marked as stale label Mar 22, 2024
@github-actions
Copy link
Contributor

github-actions bot commented Apr 6, 2024

This PR was closed because there has been no follow up activity in the last 14 days. Thank you for your contributions.

@github-actions github-actions bot closed this Apr 6, 2024
@jpuri jpuri deleted the olu/enable-ppom-on-other-chains branch September 11, 2024 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) stale issues and PRs marked as stale team-confirmations-secure-ux-PR PRs from the confirmations team

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants