Skip to content

Commit 8e78834

Browse files
committed
feat trivy
1 parent 9b9e4eb commit 8e78834

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

.github/workflows/docker-app.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,17 @@ jobs:
3030
push: false # apenas build local
3131
tags: getting-started:latest
3232

33+
# 🧰 Trivy roda logo após o build
34+
- name: Run Trivy scan before push
35+
uses: aquasecurity/trivy-action@0.28.0
36+
with:
37+
image-ref: getting-started:latest
38+
format: 'table'
39+
vuln-type: 'os,library'
40+
severity: 'CRITICAL,HIGH'
41+
ignore-unfixed: true
42+
exit-code: '1' # falha se encontrar vulnerabilidades críticas
43+
3344
- name: Run container and test health
3445
run: |
3546
docker run -d -p 3000:3000 --name app getting-started

0 commit comments

Comments
 (0)