Skip to content

Commit 83a7677

Browse files
author
Issam Kadar
committed
chore/security : add image scanning on release
1 parent 2b0da57 commit 83a7677

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

.github/workflows/release.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,3 +79,19 @@ jobs:
7979
platforms: linux/amd64
8080
tags: ghcr.io/${{ github.repository_owner }}/hub-converter:${{ steps.extract_info.outputs.version }}
8181
context: ./converter
82+
83+
- name: Run Trivy vulnerability scanner on converter image
84+
if: steps.extract_info.outputs.project == 'converter'
85+
uses: aquasecurity/trivy-action@0.33.1
86+
with:
87+
image-ref: ghcr.io/${{ github.repository_owner }}/hub-converter:${{ steps.extract_info.outputs.version }}
88+
format: sarif
89+
output: trivy-image-results.sarif
90+
severity: 'CRITICAL,HIGH,MEDIUM'
91+
92+
- name: Upload Trivy image scan results to GitHub Security tab
93+
if: steps.extract_info.outputs.project == 'converter'
94+
uses: github/codeql-action/upload-sarif@v3
95+
with:
96+
sarif_file: trivy-image-results.sarif
97+
category: trivy-converter-image

0 commit comments

Comments
 (0)