Skip to content

Commit

Permalink
Revert "Include args when using trivy config file (#231)"
Browse files Browse the repository at this point in the history
Fixes: #238

This reverts commit 82ec0dd.
  • Loading branch information
simar7 committed Jun 9, 2023
1 parent 0cd397a commit 41f05d9
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 12 deletions.
2 changes: 1 addition & 1 deletion entrypoint.sh
Expand Up @@ -180,7 +180,7 @@ if [ "${format}" == "sarif" ] && [ "${limitSeveritiesForSARIF}" != "true" ]; the
trivy --quiet ${scanType} --format sarif --output ${output} $SARIF_ARGS ${artifactRef}
elif [ $trivyConfig ]; then
echo "Running Trivy with trivy.yaml config from: " $trivyConfig
trivy --config $trivyConfig ${ARGS} ${scanType} ${artifactRef}
trivy --config $trivyConfig ${scanType} ${artifactRef}
returnCode=$?
else
echo "Running trivy with options: trivy ${scanType} ${ARGS}" "${artifactRef}"
Expand Down
3 changes: 0 additions & 3 deletions test/data/trivy-reduced.yaml

This file was deleted.

8 changes: 0 additions & 8 deletions test/test.bats
Expand Up @@ -81,11 +81,3 @@ bats_load_library bats-file
echo "$output"
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
}

0 comments on commit 41f05d9

Please sign in to comment.