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

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • warnings-plugin
    • None

      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 derrickgw 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

       

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

          Code changed in jenkins
          User: Ulli Hafner
          Path:
          analysis-collector.iml
          http://jenkins-ci.org/commit/analysis-collector-plugin/3bda19546d1bd91c34a529fe32d6cfeecf0c5328
          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.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Ulli Hafner Path: analysis-collector.iml http://jenkins-ci.org/commit/analysis-collector-plugin/3bda19546d1bd91c34a529fe32d6cfeecf0c5328 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.

          Code changed in jenkins
          User: Ulli Hafner
          Path:
          analysis-test.iml
          http://jenkins-ci.org/commit/analysis-test-plugin/df226e2772ffd2609b50b3b206ce4b364af6dcda
          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/analysis-test-plugin/compare/3d724417d5f4...df226e2772ff

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Ulli Hafner Path: analysis-test.iml http://jenkins-ci.org/commit/analysis-test-plugin/df226e2772ffd2609b50b3b206ce4b364af6dcda 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/analysis-test-plugin/compare/3d724417d5f4...df226e2772ff

          Code changed in jenkins
          User: Ulli Hafner
          Path:
          dry.iml
          http://jenkins-ci.org/commit/dry-plugin/1b776025338103f333ebab7e26c9074fcdfc20d2
          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/dry-plugin/compare/bf8516dddf91...1b7760253381

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Ulli Hafner Path: dry.iml http://jenkins-ci.org/commit/dry-plugin/1b776025338103f333ebab7e26c9074fcdfc20d2 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/dry-plugin/compare/bf8516dddf91...1b7760253381

          Code changed in jenkins
          User: Ulli Hafner
          Path:
          checkstyle.iml
          http://jenkins-ci.org/commit/checkstyle-plugin/5dfec3459cc769e953544a861efc2a74fe5ffbf8
          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/checkstyle-plugin/compare/9275147718b4...5dfec3459cc7

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Ulli Hafner Path: checkstyle.iml http://jenkins-ci.org/commit/checkstyle-plugin/5dfec3459cc769e953544a861efc2a74fe5ffbf8 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/checkstyle-plugin/compare/9275147718b4...5dfec3459cc7

          Code changed in jenkins
          User: Ulli Hafner
          Path:
          plugin/findbugs.iml
          http://jenkins-ci.org/commit/findbugs-plugin/83152fec086ab0e8538cf3f2f6f30f5111d0ba1c
          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/findbugs-plugin/compare/627268976d3e...83152fec086a

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Ulli Hafner Path: plugin/findbugs.iml http://jenkins-ci.org/commit/findbugs-plugin/83152fec086ab0e8538cf3f2f6f30f5111d0ba1c 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/findbugs-plugin/compare/627268976d3e...83152fec086a

          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

          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

          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

          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

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

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

          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

          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

          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.

          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.

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

              Created:
              Updated:
              Resolved: