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).

          [JENKINS-33614] Link to script approval from build console

          Vincent Latombe created issue -

          Jesse Glick added a comment -

          resume after approval

          I would love to do this, but am not sure how.

          Jesse Glick added a comment - resume after approval I would love to do this, but am not sure how.
          Patrick Wolf made changes -
          Labels New: followup
          Jesse Glick made changes -
          Epic Link New: JENKINS-35391 [ 171184 ]
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 169573 ] New: JNJira + In-Review [ 183549 ]
          Andrew Bayer made changes -
          Component/s New: pipeline-general [ 21692 ]
          Andrew Bayer made changes -
          Component/s Original: workflow-plugin [ 18820 ]
          Jesse Glick made changes -
          Component/s New: workflow-cps-plugin [ 21713 ]
          Component/s Original: pipeline [ 21692 ]
          Jesse Glick made changes -
          Link New: This issue is related to JENKINS-32468 [ JENKINS-32468 ]
          Andrew Bayer made changes -
          Assignee Original: Jesse Glick [ jglick ] New: Andrew Bayer [ abayer ]

            abayer Andrew Bayer
            vlatombe Vincent Latombe
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: