datadog-static-analyzer
is available for use in a Docker container. The
container is published to the GHCR registry.
- Docker
- An x86_64 or arm64 machine
First, pull the container image:
docker pull ghcr.io/datadog/datadog-static-analyzer:latest
Then, run the container to verify that it works:
docker run ghcr.io/datadog/datadog-static-analyzer:latest --help
The container can be run in the same way as the binary. For example, to
run the analyzer on a directory stored at $PATH_TO_ANALYZE
:
docker run -v $PATH_TO_ANALYZE:/data ghcr.io/datadog/datadog-static-analyzer:latest -i /data -o /data/output.sarif -b -f sarif
The datadog-ci
tool is also available in the container, and can be used to
upload your results to the Datadog app. To use it, run the container with the
datadog-ci
command by overriding the entrypoint:
docker run --entrypoint datadog-ci ghcr.io/datadog/datadog-static-analyzer:latest --help
To build the container from source, clone the repository and run the following:
docker build -t datadog-static-analyzer .
Then, run the locally-built container:
docker run datadog-static-analyzer --help
If you are interested in pinning the container to a specific version, each release
is tagged with the version name as well. For example, to use version 0.3.5
:
docker pull ghcr.io/datadog/datadog-static-analyzer:0.3.5
If you encounter any issues, please open an issue here.