-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CONFIG] [Gihub Actions] Docker analisys with Trivy: new secondary "t…
…able" output.
- Loading branch information
Gonzalo Diaz
committed
Jul 20, 2024
1 parent
b1695d5
commit 71cc75c
Showing
1 changed file
with
23 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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/[email protected] | ||
with: | ||
image-ref: ${{ env.IMAGE_NAME }}:${{ github.sha }} | ||
format: 'table' |