Skip to content

Follow the CLI Scanner page to set up either the standalone binary or the Docker image of the HoundDog.ai code scanner.

To scan a file or directory (defaults to the current directory):

bash
hounddog scan [path] [options]

To see the available command-line options:

bash
hounddog scan --help

To scan a directory:

bash
docker run --pull=always -it --rm -v /path/to/repo:/data hounddogai/hounddog hounddog scan [options]

Let’s break down the command above:

Argument / Option Required Description
docker run Yes Start a new Docker container.
--pull=always No Always pull the latest version of the Docker image.
-it No Create an interactive session and attach a pseudo-TTY to enable colored output and proper rendering for your terminal size. Important: in a non-interactive environment (for example, build pipelines), use only the -t flag.
--rm No Clean up the container after it exits.
-v /path/to/repo:/data Yes Mount the host directory into the container’s /data directory, the default scan path inside the HoundDog.ai Docker image.
hounddogai/hounddog Yes Name of the HoundDog.ai scanner image, hosted on Docker Hub.
hounddog scan Yes The scan command, which scans the code mounted at /data.

To see the privacy scanner in action, scan HoundDog.ai’s Python test repository, which contains deliberate privacy flaws:

bash
# Clone the test repository
git clone https://github.com/hounddogai/hounddog-test-python-app
# Scan the test repository
hounddog scan hounddog-test-python-app

Useful variations:

bash
# Show detailed dataflow traces
hounddog scan hounddog-test-python-app --trace
# Only show critical and medium severity dataflows
hounddog scan hounddog-test-python-app --severity=critical,medium
# Generate a Markdown report
hounddog scan hounddog-test-python-app --output-format=markdown --output-path=report.md

To see the API and service context across a polyglot codebase, scan the monorepo test repository, which spans gRPC and Thrift services in Python, TypeScript, C#, Java, and Go:

bash
git clone https://github.com/hounddogai/hounddog-test-monorepo
hounddog scan hounddog-test-monorepo

Alongside the dataflow results, the scan prints a service catalog for each protocol, resolving every service, its method definitions, and the servers and clients that implement and consume it.