We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7e1da47 commit 09d9dfdCopy full SHA for 09d9dfd
1 file changed
.github/workflows/docker-security.yml
@@ -0,0 +1,30 @@
1
+name: Validate Docker Image with Trivy (docker-compose)
2
+
3
+on:
4
+ pull_request:
5
+ branches: [main]
6
+ push:
7
8
9
+jobs:
10
+ build-and-scan:
11
+ runs-on: ubuntu-latest
12
13
+ steps:
14
+ - name: 🧾 Checkout repo
15
+ uses: actions/checkout@v3
16
17
+ - name: 🐳 Set up Docker Compose
18
+ run: sudo apt-get update && sudo apt-get install -y docker-compose
19
20
+ - name: 🛠️ Build image with docker compose
21
+ run: docker compose build
22
23
+ - name: 🔍 Scan local image with Trivy
24
+ uses: aquasecurity/trivy-action@master
25
+ with:
26
+ image-ref: python-samples-fastapi-restful:latest # tu nombre de imagen real
27
+ format: table
28
+ exit-code: 1
29
+ ignore-unfixed: true
30
+ severity: CRITICAL,HIGH
0 commit comments