diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 3f3cffa..e765308 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -157,7 +157,7 @@ jobs: with: sarif_file: 'snyk.sarif' scan: - name: "Trivy" + name: "Trivy (sarif)" runs-on: ubuntu-latest needs: build permissions: @@ -187,3 +187,25 @@ jobs: uses: github/codeql-action/upload-sarif@v3 with: sarif_file: 'trivy-results.sarif' + + report: + name: "Trivy (report)" + runs-on: ubuntu-latest + needs: build + steps: + - name: Download artifact + uses: actions/download-artifact@v4 + with: + name: ${{ env.ARTIFACT_NAME }}_prod + path: /tmp/ + + - name: Load image + run: | + docker load --input /tmp/${{ env.ARTIFACT_NAME }}_prod.tar + docker image ls -a + + - name: Run Trivy vulnerability scanner + uses: aquasecurity/trivy-action@0.24.0 + with: + image-ref: ${{ env.IMAGE_NAME }}:${{ github.sha }} + format: 'table'