Refactor @metamask/providers and make it use #hashFunctions for private methods
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 268
- Forks
- 130
- PR merge metrics
- No merged PRs in 30d
Description
This is a proposal to do refactoring of the `@metamask/providers` `StreamProvider` and make its private methods and properties use `#hash` approach if possible. That way it would not be exposing methods and properties within its prototype chain which can be a security concern.
It is discovered that `harden` function from [Secure EcmaScript](https://www.npmjs.com/package/ses) which is used in Snaps and LavaMoat, is freezing some parts of the stream which makes it impossible to work. Because of that, a special way of using Proxy was introduced. By having a real private methods and properties it might be easier to secure this type of issues in the future.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the @metamask/providers StreamProvider implementation and reviewing how its private methods and properties are exposed through the prototype chain. Read the issue’s context about SES harden, Snaps, LavaMoat, and the Proxy workaround. Done means determining whether # private methods and properties can replace the current approach without breaking stream behavior or security.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- security
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100