-
Notifications
You must be signed in to change notification settings - Fork 37
43 lines (36 loc) · 1.08 KB
/
image_scan.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: Images scanner
on:
workflow_dispatch:
jobs:
images-security-scan:
name: Images Scanner
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
prj_folder: ["dvna", "vulnado"]
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
id: docker-login
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Build Docker image
id: build-image
uses: docker/build-push-action@v6
with:
context: "${{ github.workspace }}/vuln_apps/${{ matrix.prj_folder }}"
push: false
load: true
tags: ${{ matrix.prj_folder }}:latest
- name: Docker Scout CVEs
uses: docker/scout-action@v1
with:
command: cves
image: local://${{ matrix.prj_folder }}:latest
sarif-file: ${{ matrix.prj_folder }}-cves.json