MetaMask / MetaMask/snaps

Split Snap ID into resource location and unique id

Open
#874 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
853
Forks
662
Avg merge
2d 8h
Merged PRs (30d)
8

Description

Right now we’re mixing resource location with a unique identifier.
A snap with the same location (eg `localhost:8080`) can get access to entropy of a different snap but located in the same location.

This problem will become bigger when we allow other locations of snaps, such as ipfs.

My suggestion is to split the snap id into two things:
* URI for accessing the files ([SIP-4](https://github.com/MetaMask/SIPs/blob/main/SIPS/sip-4.md))
* Unique identifier - a pair of `[name from package.json, author cryptographic signature]`, which maintains continuity over multiple version from multiple sources

Contributor guide

Open the contributing guide

Research direction

Start by reviewing SIP-4 and the Snap ID usage; the issue names no source files or tests. Trace how the current ID combines resource location and identity, then define separate URI and unique-identifier representations using the package.json name and author cryptographic signature. Done means continuity is preserved across versions and sources while locations such as localhost and IPFS remain distinct.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
security
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.