11# Copyright (C) 2024 Intel Corporation
22# SPDX-License-Identifier: Apache-2.0
33
4- name : Manual Image BoM and CVE Scan
4+ name : Manual - Docker Scan (SBOM and CVE)
55on :
66 workflow_dispatch :
77 inputs :
@@ -36,13 +36,12 @@ jobs:
3636 sudo rm -rf ${{github.workspace}}/* || true
3737 # docker system prune -f
3838
39- scan -docker :
39+ manual -docker-scan :
4040 needs : clean-workspace
4141 runs-on : " docker-build-${{ inputs.node }}"
4242 strategy :
4343 matrix :
44- # image: ["studio-frontend", "studio-backend", "app-frontend", "app-backend"]
45- image : ["app-backend"]
44+ image : ["studio-frontend", "studio-backend", "app-frontend", "app-backend"]
4645 fail-fast : false
4746 steps :
4847 - name : Pull Image
@@ -58,17 +57,17 @@ jobs:
5857 output-file : ${{ matrix.image }}-sbom-scan.txt
5958 format : ' spdx-json'
6059
61- # - name: Security Scan Container
62- # uses: aquasecurity/[email protected] 63- # if: ${{ inputs.trivy_scan }}
64- # with:
65- # image-ref: ${{ env.OPEA_IMAGE_REPO }}opea/${{ matrix.image }}:${{ inputs.tag }}
66- # output: ${{ matrix.image }}-trivy-scan.txt
67- # format: 'table'
68- # exit-code: '1'
69- # ignore-unfixed: true
70- # vuln-type: 'os,library'
71- # severity: 'CRITICAL,HIGH'
60+ - name : Security Scan Container
61+ uses :
aquasecurity/[email protected] 62+ if : ${{ inputs.trivy_scan }}
63+ with :
64+ image-ref : ${{ env.OPEA_IMAGE_REPO }}opea/${{ matrix.image }}:${{ inputs.tag }}
65+ output : ${{ matrix.image }}-trivy-scan.txt
66+ format : ' table'
67+ exit-code : ' 1'
68+ ignore-unfixed : true
69+ vuln-type : ' os,library'
70+ severity : ' CRITICAL,HIGH'
7271
7372 - name : Cleanup
7473 if : always()
8180 mv ${{ matrix.image }}-*-scan.txt /tmp/scan-${{ inputs.tag }}-${{ github.run_number }}
8281
8382 upload-artifacts :
84- needs : scan -docker
83+ needs : manual -docker-scan
8584 runs-on : " docker-build-${{ inputs.node }}"
8685 if : always()
8786 steps :
0 commit comments