These reviews are from cargo-vet. To add your review, set up cargo-vet and submit your URL to its registry.

The current version of CargoMetadata is 0.19.0.

cargo-vet does not verify reviewers' identity. You have to fully trust the source the audits are from.

safe-to-deploy (implies safe-to-run)

This crate will not introduce a serious security vulnerability to production software exposed to untrusted input. More…

safe-to-run
Implied by other criteria

This crate can be compiled, run, and tested on a local workstation or in controlled automation without surprising consequences. More…

unknown

May have been packaged automatically without a review


These reviews are from Crev, a distributed system for code reviews. To add your review, set up cargo-crev.

The current version of CargoMetadata is 0.19.0.

0.9.1 (older version) Rating: Positive Thoroughness: Medium Understanding: Medium

by MaulingMonkey on 2019-12-22

Parse cargo metadata and cargo build --message-format=json output.

Pros:

  • Way better than parsing it yourself
  • Safe code

Cons:

  • If you're feeling particularly paranoid, cargo metadata could be passed bad feature names (see 0.8.2 review for details)

0.9.1

crev
thoroughness medium
understanding medium
rating positive
Diff Rating Notes
.cargo_vcs_info.json +1
Cargo.toml +1
Cargo.toml.orig +1
src/dependency.rs +1
src/lib.rs +1
src/messages.rs +1
tests/test_samples.rs +1

0.9.0 (older version) Rating: Positive Thoroughness: Medium Understanding: Medium

by MaulingMonkey on 2019-12-22

Show review…

Parse cargo metadata and cargo build --message-format=json output.

0.9.0

Diff Rating Notes
.cargo_vcs_info.json +1
Cargo.toml +1
Cargo.toml.orig +1
src/errors.rs +1 Added Error::NoJson
src/lib.rs 0 Various safe but breaking code changes
src/messages.rs +1
tests/selftest.rs +1
tests/test_samples.rs +1

0.8.2

File Rating Notes
src/dependency.rs +1
src/diagnostic.rs +1
src/errors.rs +1
src/lib.rs 0 MetadataCommand makes me slightly paranoid
src/messages.rs +1
tests/selftest.rs +1
tests/test_samples.rs +1
.cargo_vcs_info.json +1
.cargo-ok +1
.gitignore +1
.travis.yml +1 1.32.0 MSRV
Cargo.toml +1
Cargo.toml.orig +1
LICENSE-MIT +1
README.md +1
Other Rating Notes
unsafe +1 None
fs +1 None
io 0 Can invoke cargo metadata. Looks sane, but if passed malicious feature names etc...
docs +1
tests +1

src/lib.rs

Line What Notes
495 exec shell access, and I'm paranoid about shell param escaping...
500 exec shell access, and I'm paranoid about shell param escaping...

Crates in the crates.io registry are tarball snapshots uploaded by crates' publishers. The registry is not using crates' git repositories. There is absolutely no guarantee that the repository URL declared by the crate belongs to the crate, or that the code in the repository is the code inside the published tarball.

To review the actual code of the crate, it's best to use cargo crev open cargo_metadata. Alternatively, you can download the tarball of cargo_metadata v0.19.0 or view the source online.