Compare commits

...
1 Commits
3 changed files with 1 additions and 12 deletions
+1 -1
View File
@@ -180,7 +180,7 @@ if [ "${format}" == "sarif" ] && [ "${limitSeveritiesForSARIF}" != "true" ]; the
trivy --quiet ${scanType} --format sarif --output ${output} $SARIF_ARGS ${artifactRef} trivy --quiet ${scanType} --format sarif --output ${output} $SARIF_ARGS ${artifactRef}
elif [ $trivyConfig ]; then elif [ $trivyConfig ]; then
echo "Running Trivy with trivy.yaml config from: " $trivyConfig echo "Running Trivy with trivy.yaml config from: " $trivyConfig
trivy --config $trivyConfig ${ARGS} ${scanType} ${artifactRef} trivy --config $trivyConfig ${scanType} ${artifactRef}
returnCode=$? returnCode=$?
else else
echo "Running trivy with options: trivy ${scanType} ${ARGS}" "${artifactRef}" echo "Running trivy with options: trivy ${scanType} ${ARGS}" "${artifactRef}"
-3
View File
@@ -1,3 +0,0 @@
vulnerability:
type: os
output: yamlconfig.test
-8
View File
@@ -81,11 +81,3 @@ bats_load_library bats-file
echo "$output" echo "$output"
assert_files_equal yamlconfig.test ./test/data/yamlconfig.test assert_files_equal yamlconfig.test ./test/data/yamlconfig.test
} }
@test "trivy image with trivy.yaml config and args" {
# trivy --config=./test/data/trivy-reduced.yaml image alpine:3.10
run ./entrypoint.sh "-v ./test/data/trivy-reduced.yaml" "-a image" "-i alpine:3.10" "-b json" "-g CRITICAL"
run diff yamlconfig.test ./test/data/yamlconfig.test
echo "$output"
assert_files_equal yamlconfig.test ./test/data/yamlconfig.test
}