@@ -303,9 +303,31 @@ jobs:
303
303
304
304
VERSION : ${{ needs.configuration.outputs.version }}
305
305
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
+
306
328
install-app :
307
329
runs-on : ${{ needs.create-runner.outputs.label }}
308
- needs : [ configuration, build-gitpod, create-runner ]
330
+ needs : [ configuration, build-gitpod, trivy-scan, create-runner ]
309
331
if : ${{ needs.configuration.outputs.is_main_branch == 'true' }}
310
332
strategy :
311
333
fail-fast : false
@@ -343,6 +365,7 @@ jobs:
343
365
- configuration
344
366
- build-previewctl
345
367
- build-gitpod
368
+ - trivy-scan
346
369
- infrastructure
347
370
- create-runner
348
371
runs-on : ${{ needs.create-runner.outputs.label }}
@@ -490,6 +513,7 @@ jobs:
490
513
- build-previewctl
491
514
- infrastructure
492
515
- build-gitpod
516
+ - trivy-scan
493
517
- install-app
494
518
- install
495
519
- monitoring
0 commit comments