File tree Expand file tree Collapse file tree 1 file changed +12
-28
lines changed Expand file tree Collapse file tree 1 file changed +12
-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,17 @@ 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 : Trivy
182+ run : |
183+ echo "${{ env.TRIVY_DB_REPOSITORY }}"
184+
185+ - name : Run Trivy vulnerability scanner (cli report)
186+ uses :
aquasecurity/[email protected] 187+ with :
188+ image-ref : ${{ env.IMAGE_NAME }}:${{ github.sha }}
189+ format : ' table'
190+
191+ - name : Run Trivy vulnerability scanner (sarif report)
182192 uses :
aquasecurity/[email protected] 183193 with :
184194 image-ref : ${{ env.IMAGE_NAME }}:${{ github.sha }}
@@ -189,29 +199,3 @@ jobs:
189199 uses : github/codeql-action/upload-sarif@v3
190200 with :
191201 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