Crates.io | depdive |
lib.rs | depdive |
version | 0.1.0 |
source | src |
created_at | 2021-08-11 19:46:47.528462 |
updated_at | 2021-08-11 19:46:47.528462 |
description | Rust dependency analysis tool |
homepage | https://github.com/diem/whackadep/tree/main/depdive |
repository | https://github.com/diem/whackadep |
max_upload_size | |
id | 434920 |
size | 7,493,572 |
Depdive is a Rust dependency analysis tool, that provides various analysis metrics for i) Rust crates to aid in dependency selection and monitoring, i) and their version updates, to aid in security review (e.g., for pull requests created by dependabot).
cargo install --git https://github.com/diem/whackadep --branch main depdive
.Dependency update review: You can provide two commits for a given repo, or two paths for a repo checked out at two different commits in order to compare the dependencies that have been upgraded between the two commits and get depdive review report for those updates in markdown format. Check functions run_update_analyzer_from_repo_commits
and run_update_analyzer_from_paths
at the library root.
When used as a CLI tool, you can run depdive update-review commits <repo-path> <commit_a> <commit_b>
or depdive update-review paths <path_a> <path_b>
.
Dependency monitoring metrics: You can provide the path of your Cargo project and get the dependency monitoring metrics in json
format. Check impls of DependencyAnalyzer
and DependencyGraphAnalyzer
at the library root.
When used as a CLI tool, you can run depdive dep-review package-metrics <path>
and depdive dep-review code-metrics <path>
to get usage and activity metrics and code and unsafe analysis metrics respectively. Note that, code-mterics use (cargo-geiger
)[https://github.com/rust-secure-code/cargo-geiger] which cannot be run more than once at a time.
Depdive offers below analysis for a Rust dependency update:
The markdown comment looks like this with i) a table with checkboxes for four criteria, and ii) details available on a click.
Depdive offers below analysis for dependency selection/monitoring:
bug
, security
label.cargo-geiger
)[https://github.com/rust-secure-code/cargo-geiger] to provide count of unsafe code in a Rust crate, and also total unsafe code pulled in by a crate through its dependencies.You are essentially pulling in new code to your codebase each time you make a dependency update and thus, creating a channel for security holes to sneak in. While manually reviewing dependency updates, there can be some routine checks that can be automated. The goal of depdive is to aid you in dep update review by performing such automated checks. Please, let us know what other analysis you think can be helpful.