I am trying to add Dependency Check into my JenkinsFile without success.
Plugins Installation and configuration done.
Global Tool Configuration
Name : Vulnerability5
Install automatically (checked)
Version : dependency-check 5.2.4
pipeline {
agent any
tools {
nodejs "node8"
dependency-check "vulnerability5"
}
stages {
stage('Install Deps') {
steps {
//Install dependecies
sh 'yarn install'
}
}
stage('Dependency Check') {
steps {
// Run OWASP Dependency Check
dependencyCheck additionalArguments: '-f "HTML, XML,CSV" -s .'
}
}
}
}
adding the dependency check in tools is breaking the pipeline file. Any Idea of what I am missing?
I use instruction like this and it works fine:
stages {
stage ('OWASP Dependency-Check Vulnerabilities') {
steps {
dependencyCheck additionalArguments: '''
-o "./"
-s "./"
-f "ALL"
--prettyPrint''', odcInstallation: 'OWASP-DC'
dependencyCheckPublisher pattern: 'dependency-check-report.xml'
}
}
}
odcInstallation: 'OWASP-DC' is preinstalled and configured plugin OWASP dependency check on my Jenkins
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With