-
Notifications
You must be signed in to change notification settings - Fork 1
116 lines (101 loc) · 4.44 KB
/
trivy-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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
name: "DIAM Vulnerability Scan- Trivy"
on:
schedule:
# Runs every week at 01:00 Sunday Morning.
- cron: '0 1 * * 0'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Login to Openshift Docker Registry Gold
uses: docker/login-action@v1
with:
registry: image-registry.apps.gold.devops.gov.bc.ca
username: ${{ secrets.OC_USERNAME }}
password: ${{ secrets.OC_PASSWORD_VAULT_SA }}
- name: Pull WebApi image
run: |
docker pull image-registry.apps.gold.devops.gov.bc.ca/${{ secrets.LICENSE_PLATE }}-tools/pidp-webapi:develop
docker tag image-registry.apps.gold.devops.gov.bc.ca/${{ secrets.LICENSE_PLATE }}-tools/pidp-webapi:develop pidp-webapi:dev
#Run Vulnerability Scan usinig Trivy scanner
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@master
with:
image-ref: pidp-webapi:dev
scan-type: image
format: 'table'
ignore-unfixed: true
limit-severities-for-sarif: true
severity: HIGH,CRITICAL
- name: Pull Frontend image
run: |
docker pull image-registry.apps.gold.devops.gov.bc.ca/${{ secrets.LICENSE_PLATE }}-tools/pidp-frontend:develop
docker tag image-registry.apps.gold.devops.gov.bc.ca/${{ secrets.LICENSE_PLATE }}-tools/pidp-frontend:develop pidp-frontend:dev
#Run Vulnerability Scan usinig Trivy scanner
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@master
with:
image-ref: pidp-frontend:dev
scan-type: image
format: 'table'
ignore-unfixed: true
limit-severities-for-sarif: true
severity: HIGH,CRITICAL
- name: Pull EDT Case Management image
run: |
docker pull image-registry.apps.gold.devops.gov.bc.ca/${{ secrets.LICENSE_PLATE }}-tools/edt-casemgmt:develop
docker tag image-registry.apps.gold.devops.gov.bc.ca/${{ secrets.LICENSE_PLATE }}-tools/edt-casemgmt:develop edt-casemgmt:dev
#Run Vulnerability Scan usinig Trivy scanner
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@master
with:
image-ref: edt-casemgmt:dev
scan-type: image
format: 'table'
ignore-unfixed: true
limit-severities-for-sarif: true
severity: HIGH,CRITICAL
- name: Pull JUM Notification image
run: |
docker pull image-registry.apps.gold.devops.gov.bc.ca/${{ secrets.LICENSE_PLATE }}-tools/jum-notification:develop
docker tag image-registry.apps.gold.devops.gov.bc.ca/${{ secrets.LICENSE_PLATE }}-tools/jum-notification:develop jum-notification:dev
#Run Vulnerability Scan usinig Trivy scanner
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@master
with:
image-ref: jum-notification:dev
scan-type: image
format: 'table'
ignore-unfixed: true
limit-severities-for-sarif: true
severity: HIGH,CRITICAL
- name: Pull EDT Disclosure image
run: |
docker pull image-registry.apps.gold.devops.gov.bc.ca/${{ secrets.LICENSE_PLATE }}-tools/edt-disclosure:develop
docker tag image-registry.apps.gold.devops.gov.bc.ca/${{ secrets.LICENSE_PLATE }}-tools/edt-disclosure:develop edt-disclosure:dev
#Run Vulnerability Scan usinig Trivy scanner
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@master
with:
image-ref: edt-disclosure:dev
scan-type: image
format: 'table'
ignore-unfixed: true
limit-severities-for-sarif: true
severity: HIGH,CRITICAL
- name: Pull EDT Service image
run: |
docker pull image-registry.apps.gold.devops.gov.bc.ca/${{ secrets.LICENSE_PLATE }}-tools/edt-service:develop
docker tag image-registry.apps.gold.devops.gov.bc.ca/${{ secrets.LICENSE_PLATE }}-tools/edt-service:develop edt-service:dev
#Run Vulnerability Scan usinig Trivy scanner
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@master
with:
image-ref: edt-service:dev
scan-type: image
format: 'table'
ignore-unfixed: true
limit-severities-for-sarif: true
severity: HIGH,CRITICAL