diff --git a/.github/workflows/trivy.yml b/.github/workflows/trivy.yml index 92006d3f70..84373f9ba2 100644 --- a/.github/workflows/trivy.yml +++ b/.github/workflows/trivy.yml @@ -20,7 +20,7 @@ jobs: docker build --pull -t docker.io/securefederatedai/openfl:${{ github.sha }} -f openfl-docker/Dockerfile.base . - name: Run Trivy vulnerability scanner - uses: aquasecurity/trivy-action@master + uses: aquasecurity/trivy-action@0.24.0 with: image-ref: 'docker.io/securefederatedai/openfl:${{ github.sha }}' format: 'sarif' @@ -30,3 +30,17 @@ jobs: uses: github/codeql-action/upload-sarif@v2 with: sarif_file: 'trivy-results.sarif' + + - name: Run Trivy vulnerability scanner + uses: aquasecurity/trivy-action@0.24.0 + with: + image-ref: 'docker.io/securefederatedai/openfl:${{ github.sha }}' + format: 'table' + exit-code: '1' + ignore-unfixed: true + vuln-type: 'os,library' + severity: 'CRITICAL,HIGH,MEDIUM,LOW' + + - name: Log completion message + run: | + echo "Trivy scan completed. Review the output above for vulnerabilities."