Skip to content

Commit

Permalink
fix(ch07s11): Checking a deternimistic security vulnerability (#52)
Browse files Browse the repository at this point in the history
  • Loading branch information
psolarvi authored Jul 20, 2021
1 parent 5b29944 commit 4634eec
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion calculator-monolith/kubefiles/security-scan-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ objects:
- >-
cd /tmp &&
curl -sL https://github.com/aquasecurity/trivy/releases/download/v${TRIVY_RELEASE}/trivy_${TRIVY_RELEASE}_Linux-64bit.tar.gz -o - | tar -zxf - &&
./trivy fs --cache-dir /tmp/.cache --exit-code 1 --severity HIGH,CRITICAL --no-progress --ignore-unfixed /
{ ./trivy fs --cache-dir /tmp/.cache --severity HIGH,CRITICAL --no-progress --ignore-unfixed / | grep ${CVE_CODE} ;
./trivy fs --cache-dir /tmp/.cache --severity HIGH,CRITICAL --no-progress --ignore-unfixed / | grep ${CVE_CODE} | wc -l | xargs -I % sh -c 'test % -eq 0' ; }
restartPolicy: Never

parameters:
Expand All @@ -42,3 +43,7 @@ parameters:
description: "Trivy Release Version"
required: false
value: "0.14.0"
- name: CVE_CODE
description: "CVE Code"
required: false
value: "CVE-2021-23840"

0 comments on commit 4634eec

Please sign in to comment.