mirror of
https://github.com/aquasecurity/trivy-action.git
synced 2026-05-14 03:02:40 +00:00
feat(image): add --docker-host option for GH Action users (#267)
* add option to update docker-host via cli parameter * chore: update test results --------- Co-authored-by: simar7 <1254783+simar7@users.noreply.github.com>
This commit is contained in:
@@ -82,6 +82,14 @@ bats_load_library bats-file
|
||||
assert_files_equal yamlconfig.test ./test/data/yamlconfig.test
|
||||
}
|
||||
|
||||
@test "trivy image with custom docker-host" {
|
||||
# trivy image --docker-host unix:///var/run/docker.sock --severity CRITICAL --output image.test knqyf263/vuln-image:1.2.3
|
||||
run ./entrypoint.sh '-y unix:///var/run/docker.sock' '-a image' '-i knqyf263/vuln-image:1.2.3' '-h image.test' '-g CRITICAL'
|
||||
run diff image.test ./test/data/image.test
|
||||
echo "$output"
|
||||
assert_files_equal image.test ./test/data/image.test
|
||||
}
|
||||
|
||||
@test "trivy config with terraform variables" {
|
||||
# trivy config --format json --severity MEDIUM --output tfvars.test --tf-vars ./test/data/dev.tfvars ./test/data
|
||||
run ./entrypoint.sh "-a config" "-j ./test/data" "-h tfvars.test" "-g MEDIUM" "-x dev.tfvars" "-b json"
|
||||
|
||||
Reference in New Issue
Block a user