Skip to content

Jenkins

Integration with Jenkins

You can add the following stage to your Jenkinsfile (declarative syntax) for a very basic integrations.

stages {
    stage('ShiftLeft Scan') {
        agent {
            docker { image 'shiftleft/sast-scan' }
        }
        steps {
            sh 'scan'
        }
    }
}

For Java and JVM based projects, compile the project before invoking the scan.

stages {
    stage('ShiftLeft Scan') {
        agent {
            docker { image 'shiftleft/sast-scan' }
        }
        steps {
            sh 'scan --build'
        }
    }
}

We also recommend archiving artifacts generated by the scan for easy viewing using the archiveArtifacts step.


Last update: May 6, 2020