@@ -303,9 +303,31 @@ jobs:
303303304304 VERSION : ${{ needs.configuration.outputs.version }}
305305
306+ trivy-scan :
307+ name : " Scan Images for Vulnerabilities"
308+ needs :
309+ - configuration
310+ - build-gitpod
311+ - create-runner
312+ runs-on : ${{ needs.create-runner.outputs.label }}
313+ container :
314+ image : eu.gcr.io/gitpod-core-dev/dev/dev-environment:main-gha.30393
315+ steps :
316+ - uses : actions/checkout@v4
317+ - name : Setup Environment
318+ uses : ./.github/actions/setup-environment
319+ with :
320+ identity_provider : ${{ github.ref == 'refs/heads/main' && secrets.CORE_DEV_PROVIDER || secrets.DEV_PREVIEW_PROVIDER }}
321+ service_account : ${{ github.ref == 'refs/heads/main' && secrets.CORE_DEV_SA || secrets.DEV_PREVIEW_SA }}
322+ leeway_segment_key : ${{ secrets.LEEWAY_SEGMENT_KEY }}
323+ - name : Scan Images for Vulnerabilities
324+ shell : bash
325+ run : |
326+ ./scripts/trivy/trivy-scan-images.sh ${{ needs.configuration.outputs.version }} CRITICAL
327+
306328 install-app :
307329 runs-on : ${{ needs.create-runner.outputs.label }}
308- needs : [ configuration, build-gitpod, create-runner ]
330+ needs : [ configuration, build-gitpod, trivy-scan, create-runner ]
309331 if : ${{ needs.configuration.outputs.is_main_branch == 'true' }}
310332 strategy :
311333 fail-fast : false
@@ -343,6 +365,7 @@ jobs:
343365 - configuration
344366 - build-previewctl
345367 - build-gitpod
368+ - trivy-scan
346369 - infrastructure
347370 - create-runner
348371 runs-on : ${{ needs.create-runner.outputs.label }}
@@ -490,6 +513,7 @@ jobs:
490513 - build-previewctl
491514 - infrastructure
492515 - build-gitpod
516+ - trivy-scan
493517 - install-app
494518 - install
495519 - monitoring
0 commit comments