File tree Expand file tree Collapse file tree 2 files changed +24
-11
lines changed
Expand file tree Collapse file tree 2 files changed +24
-11
lines changed Original file line number Diff line number Diff line change 101101 required : false
102102 type : boolean
103103 default : true
104+ trivy-fail-on-high-critical :
105+ description : ' Fail pipeline if Trivy finds HIGH or CRITICAL vulnerabilities'
106+ required : false
107+ type : boolean
108+ default : true
104109
105110 build :
106111 description : ' CI Build (language-specific)'
@@ -715,6 +720,7 @@ jobs:
715720 needs : checkout
716721 with :
717722 version : ${{ inputs.version }}
723+ fail-on-high-critical : ${{ inputs.trivy-fail-on-high-critical }}
718724
719725 # run-srcclr:
720726 # if: ${{ inputs.perform-srcclr-scan == true }}
Original file line number Diff line number Diff line change 1515 required : false
1616 type : string
1717 default : ' 1.0.0'
18+ fail-on-high-critical :
19+ description : ' Fail the build if HIGH or CRITICAL vulnerabilities are found'
20+ required : false
21+ type : boolean
22+ default : true
1823
1924jobs :
2025 trivy :
@@ -67,14 +72,16 @@ jobs:
6772 # name: trivy-report-${{ github.event.repository.name }}-${{ github.ref_name }}-${{ inputs.version }}-$(date +'%Y%m%d')-text
6873 path : trivy-report.txt
6974 retention-days : 30
70- # - name: Fail build on High/Criticial Vulnerabilities
71- # uses: aquasecurity/trivy-action@master
72- # with:
73- # scan-type: "fs"
74- # format: table
75- # scan-ref: .
76- # severity: HIGH,CRITICAL
77- # ignore-unfixed: true
78- # exit-code: 1
79- # # On a subsequent call to the action we know trivy is already installed so can skip this
80- # skip-setup-trivy: true
75+
76+ - name : Fail build on High/Critical Vulnerabilities
77+ if : ${{ inputs.fail-on-high-critical }}
78+ uses : aquasecurity/trivy-action@master
79+ with :
80+ scan-type : " fs"
81+ format : table
82+ scan-ref : .
83+ severity : HIGH,CRITICAL
84+ ignore-unfixed : true
85+ exit-code : 1
86+ # On a subsequent call to the action we know trivy is already installed so can skip this
87+ skip-setup-trivy : true
You can’t perform that action at this time.
0 commit comments