tc39 / proposal-shadowrealm

ECMAScript Proposal, specs, and reference implementation for Realms
https://tc39.es/proposal-shadowrealm/
1.43k stars 67 forks source link

Feature Enabling #404

Open Autumnlight02 opened 5 months ago

Autumnlight02 commented 5 months ago

I may have missed it, but is there a possibility to enable and disable specific features when creating these sandboxes? As an example, could an additional option for the web platform be provided so that when you run user script you can prevent access to the network etc.

mhofman commented 5 months ago

Every global is configurable in shadow realm so you can remove most network access or other capabilities, except for network through dynamic import, which is an undeniable capability available through syntax. The web platform CSP rules do apply inside ShadowRealm