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

Default security prohibits ResultAction's getResult

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      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.

        Attachments

          Activity

          There are no comments yet on this issue.

            People

            • Assignee:
              drulli Ulli Hafner
              Reporter:
              twam Tobias Müller
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: