-
Notifications
You must be signed in to change notification settings - Fork 9
41 lines (41 loc) · 1.34 KB
/
security-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
name: security-scan
on:
push:
branches:
- master
pull_request:
jobs:
build:
name: Security scan
runs-on: ubuntu-24.04
env:
CONTAINER_TAG: ${{ github.sha }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Build an image from Dockerfile
run: make docker-build-all
- name: Build an image from Dockerfile
run: podman image ls
- name: Run Trivy vulnerability scanner for controlplane
uses: aquasecurity/trivy-action@0.30.0
with:
image-ref: 'quay.io/edge-infrastructure/cluster-api-controlplane-provider-openshift-assisted:${{ github.sha }}'
format: 'sarif'
ignore-unfixed: true
vuln-type: 'os,library'
severity: 'CRITICAL,HIGH'
- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v3
if: always()
with:
sarif_file: 'trivy-results.sarif'
- name: Run Trivy vulnerability scanner for bootstrap
uses: aquasecurity/trivy-action@0.28.0
with:
image-ref: 'quay.io/edge-infrastructure/cluster-api-bootstrap-provider-openshift-assisted:${{ github.sha }}'
format: 'table'
exit-code: '1'
ignore-unfixed: true
vuln-type: 'os,library'
severity: 'CRITICAL,HIGH'