File tree 1 file changed +49
-0
lines changed
1 file changed +49
-0
lines changed Original file line number Diff line number Diff line change @@ -406,3 +406,52 @@ jobs:
406
406
with :
407
407
name : release-images
408
408
path : ./release-images
409
+
410
+ trivy-scan :
411
+ runs-on : ubuntu-20.04
412
+ needs : package-linux-amd64
413
+
414
+ steps :
415
+ - name : Checkout code
416
+ uses : actions/checkout@v2
417
+
418
+ - name : Download release package
419
+ uses : actions/download-artifact@v2
420
+ with :
421
+ name : release-packages
422
+ path : ./release-packages
423
+
424
+ - name : Build Docker image
425
+ run : ./ci/steps/build-docker-image.sh
426
+
427
+ - name : Run Trivy vulnerability scanner in repo mode
428
+ uses : aquasecurity/trivy-action@master
429
+ with :
430
+ scan-type : " fs"
431
+ scan-ref : " ."
432
+ ignore-unfixed : true
433
+ format : " template"
434
+ template : " @/contrib/sarif.tpl"
435
+ output : " trivy-repo-results.sarif"
436
+ severity : " CRITICAL"
437
+
438
+ - name : Run Trivy vulnerability scanner in image mode
439
+ uses : aquasecurity/trivy-action@master
440
+ with :
441
+ image-ref : " codercom/code-server:${{ github.sha }}"
442
+ scan-type : " image"
443
+ ignore-unfixed : true
444
+ format : " template"
445
+ template : " @/contrib/sarif.tpl"
446
+ output : " trivy-image-results.sarif"
447
+ severity : " CRITICAL"
448
+
449
+ - name : Upload Trivy scan results to GitHub Security tab
450
+ uses : github/codeql-action/upload-sarif@v1
451
+ with :
452
+ sarif_file : " trivy-repo-results.sarif"
453
+
454
+ - name : Upload Trivy scan results to GitHub Security tab
455
+ uses : github/codeql-action/upload-sarif@v1
456
+ with :
457
+ sarif_file : " trivy-image-results.sarif"
You can’t perform that action at this time.
0 commit comments