diff options
| author | mo khan <mo.khan@gmail.com> | 2020-10-27 15:45:26 -0600 |
|---|---|---|
| committer | mo khan <mo.khan@gmail.com> | 2020-10-27 15:45:26 -0600 |
| commit | 63eb2cf09c0e15c56433a3e150153f0cc9f30f5b (patch) | |
| tree | 65ea86baa3a15245cc22ed089edeff9c99c3fc99 /lib | |
| parent | b45dbeff17dd837936cf61c64b7e51a2eec07bb6 (diff) | |
test: scan a vulnerable webgoat image
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/e2e/docker.rb | 9 |
1 files changed, 5 insertions, 4 deletions
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 |
