How can I disable security checks for Jenkins pipeline builds

You can solve the problem by following steps:

  1. install Permissive Script Security plugin (version 0.3 or newer)
  2. If you are using a pipeline script, make sure Use Groovy Sandbox is checked. This can be done in the configuration of the job.
  3. add permissive-script-security.enabled command line parameter to Jenkins master with value:
  • true if you want to disable the need to approve scripts, but potentially dangerous signatures will be logged:

          -Dpermissive-script-security.enabled=true
    
  • no_security if you want to disable the need to approve scripts and disable also logging of the potentially dangerous signatures:

          -Dpermissive-script-security.enabled=no_security
    

As answered above: in the newer Jenkins versions Script Security has been tightened. However for the specific use case of reading a version from Maven's pom.xml one could use readMavenPom from the Pipeline Utility Steps Plugin:

pom = readMavenPom file: 'pom.xml'
pom.version

With some other solutions in this StackOverflow question as well.


Currently it is not possible. There is an open ticket for this problem https://issues.jenkins-ci.org/browse/JENKINS-28178


Try the following jenkins plugin: https://wiki.jenkins-ci.org/display/JENKINS/Permissive+Script+Security+Plugin It disables the sandbox. Works for me.