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

Scripts not permitted to use staticMethod org.codehaus.groovy.runtime.DefaultGroovyMethods count java.lang.String java.lang.String and no option to whitelist

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Minor Minor
    • script-security-plugin
    • None
    • Jenkins LTS: ver. 2.32.1
      Script Security Plugin: 1.25

      Scripts not permitted to use staticMethod org.codehaus.groovy.runtime.DefaultGroovyMethods count java.lang.String java.lang.String

      Similar to JENKINS-35199, I have no option to whitelist this method on the script approvals page.

          [JENKINS-41571] Scripts not permitted to use staticMethod org.codehaus.groovy.runtime.DefaultGroovyMethods count java.lang.String java.lang.String and no option to whitelist

          Phil McArdle added a comment -

          I've found out, sort of, why the method doesn't show on the scriptApproval page.

          In my original job, the method call is nested deep within methods within a method adapted to a closure and ran from within parallel. I don't know exactly which part of that causes the problem, but, if I try the method from a vanilla pipeline job, I get a prompt on scriptApproval and the approval works everywhere.

          Phil McArdle added a comment - I've found out, sort of, why the method doesn't show on the scriptApproval page. In my original job, the method call is nested deep within methods within a method adapted to a closure and ran from within parallel. I don't know exactly which part of that causes the problem, but, if I try the method from a vanilla pipeline job, I get a prompt on scriptApproval and the approval works everywhere.

          Jesse Glick added a comment -

          Latter part probably a duplicate. For simple missing entries in the default whitelist I do not bother with JIRA—just file PRs.

          Jesse Glick added a comment - Latter part probably a duplicate. For simple missing entries in the default whitelist I do not bother with JIRA—just file PRs.

            Unassigned Unassigned
            philmcardlecg Phil McArdle
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: