Skip to content

Commit c8459f0

Browse files
author
Emil Matyjaszewski
committed
Add Trivy
1 parent b6b7fa1 commit c8459f0

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

.github/workflows/sdlc-version-create.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,27 @@ jobs:
4848
-f ./docker/Dockerfile \
4949
--push \
5050
./
51+
52+
trivy:
53+
name: Check Release with Trivy
54+
runs-on: ubuntu-latest
55+
needs: [prepare-version, build-push]
56+
permissions:
57+
contents: read # for actions/checkout to fetch code
58+
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
59+
steps:
60+
- name: Checkout code
61+
uses: actions/checkout@v4
62+
63+
- name: Run Trivy vulnerability scanner
64+
uses: aquasecurity/trivy-action@0.31.0
65+
with:
66+
image-ref: ${{ vars.DOCKERHUB_ORGANIZATION }}/${{ vars.DOCKERHUB_REPOSITORY }}:${{ needs.prepare-version.outputs.version }}
67+
format: 'sarif'
68+
output: 'trivy-results.sarif'
69+
severity: 'CRITICAL,HIGH'
70+
71+
- name: Upload Trivy scan results to GitHub Security tab
72+
uses: github/codeql-action/upload-sarif@v3
73+
with:
74+
sarif_file: 'trivy-results.sarif'

0 commit comments

Comments
 (0)