Skip to content

Commit 307172f

Browse files
authored
Merge pull request #1186 from jembi/PLAT-289-vulnerabilty-scan
Add docker image vulnerability scan
2 parents 16cab4e + f087227 commit 307172f

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Scan latest docker image
2+
3+
on:
4+
schedule:
5+
- cron: '0 5 * * *'
6+
7+
jobs:
8+
scan-images:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout code
12+
uses: actions/checkout@v2
13+
14+
- name: Build an image from Dockerfile
15+
run: |
16+
docker build -t jembi/openhim-core:${{ github.sha }} .
17+
18+
- name: Run trivy vulnerability scanner for the OpenHIM core image
19+
uses: aquasecurity/trivy-action@master
20+
with:
21+
image-ref: jembi/openhim-core:${{ github.sha }}
22+
format: 'sarif'
23+
output: 'trivy-results.sarif'
24+
25+
- name: Upload Trivy scan results to Github Security tab
26+
uses: github/codeql-action/upload-sarif@v2
27+
if: always()
28+
with:
29+
sarif_file: 'trivy-results.sarif'

0 commit comments

Comments
 (0)