Skip to content

Commit a7b64ad

Browse files
committed
Scan Docker image with Trivy
1 parent 5009999 commit a7b64ad

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

.github/workflows/maven.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,15 @@ jobs:
4545
- name: Build Docker image
4646
run: docker build -f dockerfile/Dockerfile -t my-app-image:${{ github.sha }} dockerfile/
4747

48+
- name: Scan Docker image with Trivy
49+
uses: aquasecurity/trivy-action@v0.28.0
50+
with:
51+
image-ref: my-app-image:${{ github.sha }}
52+
format: table
53+
severity: CRITICAL,HIGH
54+
exit-code: 1
55+
vuln-type: os,library
56+
4857
- name: Run Docker container
4958
run: |
5059
# arranca en background y asigna nombre para poder pararlo después

0 commit comments

Comments
 (0)