Running node inside a chroot

613 views
Skip to first unread message

Alfredo64

unread,
Mar 15, 2012, 12:19:18 PM3/15/12
to nod...@googlegroups.com
Hello, i'm making a node.js public sandbox, something like codepad for Javascript. I'm running a VM with debian and i call node via ssh sendind the script to be ran. The problems i'm having is that i've tried the Sandbox module, but it doesn't allow for node modules or functions. I want to whitelist modules and add custom ones. What i plan to do is scan the user script for "requires( something) " and only allow the whitelisted modules.
Can someone hint me on the chrooting of this? Will it be enough?
Thanks

Jann Horn

unread,
Mar 15, 2012, 1:30:58 PM3/15/12
to nod...@googlegroups.com

Use real sandboxing (outside of node).

signature.asc

Alfredo64

unread,
Mar 15, 2012, 2:23:36 PM3/15/12
to nod...@googlegroups.com
What do you mean?

Jann Horn

unread,
Mar 15, 2012, 5:16:21 PM3/15/12
to nod...@googlegroups.com
Am Donnerstag, den 15.03.2012, 11:23 -0700 schrieb Alfredo64:
> What do you mean?

Make an OS-level sandbox per user. Put node installations in the
sandboxes.

signature.asc
Reply all
Reply to author
Forward
0 new messages