93 releases

0.16.3 Nov 28, 2024
0.16.1 Aug 5, 2024
0.15.1 Jul 26, 2024
0.14.20 Mar 23, 2024
0.2.6 Jul 27, 2019

#14 in Cargo plugins

Download history 13491/week @ 2024-08-22 12804/week @ 2024-08-29 15294/week @ 2024-09-05 12673/week @ 2024-09-12 12730/week @ 2024-09-19 12937/week @ 2024-09-26 12423/week @ 2024-10-03 13557/week @ 2024-10-10 13325/week @ 2024-10-17 12929/week @ 2024-10-24 12499/week @ 2024-10-31 14717/week @ 2024-11-07 15469/week @ 2024-11-14 13772/week @ 2024-11-21 13916/week @ 2024-11-28 11681/week @ 2024-12-05

57,363 downloads per month
Used in project_ares

MIT/Apache

1.5MB
12K SLoC

❌ cargo-deny

Cargo plugin for linting your dependencies

Embark Opensource Embark Discord Crates.io API Docs Docs Minimum Stable Rust Version SPDX Version dependency status Build Status

See the book 📕 for in-depth documentation.

To run on CI as a GitHub Action, see cargo-deny-action.

Please Note: This is a tool that we use (and like!) and it makes sense to us to release it as open source. However, we can’t take any responsibility for your use of the tool, if it will function correctly or fulfil your needs. No functionality in - or information provided by - cargo-deny constitutes legal advice.

Quickstart

cargo install --locked cargo-deny && cargo deny init && cargo deny check

Usage

Packaging status

Install cargo-deny

If you want to use cargo-deny without having cargo installed, build cargo-deny with the standalone feature. This can be useful in Docker Images.

cargo install --locked cargo-deny

# Or, if you're an Arch user
pacman -S cargo-deny

Initialize your project

cargo deny init

Check your crates

cargo deny check

Licenses

The licenses check is used to verify that every crate you use has license terms you find acceptable.

cargo deny check licenses

licenses output

Bans

The bans check is used to deny (or allow) specific crates, as well as detect and handle multiple versions of the same crate.

cargo deny check bans

bans output

Advisories

The advisories check is used to detect issues for crates by looking in an advisory database.

cargo deny check advisories

advisories output

Sources

The sources check ensures crates only come from sources you trust.

cargo deny check sources

sources output

Pre-commit hook

You can use cargo-deny with pre-commit. Add it to your local .pre-commit-config.yaml as follows:

- repo: https://github.com/EmbarkStudios/cargo-deny
  rev: 0.14.16 # choose your preferred tag
  hooks:
    - id: cargo-deny
      args: ["--all-features", "check"] # optionally modify the arguments for cargo-deny (default arguments shown here)

Contributing

Contributor Covenant

We welcome community contributions to this project.

Please read our Contributor Guide for more information on how to get started.

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Dependencies

~43–60MB
~1M SLoC