Skip to content

Commit

Permalink
Try to increase trivy scanning speed
Browse files Browse the repository at this point in the history
  • Loading branch information
schnatterer committed Jan 18, 2023
1 parent 1f197de commit 06ef921
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,9 @@ private void trivy(output, flags, imageName) {
.mountJenkinsUser()
.mountDockerSocket()
.inside("-v ${env.WORKSPACE}/.trivy/.cache:/root/.cache/") {
// Updating DB might take longer than the default 5 min
sh "trivy image --timeout 20m -o ${output} ${flags} ${imageName}"
// Scanning occasionally take longer than the default 5 min, increase timeout
// "If your scanning is slow, please try '--security-checks vuln' to disable secret scanning"
sh "trivy image --security-checks vul --timeout 30m -o ${output} ${flags} ${imageName}"
}
}

Expand Down

0 comments on commit 06ef921

Please sign in to comment.