Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,6 @@ jobs:
name: Trivy scan image for vulnerabilities
needs: files_changed
if: |
github.event_name == 'pull_request' &&
needs.files_changed.outputs.trivyscan == 'true'
uses: ./.github/workflows/trivyscan.yml
secrets: inherit
8 changes: 5 additions & 3 deletions .github/workflows/trivyscan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ jobs:
run: sudo guestmount -a /mnt/images/${{ steps.manifest.outputs.image-name }}.qcow2 -i --ro -o allow_other './${{ steps.manifest.outputs.image-name }}'

- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@0.24.0
uses: aquasecurity/trivy-action@v0.33.1
with:
scan-type: fs
scan-ref: "${{ steps.manifest.outputs.image-name }}"
Expand All @@ -116,13 +116,13 @@ jobs:
TRIVY_DB_REPOSITORY: ghcr.io/azimuth-cloud/trivy-db:2

- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v3
uses: github/codeql-action/upload-sarif@v4
with:
sarif_file: "${{ steps.manifest.outputs.image-name }}.sarif"
category: "${{ matrix.build }}"

- name: Fail if scan has CRITICAL vulnerabilities
uses: aquasecurity/trivy-action@0.24.0
uses: aquasecurity/trivy-action@v0.33.1
with:
scan-type: fs
scan-ref: "${{ steps.manifest.outputs.image-name }}"
Expand All @@ -132,6 +132,8 @@ jobs:
severity: 'CRITICAL'
ignore-unfixed: true
timeout: 15m
# On a subsequent call to the action we know trivy is already installed so can skip this
skip-setup-trivy: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TRIVY_DB_REPOSITORY: ghcr.io/azimuth-cloud/trivy-db:2
Loading