Imported from DataDog/datadog-static-analyzer (
AGENTS.md). Install upstream withnpx skills add DataDog/datadog-static-analyzer. Copyright stays with the author.
Overview
This project is Datadog's static analyzer and secret detection tool, used to find code patterns, detect violations, and identify secrets.
The static code analysis part relies heavily on tree-sitter.
Secret detection relies on Datadog SDS.
Code Structure
crates/bincontains all the binariescrates/clicontains all code for the command-line features (creating CSV, manipulating files, etc)crates/commoncontains all code common to the CLI and the servercrates/secretscontains the code specific to the secrets scanning productcrates/static-analysis-kernelcontains the code specific to the static analyzercrates/static-analysis-servercontains the code specific to the static analyzer server (used in IDE)
Testing
- NEVER write table tests.
- Always run tests (e.g.
cargo test) - Always run the format checker
cargo fmt -- --check - Always run clippy
cargo clippy -- -D warnings
How to release a new version?
Invoke the script ./misc/release.sh