Skip to content

Commit

Permalink
ci: add trivy to CI
Browse files Browse the repository at this point in the history
  • Loading branch information
rahulguptajss committed Oct 21, 2024
1 parent 60fa831 commit c48a091
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions jenkins/artifacts/jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,20 @@ pipeline {
}
}

stage('Trivy Image Scan') {
steps {
script {
currentStage = 'Trivy Image Scan'
}
sh '''
curl -sfL https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh | sudo sh -s -- -b /usr/local/bin
export PATH=/usr/local/bin:$PATH
trivy image --exit-code 1 ${ghcrImage}:latest
trivy image --exit-code 1 ${ghcrImage}:latest-fips
'''
}
}

stage('Publish builds locally'){
steps {
script {
Expand Down

0 comments on commit c48a091

Please sign in to comment.