-
Improvement
-
Resolution: Fixed
-
Major
When running a workflow in sandbox mode, if a method call is not authorized, the build log currently shows the stacktrace.
Caused by: org.jenkinsci.plugins.scriptsecurity.sandbox.RejectedAccessException: Scripts not permitted to use method java.util.Map values at org.jenkinsci.plugins.scriptsecurity.sandbox.whitelists.StaticWhitelist.rejectMethod(StaticWhitelist.java:158) at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor.onMethodCall(SandboxInterceptor.java:80) at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:149) at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:146) at com.cloudbees.groovy.cps.sandbox.SandboxInvoker.methodCall(SandboxInvoker.java:15) at Script2.getJenkinsVersion(Script2.groovy:30) at Script2.stashJenkinsWar(Script2.groovy:90) at ___cps.transform___(Native Method) at com.cloudbees.groovy.cps.impl.ContinuationGroup.methodCall(ContinuationGroup.java:55) at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.dispatchOrArg(FunctionCallBlock.java:106) at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.fixName(FunctionCallBlock.java:74) at sun.reflect.GeneratedMethodAccessor244.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at com.cloudbees.groovy.cps.impl.ContinuationPtr$ContinuationImpl.receive(ContinuationPtr.java:72) ... 22 more
It would be more useful to display a link to the script approval panel provided the user has the right permissions.
Even better, direct link to approve the particular method call.
Even even better, pause the workflow for script approval, then resume after approval or fail if denied (but here I know I'm dreaming).
- is related to
-
JENKINS-32468 Pause script on sandbox rejection and give an admin a chance to approve & resume
- Open
- relates to
-
JENKINS-34973 RejectedAccessException thrown but no pending script approval added
- Resolved
- links to