-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (43 loc) · 1.35 KB
/
docker-scan.yaml
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
44
45
46
47
48
49
50
51
# name: Scan Docker Image
# on:
# workflow_dispatch:
# env:
# DOCKER_IMAGE: docker-operator
# BIN_NAME: docker-operator
# jobs:
# release-docker-hub:
# runs-on: ubuntu-latest
# steps:
# - name: Docker image metadata
# id: meta
# uses: docker/metadata-action@v4
# with:
# images: ${{ env.DOCKER_IMAGE }}
# tags: |
# type=sha,format=long
# - name: Set up QEMU
# uses: docker/setup-qemu-action@v2
# with:
# platforms: amd64
# - name: Set up Docker Buildx
# uses: docker/setup-buildx-action@v2
# - name: Build and load Docker image
# uses: docker/build-push-action@v3
# with:
# platforms: linux/amd64
# push: false
# load: true
# tags: ${{ steps.meta.outputs.tags }}
# - name: Run Trivy vulnerability scanner
# uses: aquasecurity/trivy-action@master
# with:
# scan-type: image
# format: sarif
# image-ref: ${{ steps.meta.outputs.tags }}
# output: 'trivy-results.sarif'
# exit-code: '1'
# - name: Upload Trivy scan results to GitHub Security tab
# uses: github/codeql-action/upload-sarif@v2
# with:
# category: 'Trivy Security Scan'
# sarif_file: 'trivy-results.sarif'