Skip to content

Commit 153ea03

Browse files
committed
chore: add trivy as a second security scanner
Closes #393 Signed-off-by: Jonathan Gonzalez V <jonathan.gonzalez@enterprisedb.com>
1 parent 167acba commit 153ea03

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

.github/actions/security-scans/action.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,27 @@ runs:
6262
if: ${{ steps.snyk.outcome == 'success' }}
6363
with:
6464
sarif_file: snyk.sarif
65+
66+
- name: Run Trivy vulnerability scanner
67+
uses: aquasecurity/trivy-action@0.33.1
68+
id: trivy
69+
continue-on-error: true
70+
with:
71+
image-ref: '${{ inputs.image }}'
72+
format: 'sarif'
73+
output: 'trivy-results.sarif'
74+
75+
- name: Upload Trivy scan results to GitHub Security tab
76+
uses: github/codeql-action/upload-sarif@v4
77+
if: ${{ steps.trivy.outcome == 'success' }}
78+
with:
79+
sarif_file: 'trivy-results.sarif'
80+
81+
- name: Review Security checks
82+
if: |
83+
steps.snyk.outcome != 'success' &&
84+
steps.trivy.outcome != 'success'
85+
shell: bash
86+
run: |
87+
echo "Snyk or Trivy check failed"
88+
exit 1

0 commit comments

Comments
 (0)