Skip to content

Commit a24d2ba

Browse files
Merge pull request #123 from keitaroinc/security_ci
added scans for datapusher and psql-init
2 parents 51e70c5 + 1be892c commit a24d2ba

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

.github/workflows/trivy_scan.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,55 @@ jobs:
123123
format: 'sarif'
124124
output: 'trivy-results.sarif'
125125

126+
- name: Upload Trivy scan results to GitHub Security tab
127+
uses: github/codeql-action/upload-sarif@v2
128+
with:
129+
sarif_file: 'trivy-results.sarif'
130+
131+
scan_psql_init:
132+
name: scan_psql_init
133+
runs-on: ubuntu-20.04
134+
steps:
135+
136+
- name: Checkout code
137+
uses: actions/checkout@v3
138+
139+
- name: Build an image from Dockerfile
140+
run: |
141+
docker build -t keitaro/psql-init:${{ github.sha }} -f ./images/psql-init/Dockerfile ./images/psql-init/
142+
143+
- name: Run Trivy vulnerability scanner
144+
uses: aquasecurity/trivy-action@master
145+
with:
146+
image-ref: 'keitaro/psql-init:${{ github.sha }}'
147+
format: 'sarif'
148+
output: 'trivy-results.sarif'
149+
150+
- name: Upload Trivy scan results to GitHub Security tab
151+
uses: github/codeql-action/upload-sarif@v2
152+
with:
153+
sarif_file: 'trivy-results.sarif'
154+
155+
156+
scan_datapusher:
157+
name: scan_datapusher
158+
runs-on: ubuntu-20.04
159+
steps:
160+
161+
- name: Checkout code
162+
uses: actions/checkout@v3
163+
164+
- name: Build an image from Dockerfile
165+
run: |
166+
docker build -t keitaro/datapusher:${{ github.sha }} -f ./images/datapusher/Dockerfile ./images/datapusher/
167+
168+
- name: Run Trivy vulnerability scanner
169+
uses: aquasecurity/trivy-action@master
170+
with:
171+
image-ref: 'keitaro/datapusher:${{ github.sha }}'
172+
format: 'sarif'
173+
output: 'trivy-results.sarif'
174+
126175
- name: Upload Trivy scan results to GitHub Security tab
127176
uses: github/codeql-action/upload-sarif@v2
128177
with:

0 commit comments

Comments
 (0)