Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-35253

Whitelist Groovy capitalize method from String for sandbox

      I get the following error when trying to pipeline build:

      org.jenkinsci.plugins.scriptsecurity.sandbox.RejectedAccessException: Scripts not permitted to use staticMethod org.codehaus.groovy.runtime.DefaultGroovyMethods capitalize java.lang.String

      It's triggered by the code in my pipeline definition:

      def branchToBuild = "${env.JOB_NAME}".tokenize('-').last()
      def dockerTaskBranch = branchToBuild.capitalize()

      The capitalize method should be safe enough to call from the sandbox

          [JENKINS-35253] Whitelist Groovy capitalize method from String for sandbox

          Greg Pagendam-Turner created issue -
          Greg Pagendam-Turner made changes -
          Component/s New: script-security-plugin [ 18520 ]
          Component/s Original: groovy-plugin [ 15549 ]
          Jesse Glick made changes -
          Link New: This issue duplicates JENKINS-25804 [ JENKINS-25804 ]
          Jesse Glick made changes -
          Resolution New: Duplicate [ 3 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 171492 ] New: JNJira + In-Review [ 199117 ]

            vjuranek vjuranek
            netroworx Greg Pagendam-Turner
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: