Skip to content

Commit 7b1cbe3

Browse files
committed
ci: add trivy container vulnerability scanning pre-merge
Signed-off-by: jay7tech <jayadeepgowda24@gmail.com>
1 parent 6b4d10c commit 7b1cbe3

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

.github/workflows/build-test.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,16 @@ jobs:
338338
cd ${{ matrix.component.path }}
339339
BUILD_CONFIG=${{ matrix.variant.build_config }} DOCKERX_OPTS="--output type=docker,dest=${{ github.workspace }}/${{ matrix.component.name }}-${{ matrix.variant.name }}.tar --cache-to type=local,dest=/tmp/.buildx-cache,mode=max --cache-from type=local,src=/tmp/.buildx-cache" make
340340
341+
- name: Run Trivy vulnerability scanner
342+
uses: aquasecurity/trivy-action@master
343+
with:
344+
input: ${{ github.workspace }}/${{ matrix.component.name }}-${{ matrix.variant.name }}.tar
345+
format: 'table'
346+
exit-code: '1'
347+
ignore-unfixed: true
348+
vuln-type: 'os,library'
349+
severity: 'CRITICAL,HIGH'
350+
341351
- name: Upload artifact
342352
uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4.3.6
343353
with:

0 commit comments

Comments
 (0)