66# Reference: https://embarkstudios.github.io/cargo-deny/
77
88[advisories ]
9- # Fail the build when a crate advisory has a vulnerability.
10- vulnerability = { level = " deny" , collection = " all" }
11- # Warn about unmaintained crates — these are not direct security threats but
12- # indicate eventual bit-rot.
13- unmaintained = { level = " warn" , collection = " all" }
14- # Warn about yanked crate versions so they can be updated before they cause
15- # resolution failures for new contributors.
16- yanked = { level = " warn" , collection = " all" }
17- # Treat unsoundness annotations as hard errors — they are effectively bugs.
18- unsound = { level = " deny" , collection = " all" }
9+ # cargo-deny v0.20+ always treats vulnerability advisories as hard errors.
10+ # No `vulnerability` key is needed — it is enabled by default.
11+ #
12+ # Scope for unmaintained crate advisories:
13+ # "all" — check every crate in the dependency graph.
14+ # "workspace" — only check workspace members.
15+ # "transitive"— check workspace members and their transitive deps.
16+ # "none" — skip unmaintained checks entirely.
17+ unmaintained = " workspace"
18+ # Lint level for yanked crate advisories:
19+ # "deny" — fail the build.
20+ # "warn" — emit a warning but don't fail.
21+ # "allow" — silently ignore.
22+ yanked = " warn"
23+ # Scope for unsoundness advisories (same values as unmaintained).
24+ # Default is "workspace".
25+ unsound = " workspace"
1926# Ignore known, accepted-risk advisories here. Each entry is the advisory ID
2027# from https://rustsec.org/advisories/.
2128ignore = []
22- # CI must fail when an advisory is rated HIGH or CRITICAL.
23- severity-threshold = " HIGH"
2429
2530[licenses ]
26- # Refuse any crate that does not carry a license identifier.
27- unlicensed = " deny"
31+ # cargo-deny v0.20+ is deny-by-default: anything not in `allow` is denied.
2832# Allow-listed SPDX identifiers — all transitive dependencies must be covered
2933# by one of these. Add others when a new dependency introduces a license not
30- # already listed here. OSI-approved / FSF-free / commonly-used OSS licenses
34+ # already listed here. OSI-approved / FSF-free / commonly-used OSS licenses
3135# are preferred; proprietary or copy-left licenses should be reviewed before
3236# being added.
3337allow = [
@@ -44,16 +48,16 @@ allow = [
4448 " OpenSSL" ,
4549 " MPL-2.0" ,
4650]
47- # Explicitly refused licenses. Leave empty — un-allowed licenses are already
48- # denied, and we prefer that new license introductions fail the build so they
49- # are consciously reviewed .
50- deny = []
51- # Per-crate exceptions may be listed here.
52- # Example :
53- # exceptions = [
54- # { name = "some-crate", allow = ["Unlicense"] },
55- # ]
56- exceptions = []
51+ # Confidence threshold for license file detection (0.0 to 1.0).
52+ confidence-threshold = 0.8
53+ # Suppress warnings when an allow-listed license is not used by any crate .
54+ unused-allowed-license = " allow "
55+ # Per-crate exceptions may be listed here for crates that need a license
56+ # not in the global allow-list. Add entries like :
57+ # [[licenses.exceptions]]
58+ # allow = ["Zlib"]
59+ # name = "adler32"
60+ # version = "1.0"
5761
5862[bans ]
5963# Prevent duplicate versions of the same crate in the dependency graph.
@@ -73,7 +77,7 @@ skip = []
7377skip-tree = []
7478
7579[sources ]
76- # Only allow crates published to crates.io. Git / path dependencies should
80+ # Only allow crates published to crates.io. Git / path dependencies should
7781# be rare and reviewed.
7882unknown-registry = " deny"
7983unknown-git = " deny"
0 commit comments