Make VM sandboxing optional
See original GitHub issueI know this may be controversial, but considering that VM may not be foolproof, perhaps an option to not use VM may be useful? E.g., if the host app only allows running vetted plugins.
VM causes issues with plugins intended to run in window context. I have troubles accessing setTimeout
, Blob
and other native window features. Also it breaks React’s useEffect
, although that can be worked around by passing the plugin useEffect
implementation from the host (so far I can’t find workarounds for native window features).
(Context: I’m working on a project that uses plugins in Electron, and plugins provide both components that run in Node context and components that run in browser window context.)
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
How to use Windows Sandbox - a lightweight virtual machine
In this step-by-step tutorial, learn how to use Windows 10 Sandbox. Windows Sandbox provides a lightweight desktop environment to safely run ...
Read more >How to use the Windows 11 Sandbox as a virtual machine
Open File Explorer to the Windows\System 32 path. Scroll down until you see the WindowsSandbox.exe file. You can then create a shortcut from...
Read more >Windows Sandbox
Enable virtualization on the machine. ... Use the search bar on the task bar and type Turn Windows Features on or off to...
Read more >Windows Sandbox Tutorial – How to Enable ...
Windows Sandbox is a temporary lightweight desktop environment that ... You have to make sure that you already have enabled virtualization.
Read more >How to enable Windows Sandbox in VMware Workstation
Instead, you need to enable another option in VMware Workstation that is responsible for creating a nested virtual machine or Windows Sandbox.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I should withdraw this request, as no-VM loading of trusted code is actually straightforward to do per my previous comment. Plugin manager is still handy for installing plugins from NPM and running plugin’s Node (main thread) code within VM sandbox.
I think by running VM-loaded module in browser context I was stretching what VM was intended to do, and passing native window functions to VM sandbox would not be possible any time soon. Considering plugin code is trusted, plain
require()
may be the way to go in browser context. Conveniently, PluginManager’sgetInfo()?.location
can be used to construct the path to require. Thanks for this useful package!