Traverse is a Rust tool to analyze CosmWasm code and extract useful information.
Please audit and test before using, this is a work in progress and hacked togeter quickly to get some initial results. Lacking proper error handing, tests, and edge case handling.
- Scope local or remote cosmwasm repository for audit
- Parses Rust code using the syn crate
- Finds all functions in a crate [in progress]
- Identifies entry point functions like
execute
in CosmWasm contracts - Builds a call graph to show relationships between functions [in progress]
- Runs custom static analysis checks [in progress]
Traverse can be used as a library or a CLI.
The --scope argument takes a local filesystem path to analyze.
cargo run -- --url https://github.com/CosmWasm/cw-plus.git
- Clones repo to a temp directory
- Runs analysis on the temp directory
- Cleans up temp directory
cargo run -- --scope /path/to/repo
- Runs analysis on the local directory