Skip to content

Commit 41f05d9

Browse files
committed
Revert "Include args when using trivy config file (#231)"
Fixes: #238 This reverts commit 82ec0dd.
1 parent 0cd397a commit 41f05d9

File tree

3 files changed

+1
-12
lines changed

3 files changed

+1
-12
lines changed

Diff for: entrypoint.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ if [ "${format}" == "sarif" ] && [ "${limitSeveritiesForSARIF}" != "true" ]; the
180180
trivy --quiet ${scanType} --format sarif --output ${output} $SARIF_ARGS ${artifactRef}
181181
elif [ $trivyConfig ]; then
182182
echo "Running Trivy with trivy.yaml config from: " $trivyConfig
183-
trivy --config $trivyConfig ${ARGS} ${scanType} ${artifactRef}
183+
trivy --config $trivyConfig ${scanType} ${artifactRef}
184184
returnCode=$?
185185
else
186186
echo "Running trivy with options: trivy ${scanType} ${ARGS}" "${artifactRef}"

Diff for: test/data/trivy-reduced.yaml

-3
This file was deleted.

Diff for: test/test.bats

-8
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,3 @@ bats_load_library bats-file
8181
echo "$output"
8282
assert_files_equal yamlconfig.test ./test/data/yamlconfig.test
8383
}
84-
85-
@test "trivy image with trivy.yaml config and args" {
86-
# trivy --config=./test/data/trivy-reduced.yaml image alpine:3.10
87-
run ./entrypoint.sh "-v ./test/data/trivy-reduced.yaml" "-a image" "-i alpine:3.10" "-b json" "-g CRITICAL"
88-
run diff yamlconfig.test ./test/data/yamlconfig.test
89-
echo "$output"
90-
assert_files_equal yamlconfig.test ./test/data/yamlconfig.test
91-
}

0 commit comments

Comments
 (0)