File tree Expand file tree Collapse file tree 1 file changed +8
-28
lines changed Expand file tree Collapse file tree 1 file changed +8
-28
lines changed Original file line number Diff line number Diff line change @@ -159,7 +159,7 @@ jobs:
159159 with :
160160 sarif_file : ' snyk.sarif'
161161 scan :
162- name : " Trivy (sarif) "
162+ name : " Trivy"
163163 runs-on : ubuntu-latest
164164 needs : build
165165 permissions :
@@ -178,7 +178,13 @@ jobs:
178178 docker load --input /tmp/${{ env.ARTIFACT_NAME }}_prod.tar
179179 docker image ls -a
180180
181- - name : Run Trivy vulnerability scanner
181+ - name : Run Trivy vulnerability scanner (cli report)
182+ uses :
aquasecurity/[email protected] 183+ with :
184+ image-ref : ${{ env.IMAGE_NAME }}:${{ github.sha }}
185+ format : ' table'
186+
187+ - name : Run Trivy vulnerability scanner (sarif report)
182188 uses :
aquasecurity/[email protected] 183189 with :
184190 image-ref : ${{ env.IMAGE_NAME }}:${{ github.sha }}
@@ -189,29 +195,3 @@ jobs:
189195 uses : github/codeql-action/upload-sarif@v3
190196 with :
191197 sarif_file : ' trivy-results.sarif'
192- env :
193- ACTIONS_RUNTIME_TOKEN : ${{ secrets.GITHUB_TOKEN }}
194-
195- report :
196- name : " Trivy (report)"
197- runs-on : ubuntu-latest
198- needs : build
199- steps :
200- - name : Download artifact
201- uses : actions/download-artifact@v4
202- with :
203- name : ${{ env.ARTIFACT_NAME }}_prod
204- path : /tmp/
205-
206- - name : Load image
207- run : |
208- docker load --input /tmp/${{ env.ARTIFACT_NAME }}_prod.tar
209- docker image ls -a
210-
211- - name : Run Trivy vulnerability scanner
212- uses :
aquasecurity/[email protected] 213- with :
214- image-ref : ${{ env.IMAGE_NAME }}:${{ github.sha }}
215- format : ' table'
216- env :
217- ACTIONS_RUNTIME_TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments