The previously implemented script security sandbox protections prohibiting the use of unsafe AST transforming annotations such as @Grab (2019-01-08 fix for SECURITY-1266) could be circumvented through use of various Groovy language features: * Use of AnnotationCollector * Import aliasing * Referencing annotation types using their full class name This allowed users with Overall/Read permission, or the ability to control Jenkinsfile or sandboxed Pipeline shared library contents in SCM, to bypass the sandbox protection and execute arbitrary code on the Jenkins master. Using AnnotationCollector is now newly prohibited in sandboxed scripts such as Pipelines. Importing any of the annotations considered unsafe will now result in an error. During the compilation phase, both simple and full class names of prohibited annotations are rejected for element annotations.
External References: https://jenkins.io/security/advisory/2019-02-19/#SECURITY-1320
Created jenkins-script-security-plugin tracking bugs for this issue: Affects: fedora-all [bug 1684557]
Upstream Patch: https://github.com/jenkinsci/script-security-plugin/commit/3228c88e
Statement: This flaw affects the jenkins-2-plugins RPM which is installed in the openshift3/jenkins-2-rhel7 container image. Security updates for this image are only released for versions 3.11 and 4.x of OpenShift Container Platform. The 3.11 version of the openshift3/jenkins-2-rhel7 container image is supported for use with previous versions of OpenShift Container Platform up to 3.4. For more information, refer to the OpenShift Jenkins README: https://github.com/openshift/jenkins/blob/master/README.md#jenkins-security-advisories-the-master-image-from-this-repository-and-the-oc-binary
This issue has been addressed in the following products: Red Hat OpenShift Container Platform 3.11 Via RHSA-2019:0739 https://access.redhat.com/errata/RHSA-2019:0739