Linked Questions

0 votes
1 answer
2k views

Java block Runtime.exec()? [duplicate]

I noticed that one of my clients has tried to gain shell access to one of my main servers by using Runtime.exec(). Is there a way for me to block this using Java Security Manager?
George O'Connell's user avatar
12 votes
5 answers
2k views

Imposing constraints or restrictions on method body, in Java

Context (Edit) Some clarification was on demand, so I'll try to sum up what influences the question. The goal of the project is to provide a certain functionality to programmers, most probably in ...
afsantos's user avatar
  • 5,188
7 votes
2 answers
1k views

Allowing the user a sandboxed version of a programming language

Note: I'd appreciate some tag suggestions for this one.. I'd like to provide my users with a method of programmatically manipulating data on the server. This would be done by using an in-browser ...
Nick's user avatar
  • 6,965
1 vote
1 answer
3k views

how to build an online compiler without compiling code on my own server

Part of my final project needs to build a online compiler which can be accessed by everyone. I've implemented the editor part, the main problem is in the compiler part. First I thought I can compile ...
user3794582's user avatar
0 votes
1 answer
2k views

How to sanitize user input for Java-generated code?

Having a function that generates Java code in a textual form (something similar to a template-engine, if you will), how would you sanitize user-provided fields to prevent code injection? For ...
gcandal's user avatar
  • 957
1 vote
2 answers
510 views

Executing Java byte-code in a very restricted part of a running JVM

Is there a way to run some java byte-code into a specially restricted part of a running JVM ? I'm thinking about access to very little ram (a few tens of kilobytes perhaps) and no access to the ...
gsimard's user avatar
  • 643
6 votes
2 answers
162 views

How can infinite loops be terminated in dynamically loaded classes?

I wrote a program that automatically grades programming assignments submitted from students. Reflection is used to load classes and instantiate objects. Unintentional infinite loops are a common ...
Jenks's user avatar
  • 71
4 votes
2 answers
777 views

Looking for a safe Sandbox API for JVM plugins [closed]

When you have an application server, and you want to run third-party plugins in it, you can use a restrictive Security Manager to stop them doing things like System.exit(), but that's only half the ...
Sebastien Diot's user avatar
3 votes
1 answer
287 views

Prevent imports of unauthorized classes in Scala

I'm working on an online environment that will allow users to execute custom Scala code (think of it like continuous integration). However, I want to prevent them from doing certain things, most ...
Ryan Kennedy's user avatar
  • 3,385
1 vote
1 answer
359 views

Java sandbox for running multiple JVM platform languages

I am currently evaluating the feasible of a project to build a small web application that provides a REPL programming environment similar to that of tryruby and codeacademy and have been looking at ...
Jono Brogan's user avatar
1 vote
1 answer
401 views

Best approach for dynamic class loading in java webapp?

I´m working in the design of a java web application capable of executing custom code or precompiled classes uploaded by the users, focused mostly in simple validations of datasets. The custom class ...
sergio_cv's user avatar
0 votes
1 answer
107 views

Running some java code inside its own JVM

I got a small question: (How) can I run some java code (preferable a jar) in its own JVM, in best case specifying my own libs. So for example to sandbox all file system access. What of this stuff is ...
Kilobyte's user avatar
  • 320
0 votes
0 answers
49 views

Force kill a class made by a third party within a task

Assuming a service that loads a third-party class and this class has an infinite loop, in this simplified example "a virus that consumes cpu". How to forcefully terminate the service and ...
tretonis's user avatar
0 votes
1 answer
31 views

Creating program that can run unchecked or faulty piece of code

I want to create a project in which I will face a problem: Program will run uncheck code (implementation of given interface). I suspect some of implementation will be broken, they can throw errors, ...
M314's user avatar
  • 945