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

Default security prohibits ResultAction's getResult

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • warnings-ng-plugin
    • None

      The

      post {
         always {
           dir("build") {
             script {
               def gccIssues = scanForIssues tool: gcc4(name: 'GCC')
               def action = publishIssues issues: [ gccIssues ], filters: [ excludeFile(".*[/\\\\]src[/\\\\]external.*") ]
               def result = action.getResult()
               def newSize = result.getNewSize()
               echo newSize
               echo result.getNewIssues()
            }   
          }
        }
      }
      

      fails with

      org.jenkinsci.plugins.scriptsecurity.sandbox.RejectedAccessException: Scripts not permitted to use method io.jenkins.plugins.analysis.core.model.ResultAction getResult
      at org.jenkinsci.plugins.scriptsecurity.sandbox.whitelists.StaticWhitelist.rejectMethod(StaticWhitelist.java:262)
      

      I also reported this in gitter on 20.05.2019 and was asked to create this bug report here.

            drulli Ulli Hafner
            twam Tobias Müller
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: