Skip to content

Commit 1366ac1

Browse files
committed
add trivy scan to 3 module builds
1 parent d328f26 commit 1366ac1

File tree

3 files changed

+60
-0
lines changed

3 files changed

+60
-0
lines changed

.github/workflows/dev-efiling-admin-build.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,26 @@ jobs:
2727
run: |
2828
docker compose build efiling-demo
2929
docker tag jag-file-submission-efiling-demo artifacts.developer.gov.bc.ca/efc7-efiling-admin/efiling-admin:dev
30+
31+
#Run Vulnerability Scan usinig Trivy scanner
32+
- name: Run Trivy vulnerability scanner
33+
uses: aquasecurity/trivy-action@master
34+
with:
35+
scan-type: image
36+
image-ref: jag-file-submission-efiling-demo
37+
format: sarif
38+
output: trivy-results.sarif
39+
exit-code: 1
40+
ignore-unfixed: true
41+
limit-severities-for-sarif: true
42+
severity: HIGH,CRITICAL
43+
44+
#Upload results to the Github security tab.
45+
- name: Upload Trivy scan results to GitHub Security tab
46+
uses: github/codeql-action/upload-sarif@v3
47+
if: always()
48+
with:
49+
sarif_file: trivy-results.sarif
3050

3151
- name: Docker Push to Artifactory
3252
run: |

.github/workflows/dev-efiling-api-build.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,26 @@ jobs:
3131
run: |
3232
docker compose build efiling-api
3333
docker tag jag-file-submission-efiling-api artifacts.developer.gov.bc.ca/efc7-efiling-api/efiling-api:dev
34+
35+
#Run Vulnerability Scan usinig Trivy scanner
36+
- name: Run Trivy vulnerability scanner
37+
uses: aquasecurity/trivy-action@master
38+
with:
39+
scan-type: image
40+
image-ref: jag-file-submission-efiling-api
41+
format: sarif
42+
output: trivy-results.sarif
43+
exit-code: 1
44+
ignore-unfixed: true
45+
limit-severities-for-sarif: true
46+
severity: HIGH,CRITICAL
47+
48+
#Upload results to the Github security tab.
49+
- name: Upload Trivy scan results to GitHub Security tab
50+
uses: github/codeql-action/upload-sarif@v3
51+
if: always()
52+
with:
53+
sarif_file: trivy-results.sarif
3454

3555
- name: Docker Push to Artifactory
3656
run: |

.github/workflows/dev-efiling-frontend-build.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,26 @@ jobs:
2626
run: |
2727
docker compose build efiling-frontend
2828
docker tag jag-file-submission-efiling-frontend artifacts.developer.gov.bc.ca/efc7-efiling-frontend/efiling-frontend:dev
29+
30+
#Run Vulnerability Scan usinig Trivy scanner
31+
- name: Run Trivy vulnerability scanner
32+
uses: aquasecurity/trivy-action@master
33+
with:
34+
scan-type: image
35+
image-ref: jag-file-submission-efiling-frontend
36+
format: sarif
37+
output: trivy-results.sarif
38+
exit-code: 1
39+
ignore-unfixed: true
40+
limit-severities-for-sarif: true
41+
severity: HIGH,CRITICAL
42+
43+
#Upload results to the Github security tab.
44+
- name: Upload Trivy scan results to GitHub Security tab
45+
uses: github/codeql-action/upload-sarif@v3
46+
if: always()
47+
with:
48+
sarif_file: trivy-results.sarif
2949

3050
- name: Docker Push to Artifactory
3151
run: |

0 commit comments

Comments
 (0)