Skip to content

Commit 5391da8

Browse files
authored
Scan container images with Trivy (#368)
1 parent 6a6309c commit 5391da8

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

.github/workflows/container-image.yaml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,17 @@ jobs:
4747
uses: docker/build-push-action@v6
4848
with:
4949
context: .
50+
load: ${{ github.event_name == 'pull_request' }}
5051
push: ${{ github.event_name != 'pull_request' }}
5152
tags: ${{ steps.meta.outputs.tags }}
5253
labels: ${{ steps.meta.outputs.labels }}
5354

5455
- name: Scan image
5556
if: github.event_name == 'pull_request'
56-
uses: anchore/scan-action@v5
57+
uses: aquasecurity/trivy-action@0.29.0
5758
id: scan
5859
with:
59-
image: ${{ steps.meta.outputs.tags }}
60-
add-cpes-if-none: true
61-
output-format: table
60+
scan-ref: ${{ steps.meta.outputs.tags }}
61+
exit-code: '1'
62+
ignore-unfixed: true
63+
severity: 'HIGH,CRITICAL'

0 commit comments

Comments
 (0)