oven-sh / bun

Incredibly fast JavaScript runtime, bundler, test runner, and package manager – all in one
https://bun.sh
Other
74.14k stars 2.77k forks source link

Implementation of shadowrealms for isolated processes and secure user code execution. #10413

Closed Autumnlight02 closed 6 months ago

Autumnlight02 commented 6 months ago

What is the problem this feature would solve?

This would allow us to archieve a better implementation of node:vm At the moment node:vm still has its fair shares of memory vunerability issues etc. Libraries so far have not been able to solve this issue. image

Currently in TC 39 there is a proposal on Stage 2.7. I would wish for an early Implementation in Bun so that we can safely execute user scripts. Perhaps even go so far to add additional supports of feature activations like network, fs etc. The proposal is here: https://github.com/tc39/proposal-shadowrealm

What is the feature you are proposing to solve the problem?

early implementation of https://github.com/tc39/proposal-shadowrealm.

What alternatives have you considered?

https://www.npmjs.com/package/isolated-vm#frequently-asked-question

Jarred-Sumner commented 6 months ago

ShadowRealm is available in Bun

Autumnlight02 commented 6 months ago

woops