Skip to content

Commit

Permalink
update Jenkinsfile
Browse files Browse the repository at this point in the history
  • Loading branch information
pcaskey committed Nov 3, 2022
1 parent dcb0c6a commit c40b5fd
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,7 @@ pipeline {
// Scan container for all vulnerability levels
echo "Scanning for all vulnerabilities..."
sh 'mkdir -p reports'
//sh 'docker pull ${maintainer}/${imagename}:${tag}'
sh 'trivy image --ignore-unfixed --vuln-type os,library --severity CRITICAL,HIGH --no-progress --security-checks vuln --format template --template \'@html.tpl\' -o reports/container-scan.html ${maintainer}/${imagename}:${tag}'
sh "trivy image --ignore-unfixed --vuln-type os,library --severity CRITICAL,HIGH --no-progress --security-checks vuln --format template --template '@html.tpl' -o reports/container-scan.html ${maintainer}/${imagename}:${tag}"
publishHTML target : [
allowMissing: true,
alwaysLinkToLastBuild: true,
Expand All @@ -118,7 +117,7 @@ pipeline {
// Scan again and fail on CRITICAL vulns
//below can be temporarily commented to prevent build from failing
echo "Scanning for CRITICAL vulnerabilities only (fatal)..."
sh 'trivy image --ignore-unfixed --vuln-type os,library --exit-code 1 --severity CRITICAL ${maintainer}/${imagename}:${tag}'
sh "trivy image --ignore-unfixed --vuln-type os,library --exit-code 1 --severity CRITICAL ${maintainer}/${imagename}:${tag}"
//echo "Skipping scan for CRITICAL vulnerabilities (temporary)..."
} catch(error) {
def error_details = readFile('./debug');
Expand Down

0 comments on commit c40b5fd

Please sign in to comment.