Found a better way to scan the repository.

This commit is contained in:
James Wells 2021-05-22 07:08:05 -07:00
parent e44cabf408
commit 5c3c84768c
Signed by: jwells
GPG key ID: 73196D10B8E65666

View file

@ -33,9 +33,9 @@ steps:
### Perform a basic lint of the code, we do this after formatting, just in case there are edge cases with the formatting.
- go vet ./...
### Run a security check and warn us about lower level vulnerabilities
- trivy repo --exit-code 0 --severity UNKNOWN,LOW,MEDIUM ${DRONE_GIT_HTTP_URL}
- trivy fs --exit-code 0 --severity UNKNOWN,LOW,MEDIUM .
### Re-run the scan, but this time looking for higher level vulnerabilities that we want to block for.
- trivy repo --skip-update --exit-code 1 --severity CRITICAL,HIGH ${DRONE_GIT_HTTP_URL}
- trivy fs --skip-update --exit-code 1 --severity CRITICAL,HIGH .
### Perform unit tests
# - @TODO I really don't know how to do unit tests. Will need to figure this out eventually.