Skip to content

Commit cb625a1

Browse files
author
Gonzalo Diaz
committed
[CONFIG] [Gihub Actions] Docker analisys with Trivy: enable sarif output
1 parent 7f79f0b commit cb625a1

File tree

1 file changed

+7
-19
lines changed

1 file changed

+7
-19
lines changed

.github/workflows/docker-image.yml

Lines changed: 7 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,6 @@ jobs:
2020
steps:
2121
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
2222

23-
# - name: Build the Docker image
24-
# run: make compose/rebuild
25-
# - name: Image List
26-
# run: docker image ls -a
27-
# - name: Lint in Docker image
28-
# run: make compose/lint
29-
# - name: Test in Docker image
30-
# run: make compose/test
31-
# - name: Run in Docker image
32-
# run: make compose/run
33-
3423
- name: Set up Docker Buildx
3524
uses: docker/setup-buildx-action@v3
3625

@@ -116,7 +105,7 @@ jobs:
116105
docker load --input /tmp/${{ env.ARTIFACT_NAME }}_test.tar
117106
docker image ls -a
118107
119-
- name: Run lint
108+
- name: Run test
120109
run: |
121110
docker run --rm ${{ env.IMAGE_NAME }}:test make test
122111
@@ -173,15 +162,14 @@ jobs:
173162
uses: aquasecurity/[email protected]
174163
with:
175164
image-ref: ${{ env.IMAGE_NAME }}:${{ github.sha }}
176-
format: 'table'
165+
format: 'sarif'
166+
output: 'trivy-results.sarif'
177167
exit-code: '1'
178168
ignore-unfixed: true
179169
vuln-type: 'os,library'
180170
severity: 'CRITICAL,HIGH'
181171

182-
# yamllint disable rule:comments-indentation
183-
# - name: Upload Trivy scan results to GitHub Security tab
184-
# uses: github/codeql-action/upload-sarif@v2
185-
# with:
186-
# sarif_file: 'trivy-results.sarif'
187-
# yamllint enable rule:comments-indentation
172+
- name: Upload Trivy scan results to GitHub Security tab
173+
uses: github/codeql-action/upload-sarif@v2
174+
with:
175+
sarif_file: 'trivy-results.sarif'

0 commit comments

Comments
 (0)