Relaxing securtity vulnerability checks just a bit during the build phase.

This commit is contained in:
James Wells 2021-05-22 09:09:45 -07:00
parent 3422c03391
commit 4350db2135
Signed by: jwells
GPG key ID: 73196D10B8E65666

View file

@ -52,10 +52,10 @@ steps:
- docker buildx build --platform linux/amd64 --progress plain -t ${DRONE_REPO}:${DRONE_COMMIT} -f docker/Dockerfile .
### Run a security check and warn us about lower level vulnerabilities
- trivy image --skip-update --exit-code 0 --severity UNKNOWN,LOW,MEDIUM ${DRONE_REPO}:${DRONE_COMMIT}
- trivy image --skip-update --exit-code 0 --severity UNKNOWN,LOW,MEDIUM,HIGH ${DRONE_REPO}:${DRONE_COMMIT}
### Re-run the scan, but this time looking for higher level vulnerabilities that we want to block for.
- trivy image --skip-update --exit-code 1 --severity CRITICAL,HIGH ${DRONE_REPO}:${DRONE_COMMIT}
### Re-run the scan, but this time looking for critical vulnerabilities that we want to block for.
- trivy image --skip-update --exit-code 1 --severity CRITICAL ${DRONE_REPO}:${DRONE_COMMIT}
- name: Notify Datadog