Pipelineorg.jenkinsci.plugins.scriptsecurity.sandbox.RejectedAccessException: Scripts not permitted to use new java.io.File java.lang.String

Google Groups | Unknown author | 4 months ago
  1. 0

    Groovy script other script tools functions

    Google Groups | 4 months ago | Unknown author
    Pipelineorg.jenkinsci.plugins.scriptsecurity.sandbox.RejectedAccessException: Scripts not permitted to use new java.io.File java.lang.String

    Root Cause Analysis

    1. Pipelineorg.jenkinsci.plugins.scriptsecurity.sandbox.RejectedAccessException

      Scripts not permitted to use new java.io.File java.lang.String

      at org.jenkinsci.plugins.scriptsecurity.sandbox.whitelists.StaticWhitelist.rejectNew()
    2. org.jenkinsci.plugins
      SandboxInterceptor.onNewInstance
      1. org.jenkinsci.plugins.scriptsecurity.sandbox.whitelists.StaticWhitelist.rejectNew(StaticWhitelist.java:169)
      2. org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor.onNewInstance(SandboxInterceptor.java:130)
      2 frames
    3. org.kohsuke.groovy
      Checker.checkedConstructor
      1. org.kohsuke.groovy.sandbox.impl.Checker$3.call(Checker.java:191)
      2. org.kohsuke.groovy.sandbox.impl.Checker.checkedConstructor(Checker.java:188)
      2 frames
    4. com.cloudbees.groovy
      SandboxInvoker.constructorCall
      1. com.cloudbees.groovy.cps.sandbox.SandboxInvoker.constructorCall(SandboxInvoker.java:19)
      1 frame
    5. Unknown
      ___cps.transform___
      1. WorkflowScript.run(WorkflowScript:38)
      2. ___cps.transform___(Native Method)
      2 frames
    6. com.cloudbees.groovy
      FunctionCallBlock$ContinuationImpl.fixArg
      1. com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.dispatchOrArg(FunctionCallBlock.java:93)
      2. com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.fixArg(FunctionCallBlock.java:79)
      2 frames
    7. Java RT
      Method.invoke
      1. sun.reflect.GeneratedMethodAccessor239.invoke(Unknown Source)
      2. sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      3. java.lang.reflect.Method.invoke(Unknown Source)
      3 frames
    8. com.cloudbees.groovy
      FunctionCallBlock$ContinuationImpl.fixArg
      1. com.cloudbees.groovy.cps.impl.ContinuationPtr$ContinuationImpl.receive(ContinuationPtr.java:72)
      2. com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.dispatchOrArg(FunctionCallBlock.java:100)
      3. com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.fixArg(FunctionCallBlock.java:79)
      3 frames
    9. Java RT
      Method.invoke
      1. sun.reflect.GeneratedMethodAccessor239.invoke(Unknown Source)
      2. sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      3. java.lang.reflect.Method.invoke(Unknown Source)
      3 frames
    10. com.cloudbees.groovy
      FunctionCallBlock$ContinuationImpl.fixArg
      1. com.cloudbees.groovy.cps.impl.ContinuationPtr$ContinuationImpl.receive(ContinuationPtr.java:72)
      2. com.cloudbees.groovy.cps.impl.ContinuationGroup.methodCall(ContinuationGroup.java:57)
      3. com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.dispatchOrArg(FunctionCallBlock.java:106)
      4. com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.fixArg(FunctionCallBlock.java:79)
      4 frames
    11. Java RT
      Method.invoke
      1. sun.reflect.GeneratedMethodAccessor239.invoke(Unknown Source)
      2. sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      3. java.lang.reflect.Method.invoke(Unknown Source)
      3 frames
    12. com.cloudbees.groovy
      Continuable.run0
      1. com.cloudbees.groovy.cps.impl.ContinuationPtr$ContinuationImpl.receive(ContinuationPtr.java:72)
      2. com.cloudbees.groovy.cps.impl.ConstantBlock.eval(ConstantBlock.java:21)
      3. com.cloudbees.groovy.cps.Next.step(Next.java:58)
      4. com.cloudbees.groovy.cps.Continuable.run0(Continuable.java:154)
      4 frames
    13. org.jenkinsci.plugins
      CpsVmExecutorService$2.call
      1. org.jenkinsci.plugins.workflow.cps.SandboxContinuable.access$001(SandboxContinuable.java:19)
      2. org.jenkinsci.plugins.workflow.cps.SandboxContinuable$1.call(SandboxContinuable.java:33)
      3. org.jenkinsci.plugins.workflow.cps.SandboxContinuable$1.call(SandboxContinuable.java:30)
      4. org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.GroovySandbox.runInSandbox(GroovySandbox.java:108)
      5. org.jenkinsci.plugins.workflow.cps.SandboxContinuable.run0(SandboxContinuable.java:30)
      6. org.jenkinsci.plugins.workflow.cps.CpsThread.runNextChunk(CpsThread.java:164)
      7. org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.run(CpsThreadGroup.java:276)
      8. org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.access$000(CpsThreadGroup.java:78)
      9. org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:185)
      10. org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:183)
      11. org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$2.call(CpsVmExecutorService.java:47)
      11 frames
    14. Java RT
      FutureTask.run
      1. java.util.concurrent.FutureTask.run(Unknown Source)
      1 frame
    15. Hudson :: Remoting Layer
      SingleLaneExecutorService$1.run
      1. hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:112)
      1 frame
    16. jenkins.util
      ContextResettingExecutorService$1.run
      1. jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
      1 frame
    17. Java RT
      Thread.run
      1. java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
      2. java.util.concurrent.FutureTask.run(Unknown Source)
      3. java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      4. java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      5. java.lang.Thread.run(Unknown Source)
      5 frames