MetaMask / MetaMask/snaps

Restrict available RPC methods for `snap.request()` by means of an allowlist

Open
#1,763 0 comments 0 reactions 0 assignees View on GitHub
area-capabilities type-security
Dominant language
TypeScript
Stars
853
Forks
662
Avg merge
2d 8h
Merged PRs (30d)
8

Description

Currently, we restrict the RPC methods available to `snap.request()` by means of a blocklist. We should consider replacing this with an allowlist explicitly listing each permitted method. In this way, we will never fail to prevent an RPC method from being allowed through the snap RPC provider.

Contributor guide

Open the contributing guide

Research direction

Locate the snap.request() RPC provider and the current blocklist implementation. Review how permitted RPC methods are determined, then define the allowlist scope and verify that unlisted methods cannot pass through the provider. The issue does not name specific files or tests, so repository exploration and security-domain context are needed.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api, security
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.