Sandbox to replace the discontinued vm2 (patriksimek/vm2#533)
a small sandbox run js in ctx, running so far so good.
Main tricks is Host-Object-Protection and Run-In-Worker-Thread.
Challenge still accepted! If you have escape case, just show me the code at the issues(#4), I'll investigate and fix ASAP.
https://github.com/wanjo-tech/vm2/blob/main/jevalx.js
https://github.com/wanjo-tech/vm2/blob/main/test.js
- I use jevalx() in my kk project
- see if worker_threads not needed (no solution yet)
- see if Proxy version better (baseline without eval())
- performance boosting
Even the codes are proven-of-concepts and running fine, we still recommend building the production and public-accessible application run inside docker with removal of danger modules such as process and fs in global scope.
Wanjo (@mgttt)
Great thanks to @j4k0xb, @XmiliaH keep sending wonderful cases