Follow the CLI Scanner page to set up either the standalone binary or the Docker image of the HoundDog.ai code scanner.
Standalone Binary
Section titled “Standalone Binary”To scan a file or directory (defaults to the current directory):
hounddog scan [path] [options]To see the available command-line options:
hounddog scan --helpDocker Image
Section titled “Docker Image”To scan a directory:
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. |
Demonstration
Section titled “Demonstration”To see the privacy scanner in action, scan HoundDog.ai’s Python test repository, which contains deliberate privacy flaws:
# Clone the test repositorygit clone https://github.com/hounddogai/hounddog-test-python-app
# Scan the test repositoryhounddog scan hounddog-test-python-appUseful variations:
# Show detailed dataflow traceshounddog scan hounddog-test-python-app --trace
# Only show critical and medium severity dataflowshounddog scan hounddog-test-python-app --severity=critical,medium
# Generate a Markdown reporthounddog scan hounddog-test-python-app --output-format=markdown --output-path=report.mdTo 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:
git clone https://github.com/hounddogai/hounddog-test-monorepohounddog scan hounddog-test-monorepoAlongside 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.
Next Steps
Section titled “Next Steps”- Generate a Markdown report for a shareable point-in-time view.
- Set up an API key to upload results to the HoundDog.ai Cloud Platform.
- Explore all command-line options.
- Serve scan insights to AI coding agents with the built-in MCP server.
