isolated-vm
isolated-vm copied to clipboard
Secure & isolated JS environments for nodejs
Running this ```javascript let ivm = require('isolated-vm'); let isolate = new ivm.Isolate({ memoryLimit: 128 }); let context = isolate.createContextSync(); isolate.compileScriptSync(`[...'.'.repeat(1e9)]; undefined`).runSync(context); console.log('this is never printed'); ``` Gives you ``` [10166:0x5601c5f1fc10]...
Perhaps related to #274. ```javascript const ivm = require("isolated-vm"); const isolate = new ivm.Isolate(); const script = isolate.compileScriptSync('console.log("buh")'); const context = isolate.createContextSync(); context.evalClosureSync( ` globalThis.console = { log: function(...args) {...
## Shortest repro ```typescript const ivm = require('isolated-vm'); const isolate = new ivm.Isolate(); const context = isolate.createContextSync(); const global = context.global; global.setSync(`_ivm`, ivm); (async function() { global.setSync('proxiedFoo', () => {},...
Currently, when a Promise is still running in a script, it will end without waiting for them to finish. Is there a way to wait for all promises to finish...
mimium => minimun
Windows 10 Node v16.10.0 isolated-vm v4.3.5 When compiling and executing this code ```js while (true) {} ``` `onCatastrophicError` gets triggered when timeout is hit in run options  heres the...
Hi again! Thank you for the amazing module! We are running into an issue that creates dangling node.js processes. Here's how I can reproduce it in a simple example: I...
``` npm install npm test ``` then all test cases get the same error: ``` exception-info.js: *fail* code: null signal: SIGABRT stderr: node: ../src/lib/suspend.h:32: ivm::thread_suspend_handle::initialize::initialize(): Assertion `sigaction(SIGRTMIN, &handler, nullptr) ==...
require('isolated-vm') throws an error Reproduce: - unzip the example.zip [example.zip](https://github.com/laverdet/isolated-vm/files/7084207/example.zip) - run npm install in the root folder - run npm install in the subfolder called `folder` - go to...
Thanks for this great library! Please consider adding dynamic `import()` support. ```js const something = await import('something'); ``` P.S. I would love to create PR for this feature instead of...