0

I would want to build a prototype app similar to like cloud9 ide. What makes it cool is that you can run server side code using it, and I thought that would be quite risky.

  1. How is this possible? Or atleast what's the concept on how c9 able to execute and create server instance

  2. Are there opensource projects that has the same feature using node.js?

2 Answers 2

1

they probably use some kind of virtualisation to run server code, that way the code is contained (you might be able to use something like LXC to achieve this).

Cloud9 is actually open source, and runs on node.js

Sign up to request clarification or add additional context in comments.

Comments

1

What @Ezequiel said, but also:

There is https://gf3.github.io/sandbox/, which spawns a new node process that executes the code in a restricted environment created with http://nodejs.org/api/vm.html.

Have a look at the source to get an idea:

  • sandbox.js spawns a new process running shovel.js and sends it code using STDIN
  • shovel.js creates a the environment to run the code

The executing process can run as a user with no rights.

ps. I'm not saying this is totally secure (vm doesn't claim to be that, see vm.runInNewContext)

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.