newrelic / rusty-hog

A suite of secret scanners built in Rust for performance. Based on TruffleHog (https://github.com/dxa4481/truffleHog) which is written in Python.
Apache License 2.0
453 stars 59 forks source link

Add a Dockerfile to build and run the rusty-hog scanners #5

Closed ccojocar closed 4 years ago

ccojocar commented 4 years ago

@cutler-scott-newrelic It would be great if you could have a look also over this Dockerfile. Thanks!

ccojocar commented 4 years ago
  1. This is right, the openssl library is dynamically loaded therefore it doesn't need to be added to the build container.

  2. I made the hog binary configurable in the docker image entry point. Unfortunately it requires a custom entrypoint script in order to achieve this, but now it can be built for various hogs as follows:

    docker build -t rusty-hog --build-arg HOG=berkshire .

Does these address your concerns?

ccojocar commented 4 years ago

The image can be run with this command:

docker run -it --rm rusty-hog --help

it should print the helper of the hog used as an entry point, something like:

+ /usr/local/bin/berkshire_hog --help
berkshire_hog 1.0.4
Scott Cutler <scutler@newrelic.com>
S3 secret hunter in Rust. Avoid bandwidth costs, run this within a VPC!

USAGE:
    berkshire_hog [FLAGS] [OPTIONS] <S3URI> <S3REGION>

....
cutler-scott-newrelic commented 4 years ago

That works for me. I'll review and merge it around 11am my time in Portland OR.

On Thu, May 7, 2020, 3:44 AM Cosmin Cojocar notifications@github.com wrote:

The image can be run with this command:

docker run -it --rm rusty-hog --help

it should print the helper of the hog used as an entry point, something like:

  • /usr/local/bin/berkshire_hog --help berkshire_hog 1.0.4 Scott Cutler scutler@newrelic.com S3 secret hunter in Rust. Avoid bandwidth costs, run this within a VPC!

USAGE: berkshire_hog [FLAGS] [OPTIONS]

....

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/newrelic/rusty-hog/pull/5#issuecomment-625176545, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALKCTQI77JRQYQFFLF7KNVDRQKGIDANCNFSM4MTUOUBQ .

ccojocar commented 4 years ago

Thanks! No rush.