From 63eb2cf09c0e15c56433a3e150153f0cc9f30f5b Mon Sep 17 00:00:00 2001 From: mo khan Date: Tue, 27 Oct 2020 15:45:26 -0600 Subject: test: scan a vulnerable webgoat image --- lib/e2e/docker.rb | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'lib/e2e/docker.rb') diff --git a/lib/e2e/docker.rb b/lib/e2e/docker.rb index 121e47b..f8347e9 100644 --- a/lib/e2e/docker.rb +++ b/lib/e2e/docker.rb @@ -24,13 +24,14 @@ class Docker Dir.chdir pwd do arguments = [ :docker, :run, '--rm', + "--add-host=clair-vulnerabilities-db:127.0.0.1", + "--add-host=maven.test:127.0.0.1", + "--network=host", "--volume=#{project_path}:/tmp/app", - '--add-host=clair-vulnerabilities-db:127.0.0.1', - '--add-host=maven.test:127.0.0.1', - '--network=host', + "--workdir=/tmp/app", env_options ] - arguments.push(debug ? ["-it", "--entrypoint=''", image, '/bin/bash -l'] : [image, '/analyzer run']) + arguments.push(debug ? ["-it", "--entrypoint=''", image, '/bin/sh'] : [image, '/analyzer run']) command = expand(arguments) system(command, exception: true) end -- cgit v1.2.3