I'm planning a service that will require allowing users to run arbitrary JVM code on a server. I'm planning to sandbox the code, but I know that the JVM has traditionally had security holes, which is why I want to explore other avenues.
There are already services such as Travis CI which allow anyone to run any code on their servers by checking it into GitHub.
How can a service like this ensure that someone isn't taking advantage of their servers to launch an attack or other malicious behavior?