We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4f1db93 commit 87f756aCopy full SHA for 87f756a
.github/workflows/scan-docker-images.yml
@@ -0,0 +1,29 @@
1
+name: Scan Docker Images
2
+
3
+on:
4
+ push:
5
+ branches:
6
+ - main
7
+ pull_request: null
8
9
+jobs:
10
+ scan-images:
11
+ name: Scan Docker Images for Vulnerabilities
12
+ runs-on: ubuntu-latest
13
14
+ steps:
15
+ - name: Checkout code
16
+ uses: actions/checkout@v3
17
18
+ - name: Build an image from Dockerfile
19
+ run: docker build -t docker.io/my-organization/my-app:${{ github.sha }} .
20
21
+ - name: Run Trivy vulnerability scanner
22
+ uses: aquasecurity/[email protected]
23
+ with:
24
+ image-ref: "docker.io/my-organization/my-app:${{ github.sha }}"
25
+ format: "table"
26
+ exit-code: "1"
27
+ ignore-unfixed: true
28
+ vuln-type: "os,library"
29
+ severity: "CRITICAL,HIGH"
0 commit comments