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

Add manageAccounts RPC method #19724

Merged

Conversation

gantunesr
Copy link
Member

No description provided.

@gantunesr gantunesr changed the title Improvement/snaps api/add manage account method Add manageAccounts RPC method Jun 22, 2023
NidhiKJha and others added 7 commits June 23, 2023 17:28
* removed portfolio link from wallet view

* removed unused code

* updated test

* updated spec file

* updated test
* Validate LavaMoat policies on each PR

The LavaMoat policies are now validated on every PR. This makes it
easier to validate policy changes, as they should always correspond
with the changes made in the PR (unlike today, when they could be due
to a change in platform or a previous PR).

Closes #19680

* Update LavaMoat policies

---------

Co-authored-by: MetaMask Bot <metamaskbot@users.noreply.github.com>
@gantunesr gantunesr marked this pull request as ready for review June 23, 2023 15:00
@gantunesr gantunesr requested review from a team as code owners June 23, 2023 15:00
@socket-security
Copy link

socket-security bot commented Jun 23, 2023

New and updated dependency changes detected. Learn more about Socket for GitHub ↗︎

Packages Version New capabilities Transitives1 Size Publisher
@metamask/snaps-controllers ⬆️ 0.34.0-flask.1...0.35.1-flask.1 shell +5/-4 3.43 MB metamaskbot
@metamask/snaps-utils ⬆️ 0.34.0-flask.1...0.35.1-flask.1 filesystem, shell +2/-1 1.36 MB metamaskbot
@metamask/snaps-ui ⬆️ 0.34.0-flask.1...0.35.1-flask.1 None +0/-0 58.4 kB metamaskbot
@metamask/rpc-methods ⬆️ 0.34.0-flask.1...0.35.1-flask.1 None +3/-2 1.82 MB metamaskbot
lavamoat ⬆️ 6.4.0...7.1.0 None +0/-1 38.9 kB weizman

Footnotes

  1. https://docs.socket.dev

@gantunesr gantunesr requested a review from a team as a code owner June 23, 2023 15:51
digiwand and others added 7 commits June 23, 2023 20:08
* security-prov: isFlaggedSecurityProviderResponse

* security-prov: create shared/modules/util

* security prov: rn isFlagged -> isSuspcious
- util fn returns true if response is not verified and flagged

* security prov: add util test
and support undefined param

* security prov: reorg util fn
- no logic changes
Update LavaMoat policies to match what CI expects.
* Replacing deprecated constants & creating stories

* updating snapshot
@montelaidev montelaidev requested review from a team, kumavis and brad-decker as code owners June 24, 2023 14:58
@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.

@socket-security
Copy link

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

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

Issue Package Version Note Source
Filesystem access @metamask/snaps-utils 0.35.1-flask.1 package.json via @metamask/rpc-methods@0.35.1-flask.1, @metamask/snaps-controllers@0.35.1-flask.1
Shell access @metamask/snaps-utils 0.35.1-flask.1 package.json via @metamask/rpc-methods@0.35.1-flask.1, @metamask/snaps-controllers@0.35.1-flask.1
New author lavamoat 7.1.0 package.json
Unstable ownership lavamoat 7.1.0 package.json
Shell access @metamask/snaps-controllers 0.35.1-flask.1 package.json

Next steps

What is filesystem access?

Accesses the file system, and could potentially read sensitive data.

If a package must read the file system, clarify what it will read and ensure it reads only what it claims to. If appropriate, packages can leave file system access to consumers and operate on data passed to it instead.

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 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 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 package-name@version specifiers. e.g. @SocketSecurity ignore foo@1.0.0 bar@* or ignore all packages with @SocketSecurity ignore-all

  • @SocketSecurity ignore lavamoat@7.1.0
  • @SocketSecurity ignore @metamask/snaps-controllers@0.35.1-flask.1
  • @SocketSecurity ignore @metamask/snaps-utils@0.35.1-flask.1

@montelaidev montelaidev merged commit 3c566d2 into snap-keyring-2 Jun 26, 2023
51 of 53 checks passed
@montelaidev montelaidev deleted the improvement/snaps-api/add-manage-account-method branch June 26, 2023 07:57
@github-actions github-actions bot locked and limited conversation to collaborators Jun 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants