File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -377,6 +377,17 @@ jobs:
377377 sbom : true
378378 provenance : true
379379
380+ - name : Build single-platform image for Trivy scan
381+ id : build-for-scan
382+ uses : docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6
383+ with :
384+ context : ${{ steps.dockerfile.outputs.dockerfile_dir }}
385+ file : ${{ steps.dockerfile.outputs.dockerfile_path }}
386+ platforms : linux/amd64
387+ load : true
388+ tags : local-scan:${{ steps.meta.outputs.server_name }}-${{ steps.meta.outputs.version }}
389+ cache-from : type=gha
390+
380391 - name : Sign container images with Cosign
381392 if : github.event_name != 'pull_request'
382393 env :
@@ -450,7 +461,7 @@ jobs:
450461 - name : Run Trivy vulnerability scanner
451462 uses : aquasecurity/trivy-action@b6643a29fecd7f34b3597bc6acb0a98b03d33ff8 # 0.33.1
452463 with :
453- image-ref : ${{ steps.meta.outputs.image_name }}: ${{ steps.meta.outputs.version }}
464+ image-ref : local-scan: ${{ steps.meta.outputs.server_name }}- ${{ steps.meta.outputs.version }}
454465 format : ' sarif'
455466 output : ' trivy-results.sarif'
456467 severity : ' CRITICAL,HIGH,MEDIUM'
You can’t perform that action at this time.
0 commit comments