Skip to content

Commit

Permalink
🌱 Scan image using trivy (#238)
Browse files Browse the repository at this point in the history
**What is the purpose of this pull request/Why do we need it?**

Align with internal image scanner.

**Issue #, if available:**

**Description of changes:**

**Special notes for your reviewer:**

**Checklist:**
- [ ] Documentation updated
- [ ] Unit Tests added
- [ ] E2E Tests added
- [x] Includes
[emojis](https://github.com/kubernetes-sigs/kubebuilder-release-tools?tab=readme-ov-file#kubebuilder-project-versioning)
  • Loading branch information
avorima authored and jriedel-ionos committed Jan 15, 2025
1 parent 9de503a commit 9a2dc50
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,16 @@ jobs:
uses: docker/build-push-action@v6
with:
context: .
load: ${{ github.event_name == 'pull_request' }}
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

- name: Scan image
if: github.event_name == 'pull_request'
uses: anchore/scan-action@v4
id: scan
uses: aquasecurity/trivy-action@0.29.0
with:
image: ${{ steps.meta.outputs.tags }}
add-cpes-if-none: true
output-format: table
scan-ref: ${{ steps.meta.outputs.tags }}
exit-code: '1'
ignore-unfixed: true
severity: 'HIGH,CRITICAL'

0 comments on commit 9a2dc50

Please sign in to comment.