cargo-deny
Cargo plugin to help you manage large dependency graphs
0.20.2
5.2M downloads/mo
#4452 most downloaded on crates.io
EmbarkStudios/cargo-deny
What this package is like to depend on
Last release 1 months ago
09 Jul 2026
Ships fairly regularly
a new release about every 5 weeks
Nearly every release is documented
notes for 113 of 116 stable releases
1 version withdrawn
withdrawn after publishing
7 years old
118 releases · first in 2019
18 releases in the last 12 months
see the full history below
Release timeline
118 releases · May 2019 to Jul 2026Releases
latest 60 of 118-
0.20.209 Jul 2026Release notes
Open source →Changed
- PR#881 refactored the CLI, moving some duplicated options/flags into the root and removing several deprecated options/flags/values. See the PR for a full list of changes.
Added
- PR#879 resolved #873 by adding a new
bans.std-replacementslint which checks the graph for crates.io sourced crates that have been partially or fully replaced instdand/orcore.
Fixed
Release notes
Open source →Fixed
- PR#884 fixed snapshot filenames on Windows which caused the release binary publish to fail...again.
-
0.20.109 Jul 2026Release notes
Open source →Fixed
- PR#883 fixed snapshot filenames on Windows which caused the release binary publish to fail.
-
0.20.009 Jul 2026Release notes
Open source →Changed
- PR#881 refactored the CLI, moving some duplicated options/flags into the root and removing several deprecated options/flags/values. See the PR for a full list of changes.
Added
- PR#879 resolved #873 by adding a new
bans.std-replacementslint which checks the graph for crates.io sourced crates that have been partially or fully replaced instdand/orcore.
Fixed
-
0.19.915 Jun 2026 -
0.19.828 May 2026Release notes
Open source →Fixed
- PR#864 fixed matching of
^and~with on prerelease versions for when checking if a crate is affected by an advisory. As of the time of the PR, this literally affected none of published versions of any crate with an advisory, but this just ensures such a case will be handled in the future.
Release notes
Open source →Fixed
- PR#864 fixed matching of
^and~with on prerelease versions for when checking if a crate is affected by an advisory. As of the time of the PR, this literally affected none of published versions of any crate with an advisory, but this just ensures such a case will be handled in the future.
- PR#864 fixed matching of
-
0.19.722 May 2026 -
0.19.611 May 2026 -
0.19.509 May 2026 -
0.19.415 Apr 2026 -
0.19.315 Apr 2026 withdrawn -
0.19.214 Apr 2026Release notes
Open source →Fixed
- PR#845 fixed structural issues with SARIF output, resolving #818. Thanks @KyleChamberlin!
-
0.19.110 Apr 2026Release notes
Open source →Fixed
- PR#833 fixed an issue where the maximum advisory database staleness was over 14 years instead of the intended 90 days.
- PR#839 fixed an issue where unsound advisories would appear for transitive dependencies despite requesting them only for workspace dependencies, resolving #829.
- PR#840 resolved #797 by passing
--filter-platformwhen collecting cargo metadata if only a single target was requested either in the config or via the command line. - PR#841 fixed an issue where
--frozenwould not disable fetching of the advisory DB, resolving #759. - PR#842 and PR#844 updated crates. Notably
krateswas updated to resolve two issues with crates being pruned from the graph used when running checks. Resolving these two issues may mean that updating cargo-deny may highlight issues that were previously hidden.- EmbarkStudios/krates#106 would fail to pull in crates brought in via a feature if that crate had its
libtarget renamed by the package author. - EmbarkStudios/krates#109 would fail to bring in optional dependencies if they were brought in by a weak feature in a crate also brought in by a weak feature.
- EmbarkStudios/krates#106 would fail to pull in crates brought in via a feature if that crate had its
Changed
- PR#830 removed
gixin favor of shelling out togit. This massively improves build times and eases maintenance asgixbumps minor versions quite frequently. If cargo-deny is used in an environment that for some reason allows internet access but doesn't havegitavailable, the advisory database would need to be updated before calling cargo-deny. - PR#838 removed
rustsecin favor of manually implemented advisory parsing and checking, with a nightly cron job that checks that the implementation exactly matches rustsec on the official rustsec advisory db.
-
0.19.008 Jan 2026Release notes
Open source →Changed
- PR#802 made relative paths passed to
--configbe resolved relative to the current working directory (rather than the resolved manifest path's directory). - PR#825 updated
gix,reqwest, andtame-indexto newer versions. Thereqwest0.13 changes means it is no longer possible to choose the source of root certificates forgix, so that decision is now left torustls-platform-verifier. Thenative-certsfeature has thus been removed, andcargo-denyno longer defaults to usingwebpki-roots.
Fixed
- PR#802 fixed path handling of paths passed to
--config, resolving #748. - PR#819 added locations to all SARIF results since that's mandatory for valid SARIF.
- PR#821 fixed compilation on an Alpine host.
Added
- PR#795 added
[bans.allow-workspace]to allow workspace crates while denying all external crates. - PR#800 added
[licenses.include-build]to toggle whether build dependencies are included in the license check. - PR#823 added
[advisories.unused-ignored-advisory]to disable the warning when an advisory is ignored but not encountered in the crate graph. - PR#826 added
[advisories.unsound]to determine which crates can showunsoundadvisories, similarly to theunmaintainedfield. Defaults toworkspacecrates, ignoringunsoundadvisories for transitive dependencies, resolving #824.
- PR#802 made relative paths passed to
-
0.18.908 Dec 2025 -
0.18.803 Dec 2025Release notes
Open source →Fixed
- PR#814 now allows deprecated license identifiers if they are detected from text, which was broken in 0.18.7. Additionally, when a GNU license (GPL, AGPL, LGPL, GFDL) license is detected, it is always detected as the
-or-latervariant, arbitrarily chosen as it is impossible to distinguish between the variants for a particular license version. This means if the license detected is actually wrong (eg.GPL-3.0-or-lateris detected when the code is actually licensed underGPL-3.0-only), the license should instead be clarified to the correct one. Resolves #813.
- PR#814 now allows deprecated license identifiers if they are detected from text, which was broken in 0.18.7. Additionally, when a GNU license (GPL, AGPL, LGPL, GFDL) license is detected, it is always detected as the
-
0.18.702 Dec 2025Release notes
Open source →Changed
- PR#812 updated
spdxto 0.13, allowing cargo-deny to remove the askalono dependency but still support license detection.
- PR#812 updated
-
0.18.624 Nov 2025 -
0.18.522 Sep 2025Release notes
Open source →Changed
- PR#789 changed it so that release binaries are now built with LTO.
- PR#790 and PR#794 updated various crates.
Added
-
0.18.414 Aug 2025Release notes
Open source →Added
- PR#779 added the
--metadata-pathargument to use a cargo metadata JSON file instead of calling cargo metadata, resolving #777. - PR#782 added
sources.unused-allow-sourceto allow configuration of the lint level when a source is allowed but not used by any crate in the graph, closing #781.
Changed
- PR#786 changed the license check output.
/is no longer corrected toOR, and if the license expression is found in the package's manifest, that span is used in diagnostic messages instead of the synthesized manifest.
Fixed
- PR#786 resolved #784 by updating
spdxto a new version that forces all GNU licenses to be exactly equal when comparing license expressions to licensee expressions, which is incredibly pedantic, but means the license comparison is entirely in the hands of the user so that I no longer have to deal with GNU licenses.
- PR#779 added the
-
0.18.311 Jun 2025Release notes
Open source →Changed
- PR#773 changed cargo-deny's duplicate detection to automatically ignore versions whose only dependent is another version of the same crate.
-
0.18.210 Mar 2025Release notes
Open source →Added
- PR#753 resolved #752 by adding back the
advisories.unmaintainedconfig option. See the docs for how it can be used. The default matches the current behavior, which is to error on anyunmaintainedadvisory, but addingunmaintained = "workspace"to the[advisories]table will mean unmaintained advisories will only error if the crate is a direct dependency of your workspace.
- PR#753 resolved #752 by adding back the
-
0.18.127 Feb 2025Release notes
Open source →Fixed
- PR#749 updated
kratesto pull in the fix for EmbarkStudios/krates#100.
- PR#749 updated
-
0.18.024 Feb 2025Release notes
Open source →Changed
- PR#746 changed the directory naming of advisory databases, again, so the name uses the last path component and a different, but also stable, hashing algorithm. Eg. the default
https://github.com/rustsec/advisory-dbwill now be placed in$CARGO_HOME/advisory-dbs/advisory-db-3157b0e258782691. - PR#746 changed the MSRV to 1.85.0 and uses edition 2024.
Fixed
- PR#746 fixes an issue when using cargo 1.85.0 where source urls were not being properly assigned to crates.io due to the constant being used no longer matching the new path used in cargo 1.85.0 causing eg. workspace dependency checks to fail.
- PR#746 changed the directory naming of advisory databases, again, so the name uses the last path component and a different, but also stable, hashing algorithm. Eg. the default
-
0.17.020 Feb 2025 -
0.16.419 Jan 2025Release notes
Open source →Changed
- PR#742 updated
gixto 0.70, to resolve RUSTSEC-2025-0001.
Fixed
- PR#739 fixed an issue where sources could match even if the hostname was not the same.
- PR#742 updated
-
0.16.328 Nov 2024Release notes
Open source →Changed
- PR#721 updated
rust-versionto 1.81.0 to accurately reflect the minimum rust version required to compile, resolving #720. - PR#722 updated the SPDX license list to 3.25.0.
Fixed
- PR#721 updated
-
0.16.215 Nov 2024Release notes
Open source →Fixed
- PR#703 resolved #696 by no longer emitting errors when failing to deserialize deprecated fields, and removed some lingering documentation that wasn't removed in PR#611.
- PR#719 updated to
krates-> 0.17.5, fixing an issue wherecargo-denycould panic due to incorrectly resolving features for different versions of the same crate referenced by a single crate. - PR#719 resolved #706 by removing a warning issued when users use ignored scheme modifiers for source urls.
- PR#719 resolved #718 by updating the book with missing arguments.
Added
- PR#715 resolved #714 by adding support for Edition 2024. Thanks @kpcyrd!
- PR#710 resolved #708 by allowing for unpublished workspace crates to be excluded from the dependency graph that checks are run against, either via the
--exclude-unpublishedCLI argument or thegraph.exclude-unpublishedconfig field. Thanks @Tastaturtaste!
Changed
-
0.16.105 Aug 2024Release notes
Open source →Fixed
- PR#691 fixed an issue where workspace dependencies that used the current dir '.' path component would incorrectly trigger the
unused-workspace-dependencylint.
- PR#691 fixed an issue where workspace dependencies that used the current dir '.' path component would incorrectly trigger the
-
0.16.002 Aug 2024Release notes
Open source →Removed
- PR#681 finished the deprecation introduced in PR#611, making the usage of the deprecated fields into errors.
[advisories]The following fields have all been removed in favor of denying all advisories by default. To ignore an advisory the
ignorefield can be used as before.vulnerability- Vulnerability advisories are nowdenyby defaultunmaintained- Unmaintained advisories are nowdenyby defaultunsound- Unsound advisories are nowdenyby defaultnotice- Notice advisories are nowdenyby defaultseverity-threshold- The severity of vulnerabilities is now irrelevant
[licenses]The following fields have all been removed in favor of denying all licenses that are not explicitly allowed via either
alloworexceptions.unlicensed- Crates whose license(s) cannot be confidently determined are now always errors. Theclarifyfield can be used to help cargo-deny determine the license.allow-osi-fsf-free- The OSI/FSF Free attributes are now irrelevant, only whether it is explicitly allowed.copyleft- The copyleft attribute is now irrelevant, only whether it is explicitly allowed.default- The default is nowdeny.deny- All licenses are now denied by default, this field added nothing.
Changed
- PR#685 follows up on PR#673, moving the fields that were added to their own separate
bans.workspace-dependenciessection. This is an unannounced breaking change but is fairly minor and 0.15.0 was never released on github actions so the amount of people affected by this will be (hopefully) small. This also makes the workspace duplicate detection off by default since the field is optional, but makes it so that if not specified workspace duplicates are nowdenyinstead ofwarn.
Fixed
-
0.15.126 Jul 2024 -
0.15.025 Jul 2024Release notes
Open source →Added
- PR#673 added linting of
[workspace.dependencies], resolving #436 and #525.- Added lint
workspace-duplicates, which allows checking for missing usage ofworkspace = truefor direct workspace dependencies that are used more than once in the workspace. - Added lint
unused-workspace-dependencies, which allows checking for dependencies declared in[workspace.dependencies]that aren't actually used.
- Added lint
Changed
- PR#673 changed how span information for workspace dependencies worked, which meant improvements were made to the output for the
bans.wildcardslint. Previously fake cargo manifests were created that weren't even necessarily valid toml files, however now the actual cargo manifests are used, meaning that the lint will now point to the correct file and line location of the dependency declaration that uses a wildcard. - PR#675 changed the utf-8 characters used in rendering diagnostics, inspired by rust-lang/rust#126597.
- PR#676 updated notably
gix-> 0.64 (and tame-index).
Fixed
- PR#673 added linting of
-
0.14.2424 May 2024Release notes
Open source →Changed
- PR#663 updated some crates, notably
gix-> 0.63 (and tame-index).
- PR#663 updated some crates, notably
-
0.14.2303 May 2024Release notes
Open source → -
0.14.2223 Apr 2024 -
0.14.2112 Apr 2024Release notes
Open source →Fixed
- PR#643 resolved #629 by making the hosted git (github, gitlab, bitbucket) org/user name comparison case-insensitive. Thanks @pmnlla!
- PR#649 fixed an issue where depending on the same crate multiple times by using different
cfg()/tripletargets could cause features to be resolved incorrectly and thus crates to be not pulled into the graph used for checking.
-
0.14.2023 Mar 2024Release notes
Open source →Fixed
- PR#642 resolved #641 by pinning
gix-transport(and its unique dependencies) to 0.41.2 as a workaround forcargo installnot using the lockfile. See this issue for more information.
- PR#642 resolved #641 by pinning
-
0.14.1921 Mar 2024Release notes
Open source →Changed
- PR#639 updated tame-index to avoid an error if you don't used
--locked.
- PR#639 updated tame-index to avoid an error if you don't used
-
0.14.1821 Mar 2024 -
0.14.1717 Mar 2024 -
0.14.1606 Mar 2024 -
0.14.1528 Feb 2024Release notes
Open source →Added
- PR#618 added metadata notes to diagnostics when a license is rejected, as well as removing span information for accepted licenses unless the log level is
infoor higher to make the diagnostic clearer by default.
- PR#618 added metadata notes to diagnostics when a license is rejected, as well as removing span information for accepted licenses unless the log level is
-
0.14.1426 Feb 2024 -
0.14.1324 Feb 2024 -
0.14.1223 Feb 2024Release notes
Open source →Changed
- PR#605 did a major refactor of configuration, both how it is deserialized and changing (hopefully improving) many options.
- PR#605 moved
targets,exclude,all-features,features,no-default-features, andexcludeinto the[graph]table. - PR#605 moved
feature-depthinto the[output]table.
Added
- PR#613 added support for basic shell expansion to
advisories.db-path, which expands support beyond just~to include environment variable expansion.
Fixed
- PR#601 resolved #600 by outputting the correct spans when a license was both allowed and denied.
- PR#605 resolved #264 be replacing
tomlandserdewithtoml-span. - PR#605 resolved #539 by simplifying the very common
name = "<crate_name>", version = "<requirements>"used to target specific crates into either a plain package spec string or the simplercrate = "<package spec>". - PR#605 resolved #578 by adding a
reason = "<reason>"field to many fields within the configuration that are provided in diagnostics.[bans.deny]also has an additionaluse-instead = "<url/crate_name>". PR#610 did this for theadvisories.ignorefield. - PR#605 resolved #579 by allowing yanked crates to be ignored by specifying a PackageSpec in the
[advisories.ignore]array.
Deprecated
- PR#606 and PR#611 together deprecated several fields listed below. See PR#611 for how to change your config to opt-in to the new behavior that will become the default when the deprecated fields are removed in a future minor version.
[advisories]vulnerabilityunmaintainedunsoundnoticeseverity-threshold
[licenses]unlicensedallow-osi-fsf-freecopyleftdefaultdeny
-
0.14.1105 Feb 2024Release notes
Open source → -
0.14.1024 Jan 2024 -
0.14.924 Jan 2024 -
0.14.822 Jan 2024 -
0.14.722 Jan 2024 -
0.14.621 Jan 2024Release notes
Open source →Fixed
- PR#590 updated
kratesto fix an issue with crates that directly have a dependency on 2 or more versions of the same crate.
Added
- PR#590 resolved #405 by emitting warnings when a
wrappercrate for a banned crate does not have a dependency on that crate.
Changed
- PR#591 updated
gixandtame-index.
- PR#590 updated
-
0.14.520 Jan 2024 -
0.14.419 Jan 2024 -
0.14.329 Sep 2023Release notes
Open source →Fixed
- PR#566 updated
tame-indexto obtain OS file locking, resolving #537. This change means that cargo-deny should not encounter issues such as those described in this rustsec issue since we no longer usegix::locklocking advisory databases, and makes reading the crates.io index safer by respecting the lock used by cargo itself.
- PR#566 updated
-
0.14.204 Sep 2023Release notes
Open source →Added
- PR#545 added the ability to specify additional license exceptions via additional configuration files.
- PR#549 added the
bans.buildconfiguration option, opting in to checking for file extensions, native executables, and interpreted scripts. This resolved #43.
Changed
- PR#557 introduced changes to how
dev-dependenciesare handled. By default, crates that are only used as dev-dependencies (ie, there are no normal nor build dependency edges linking them to other crates) will no longer be considered when checking formultiple-versionsviolations. This can be re-enabled via thebans.multiple-versions-include-devconfig field. Additionally, licenses are no longer checked fordev-dependencies, but can be re-enabled vialicenses.include-devthe config field.dev-dependenciescan also be completely disabled altogether, but this applies to all checks, includingadvisoriesandsources, so is not enabled by default. This behavior can be enabled by using theexclude-devfield, or the--exclude-devcommand line flag. This change resolved #322, #329, #413 and #497.
Fixed
- PR#549 fixed #548 by correctly locating cargo registry indices from an git ssh url.
- PR#549 fixed #552 by correctly handling signal interrupts and removing the advisory-dbs lock file.
- PR#549 fixed #553 by adding the
native-certsfeature flag that can enable the OS native certificate store.
Deprecated
- PR#549 moved
bans.allow-build-scriptstobans.build.allow-build-scripts.bans.allow-build-scriptsis still supported, but emits a warning.
-
0.14.102 Aug 2023Release notes
Open source →Fixed
- PR#544 updated dependencies, notably
tame-index 0.2.5which fixed this issue
Changed
- PR#538 resolved #483 by emitting exit codes as a bitset of the individual checks that failed, allowing scripts to handle checks separately from a single run. This could affect users who check exactly for the exit code being 1, as that will now only be emitted if the
advisories, but no other, check fails.
- PR#544 updated dependencies, notably
-
0.14.028 Jul 2023Release notes
Open source →Changed
- PR#520 resolved #522 by completely removing all dependencies upon
git2andopenssl. This was done by transitioning fromgit2->gixfor all git operations, both directly in this crate, as well as replacingcrates-indexwithtame-index. - PR#520 bumped the MSRV from
1.65.0->1.70.0 - PR#523 added "(try
cargo update -p <crate_name>)" when an advisory is detected for a crate. Thanks @Victor-N-Suadicani!
Fixed
- PR#520 resolved #361 by printing output when a fetch is being performed to clarify what is taking time.
- PR#520 (possibly) resolved #435 by switching all git operations from
git2togix. - PR#520 resolved #439 by using minimal refspecs for cloning and fetching all remote git repositories (indices or advisory databases) where only the remote HEAD is needed to update the local repository, regardless of the default remote branch pointed to by HEAD.
- PR#520 resolved #446 by ensuring (and testing) that crates from non-registry sources are not checked for advisories, eg. in the case that a local crate is named and versioned the same as a crate from crates.io that has an advisory that affects it.
- PR#520 resolved #515 by always opening the correct registry index based upon the environment.
- PR#531 resolved #210 by adding
osiandfsfoptions tolicenses.allow-osi-fsf-free. Thanks @zkxs! - PR#533 resolved #521 and #524 by allowing clarifications to add files that are used to verify the license information is up to date, rather than needing to match one of the license files that was discovered.
- PR#534 resolved #479 by improving how advisory databases are cloned and/or fetched, notably each database now uses
gix's file-based locking to ensure that only one process has mutable access to an advisory database repo at a time.
Removed
- PR#520 removed all features, notably
standalone. This is due to cargo still being in transition fromgit2->gixand having no way to compiled without OpenSSL. Once cargo is a better state with regards to this we can add back that feature.
- PR#520 resolved #522 by completely removing all dependencies upon
-
0.13.912 Apr 2023Release notes
Open source →Fixed
- PR#506 replaced
atty(unmaintained) withis-terminal. Thanks @tottoto! - PR#511 resolved #494, #507, and #510 by fixing up how and when urls are normalized.
- PR#512 resolved #509 by fixing casing of the root configuration keys.
- PR#513 resolved #508 by correctly using the crates.io sparse index when checking for yanked crates if specified by the user, as well as falling back to the regular git index if the sparse index is not present.
- PR#506 replaced
-
0.13.806 Apr 2023Release notes
Open source →Added
- PR#504 (though really PR#365) resolved #350 by adding the
deny-multiple-versionsfield tobans.denyentries, allowing specific crates to deny multiple versions while allowing/warning on them more generally. Thanks @leops! - PR#493 resolved #437 by also looking for deny configuration files in
.cargo. Thanks @DJMcNab! - PR#502 resolved #500 by adding initial support for sparse indices.
Fixed
- PR#504 (though really PR#365) resolved #350 by adding the
-
0.13.711 Jan 2023 -
0.13.611 Jan 2023Release notes
Open source →Changed
- PR#489 updated dependencies, notably
clap,cargo, andgit2
Added
- PR#485 added this project and repository to our Security Bug Bounty Program and has Private vulnerability reporting enabled. See
SECURITY.mdfor more details. - PR#487 added
allow-wildcard-paths, fixing #488 by allowing wildcards to be denied, but allowing them for internal, private crates. Thanks @sribich!
Fixed
- PR#489 fixed an issue where git sources where
branch=masterwould be incorrectly categorized as not specifying the branch (ie use HEAD of default branch).
- PR#489 updated dependencies, notably