ci: Add CVE scan for latest release
@@ -22,3 +22,13 @@ jobs:
uses: docker://docker.io/aquasec/trivy:latest
with:
args: --cache-dir /var/lib/trivy --no-progress --exit-code 1 --severity MEDIUM,HIGH,CRITICAL ${{ steps.prerelease.outputs.image }}
+ - name: Get release tag
+ id: release
+ run: |
+ TAG=$(curl -s https://registry.hub.docker.com/v2/repositories/fluxcd/flux/tags/?page_size=1|jq -r .results[].name)
+ IMAGE="fluxcd/flux:$TAG"
+ echo "::set-output name=image::$IMAGE"
+ - name: Scan release
+ uses: docker://docker.io/aquasec/trivy:latest
+ with:
+ args: --cache-dir /var/lib/trivy --no-progress --exit-code 1 --severity MEDIUM,HIGH,CRITICAL ${{ steps.release.outputs.image }}
