java.security.manager raises it’s ugly head

I’ve ran into another small set back. This time it’s called the java.security.manager.

Compare the following results:

java -DTAINT_LOGGING=true -DTHROW_EXCEPTION=true -Djava.security.manager=jarjar.org.gradle.process.internal.child.BootstrapSecurityManager -Xbootclasspath/p:build/distributions/SecuRT-1.0-shadow.jar -Dfile.encoding=UTF-8 -ea -cp ~/.gradle/caches/1.10/workerMain/gradle-worker.jar org.owasp.securt.StandaloneTest

Error occurred during initialization of VM
java.lang.InternalError: Could not create SecurityManager: jarjar.org.gradle.process.internal.child.BootstrapSecurityManager
at sun.misc.Launcher.(Launcher.java:106)
at sun.misc.Launcher.(Launcher.java:57)
at java.lang.ClassLoader.initSystemClassLoader(ClassLoader.java:1489)
at java.lang.ClassLoader.getSystemClassLoader(ClassLoader.java:1474)


and (what I want to happen):

java -DTAINT_LOGGING=true -DTHROW_EXCEPTION=true -Xbootclasspath/p:build/distributions/SecuRT-1.0-shadow.jar -Dfile.encoding=UTF-8 -ea -cp ~/.gradle/caches/1.10/workerMain/gradle-worker.jar org.owasp.securt.StandaloneTest

Exception in thread "main" org.owasp.securt.TaintException: Taint detected
at org.owasp.securt.AbstractTaintUtil.markTaint(AbstractTaintUtil.java:46)
at org.owasp.securt.TaintUtil.checkTaint(TaintUtil.java)
at java.io.PrintStream.print(PrintStream.java)
at java.io.PrintStream.println(PrintStream.java:806)
at org.owasp.securt.StandaloneTest.main(StandaloneTest.java:27)

Unfortunately the firsts result happens when you try to run your tests from Gradle. In other words, I have to investigate the relationship between the security.manager and the bootstrapclassloader. Maybe tomorrow will shed some light on a solution.
By the looks of it, I’m not the only one with this problem.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s