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

Scripts not permitted to use a method already approve in In-process Script Approval GUI

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      I have this error during execution of a Jenkins job with "Scan for compiler warnings" in "post build action" (two parsers are use : parser1 and parser2) :

      [WARNINGS] Parsing warnings in files 'output1' with parser parser1 [WARNINGS] Groovy sandbox rejected the parsing script for parser parser1: Scripts not permitted to use method java.util.regex.MatchResult group int. You will need to manually approve the call in the Script Approval UI. [WARNINGS] Parsing warnings in files 'output2' with parser parser2 [WARNINGS] Groovy sandbox rejected the parsing script for parser parser2: Scripts not permitted to use method java.util.regex.MatchResult group int. You will need to manually approve the call in the Script Approval UI.

      Problem, java.util.regex.MatchResult method already approve in "In-process Script Approval" Windows (in Manage Jenkins) : see picture below.

      In "Manage Jenkins" > "Configure System" > "Compiler Warnings" > "Parsers" there is no error message below parser1 and parser2... (I think about error message like "An exception occurred during evaluation of the Groovy script: Scripts not permitted to use method hudson.plugins.analysis.util.model.FileAnnotation setModuleName java.lang.String").

      Can you help me to understand what thing I have missed to make please ?

       

      Edit : as Derrick Gibelyou say (thanks for him), the problem comes from warnings-plugin version 4.62, and more precisely from commit https://github.com/jenkinsci/warnings-plugin/commit/c59dd109dab6cf3a9f28ab6b221d402726d0f4aa

       

        Attachments

          Issue Links

            Activity

            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Ulli Hafner
            Path:
            pmd.iml
            http://jenkins-ci.org/commit/pmd-plugin/ca84f389ebf92e383ccdd03cd892447409150cfb
            Log:
            JENKINS-43813 Remove dependency to script-security-plugin.

            Removed script sandbox for Groovy parsers. Now parsers can be defined
            in the global configuration by an administrator with RUN_SCRIPTS
            permission. The script itself is not checked by the sandbox anymore.

            Compare: https://github.com/jenkinsci/pmd-plugin/compare/400d6ec6f3bc...ca84f389ebf9

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Ulli Hafner Path: pmd.iml http://jenkins-ci.org/commit/pmd-plugin/ca84f389ebf92e383ccdd03cd892447409150cfb Log: JENKINS-43813 Remove dependency to script-security-plugin. Removed script sandbox for Groovy parsers. Now parsers can be defined in the global configuration by an administrator with RUN_SCRIPTS permission. The script itself is not checked by the sandbox anymore. Compare: https://github.com/jenkinsci/pmd-plugin/compare/400d6ec6f3bc...ca84f389ebf9
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Ulli Hafner
            Path:
            tasks.iml
            http://jenkins-ci.org/commit/tasks-plugin/a53f51259ea001701754bae62dbbe91666f2309b
            Log:
            JENKINS-43813 Remove dependency to script-security-plugin.

            Removed script sandbox for Groovy parsers. Now parsers can be defined
            in the global configuration by an administrator with RUN_SCRIPTS
            permission. The script itself is not checked by the sandbox anymore.

            Compare: https://github.com/jenkinsci/tasks-plugin/compare/c72d47aa9761...a53f51259ea0

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Ulli Hafner Path: tasks.iml http://jenkins-ci.org/commit/tasks-plugin/a53f51259ea001701754bae62dbbe91666f2309b Log: JENKINS-43813 Remove dependency to script-security-plugin. Removed script sandbox for Groovy parsers. Now parsers can be defined in the global configuration by an administrator with RUN_SCRIPTS permission. The script itself is not checked by the sandbox anymore. Compare: https://github.com/jenkinsci/tasks-plugin/compare/c72d47aa9761...a53f51259ea0
            Hide
            romaric Romaric CRAILOX added a comment -

            Test on a Jenkins slave, parser succefully parse job output and show me warning.

            Show
            romaric Romaric CRAILOX added a comment - Test on a Jenkins slave, parser succefully parse job output and show me warning.
            Hide
            romaric Romaric CRAILOX added a comment -

            Test on a Jenkins slave, parser succefully parse job output and show me warning.

            Test made after update warning plugin to 4.63 version.

            Thanks for your work

            Show
            romaric Romaric CRAILOX added a comment - Test on a Jenkins slave, parser succefully parse job output and show me warning. Test made after update warning plugin to 4.63 version. Thanks for your work
            Hide
            sbesson Sebastien Besson added a comment -

            We can also confirm upgrading to Warnings 4.63 fixed this issue and the job output parsing is now working as expected. Many thanks for the fix.

            Show
            sbesson Sebastien Besson added a comment - We can also confirm upgrading to Warnings 4.63 fixed this issue and the job output parsing is now working as expected. Many thanks for the fix.

              People

              • Assignee:
                drulli Ulli Hafner
                Reporter:
                romaric Romaric CRAILOX
              • Votes:
                9 Vote for this issue
                Watchers:
                16 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: