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

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Minor
    • Resolution: Duplicate
    • Component/s: script-security-plugin
    • Labels:
      None
    • Environment:
      Jenkins LTS: ver. 2.32.1
      Script Security Plugin: 1.25
    • Similar Issues:

      Description

      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.

        Attachments

          Issue Links

            Activity

            Hide
            philmcardlecg 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.

            Show
            philmcardlecg 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.
            Hide
            jglick 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.

            Show
            jglick 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.

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: