vm2
vm2 copied to clipboard
contextCodeGeneration option in Node.js 10+
There's a new option since Node.js 10.x to disallow the context code generation. It's helpful since I found context code generation is so evil. I wonder if it is set to false by default or surfaced as an option in vm2?
contextCodeGeneration
strings
If set to false any calls to eval or function constructors (Function, GeneratorFunction, etc) will throw an EvalError. Default: true. wasm If set to false any attempt to compile a WebAssembly module will throw a WebAssembly.CompileError. Default: true.
https://nodejs.org/docs/latest-v10.x/api/vm.html#vm_script_runinnewcontext_sandbox_options
Thanks for bringing that to my attention, implemented in 3.8.0.