Scoutsuite: Docker no longer supports running from host

Created on 16 Oct 2020  路  10Comments  路  Source: nccgroup/ScoutSuite

Describe the bug

Until recently, you could run docker build scoutsuite:latest in the root of the repository, then run docker run -t --rm scoutsuite:latests scout -h to execute scout suite and, with the right environment variables and volumes mounted get the results back on your local machine.

However, now, this is no longer possible.

To Reproduce

> docker run --rm -t rossja/ncc-scoutsuite scout
docker: Error response from daemon: OCI runtime create failed: container_linux.go:349: starting container process caused "exec: \"scout\": executable file not found in $PATH": unknown.

Additional context

My host OS is Mac OS

It would be really nice to return to a state where scout suite can be executed from the command line without having to have an interactive connection with scoutsuite.

Before, I was able to run scoutsuite as an automated CI task, but the recent docker changes have hosed my automation and I'm trying to figure out how to get back to a working state.

bug duplicate

All 10 comments

Looks like a duplicate of https://github.com/nccgroup/ScoutSuite/issues/882.

Should be fixed in https://github.com/nccgroup/ScoutSuite/pull/890, will be released next week. Appreciate if you can test.

This is still broken, I'm using docker compose from on master:

> docker run -it scoutsuite scout
docker: Error response from daemon: OCI runtime create failed: container_linux.go:349: starting container process caused "exec: \"scout\": executable file not found in $PATH": unknown.

@rossja could you please confirm?

This looks like a blend of:

  1. we moved the docker stuff out of the root of the repo, and
  2. the python venv for scoutsuite in the container isn't getting set up when running commands directly via docker run

To fix:

  1. there's no longer a Dockerfile in the root of this repo, which is why docker build at the repo level fails. The docker stuff has moved to the docker directory. To re-integrate with CI, clone the repo, cd $repo/docker, edit (or provide) the config/build.env vars as needed and then do either of:
    a. run docker-compose up --build, or
    b. run docker build -t scoutsuite:latest .
    (incidental note: realigned the directory structure to support both of those options more smoothly, see PR 925
  2. See comment below

Further testing shows that running the scout command directly from outside of the container doesn't work. So, for example:

docker run -it scoutsuite:latest scout -h : fails
docker run -it scoutsuite:latest bash -c scout -h : fails
docker run -it scoutsuite:latest bash : followed immediately by scout -h in the running container: works

There's some nuance to docker there that I'm not fully grasping, where the python venv isn't getting set up when you run the first two commands. That can be worked around by running: docker run -it scoutsuite:latest /root/scoutsuite/bin/scout -h

Thanks @rossja, this is now merged into develop.

@j4v where was this resolved? Is there a commit or a PR link?

I can confirm on develop that docker run -it scoutsuite:latest /root/scoutsuite/bin/scout -h works. Is this path guaranteed to be fixed moving forward? docker run -it scoutsuite:latest scout -hstill does not work, so if I'm going to move forward with the absolute path, I'd hope the path won't change.

That path has not changed since the initial version was pushed to rossja/ncc-scoutsuite. I can't guarantee that it never will, but there are no plans to move it, and I see no reason it should change.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Dziubey picture Dziubey  路  5Comments

thommor picture thommor  路  6Comments

kreatemore picture kreatemore  路  5Comments

x4v13r64 picture x4v13r64  路  7Comments

zymergen-vdc picture zymergen-vdc  路  6Comments