Skip to content

Commit 44916f6

Browse files
committed
chore: Update deny config
1 parent 78741e5 commit 44916f6

File tree

1 file changed

+136
-40
lines changed

1 file changed

+136
-40
lines changed

deny.toml

+136-40
Original file line numberDiff line numberDiff line change
@@ -4,32 +4,82 @@
44
# * allow - No warning or error will be produced, though in some cases a note
55
# will be
66

7+
# Root options
8+
9+
# The graph table configures how the dependency graph is constructed and thus
10+
# which crates the checks are performed against
11+
[graph]
12+
# If 1 or more target triples (and optionally, target_features) are specified,
13+
# only the specified targets will be checked when running `cargo deny check`.
14+
# This means, if a particular package is only ever used as a target specific
15+
# dependency, such as, for example, the `nix` crate only being used via the
16+
# `target_family = "unix"` configuration, that only having windows targets in
17+
# this list would mean the nix crate, as well as any of its exclusive
18+
# dependencies not shared by any other crates, would be ignored, as the target
19+
# list here is effectively saying which targets you are building for.
20+
targets = [
21+
# The triple can be any string, but only the target triples built in to
22+
# rustc (as of 1.40) can be checked against actual config expressions
23+
#"x86_64-unknown-linux-musl",
24+
# You can also specify which target_features you promise are enabled for a
25+
# particular target. target_features are currently not validated against
26+
# the actual valid features supported by the target architecture.
27+
#{ triple = "wasm32-unknown-unknown", features = ["atomics"] },
28+
]
29+
# When creating the dependency graph used as the source of truth when checks are
30+
# executed, this field can be used to prune crates from the graph, removing them
31+
# from the view of cargo-deny. This is an extremely heavy hammer, as if a crate
32+
# is pruned from the graph, all of its dependencies will also be pruned unless
33+
# they are connected to another crate in the graph that hasn't been pruned,
34+
# so it should be used with care. The identifiers are [Package ID Specifications]
35+
# (https://doc.rust-lang.org/cargo/reference/pkgid-spec.html)
36+
#exclude = []
37+
# If true, metadata will be collected with `--all-features`. Note that this can't
38+
# be toggled off if true, if you want to conditionally enable `--all-features` it
39+
# is recommended to pass `--all-features` on the cmd line instead
40+
all-features = false
41+
# If true, metadata will be collected with `--no-default-features`. The same
42+
# caveat with `all-features` applies
43+
no-default-features = false
44+
# If set, these feature will be enabled when collecting metadata. If `--features`
45+
# is specified on the cmd line they will take precedence over this option.
46+
#features = []
47+
48+
# The output table provides options for how/if diagnostics are outputted
49+
[output]
50+
# When outputting inclusion graphs in diagnostics that include features, this
51+
# option can be used to specify the depth at which feature edges will be added.
52+
# This option is included since the graphs can be quite large and the addition
53+
# of features from the crate(s) to all of the graph roots can be far too verbose.
54+
# This option can be overridden via `--feature-depth` on the cmd line
55+
feature-depth = 1
56+
757
# This section is considered when running `cargo deny check advisories`
858
# More documentation for the advisories section can be found here:
959
# https://embarkstudios.github.io/cargo-deny/checks/advisories/cfg.html
1060
[advisories]
11-
# The lint level for security vulnerabilities
12-
vulnerability = "deny"
13-
# The lint level for unmaintained crates
14-
unmaintained = "warn"
15-
# The lint level for crates that have been yanked from their source registry
16-
yanked = "warn"
17-
# The lint level for crates with security notices. Note that as of
18-
# 2019-12-17 there are no security notice advisories in
19-
# https://github.com/rustsec/advisory-db
20-
notice = "warn"
61+
# The path where the advisory databases are cloned/fetched into
62+
#db-path = "$CARGO_HOME/advisory-dbs"
63+
# The url(s) of the advisory databases to use
64+
#db-urls = ["https://github.com/rustsec/advisory-db"]
2165
# A list of advisory IDs to ignore. Note that ignored advisories will still
2266
# output a note when they are encountered.
23-
#
24-
# e.g. "RUSTSEC-0000-0000",
2567
ignore = [
68+
#"RUSTSEC-0000-0000",
69+
#{ id = "RUSTSEC-0000-0000", reason = "you can specify a reason the advisory is ignored" },
70+
#"[email protected]", # you can also ignore yanked crate versions if you wish
71+
#{ crate = "[email protected]", reason = "you can specify why you are ignoring the yanked crate" },
2672
]
73+
# If this is true, then cargo deny will use the git executable to fetch advisory database.
74+
# If this is false, then it uses a built-in git library.
75+
# Setting this to true can be helpful if you have special authentication requirements that cargo-deny does not support.
76+
# See Git Authentication for more information about setting up git authentication.
77+
#git-fetch-with-cli = true
2778

2879
# This section is considered when running `cargo deny check licenses`
2980
# More documentation for the licenses section can be found here:
3081
# https://embarkstudios.github.io/cargo-deny/checks/licenses/cfg.html
3182
[licenses]
32-
unlicensed = "deny"
3383
# List of explicitly allowed licenses
3484
# See https://spdx.org/licenses/ for list of possible licenses
3585
# [possible values: any SPDX 3.11 short identifier (+ optional exception)].
@@ -42,26 +92,8 @@ allow = [
4292
"Unicode-DFS-2016",
4393
"CC0-1.0",
4494
"ISC",
95+
"OpenSSL",
4596
]
46-
# List of explicitly disallowed licenses
47-
# See https://spdx.org/licenses/ for list of possible licenses
48-
# [possible values: any SPDX 3.11 short identifier (+ optional exception)].
49-
deny = [
50-
]
51-
# Lint level for licenses considered copyleft
52-
copyleft = "deny"
53-
# Blanket approval or denial for OSI-approved or FSF Free/Libre licenses
54-
# * both - The license will be approved if it is both OSI-approved *AND* FSF
55-
# * either - The license will be approved if it is either OSI-approved *OR* FSF
56-
# * osi-only - The license will be approved if is OSI-approved *AND NOT* FSF
57-
# * fsf-only - The license will be approved if is FSF *AND NOT* OSI-approved
58-
# * neither - This predicate is ignored and the default lint level is used
59-
allow-osi-fsf-free = "neither"
60-
# Lint level used when no other predicates are matched
61-
# 1. License isn't in the allow or deny lists
62-
# 2. License isn't copyleft
63-
# 3. License isn't OSI/FSF, or allow-osi-fsf-free = "neither"
64-
default = "deny"
6597
# The confidence threshold for detecting a license from license text.
6698
# The higher the value, the more closely the license text must be to the
6799
# canonical license text of a valid SPDX license file.
@@ -72,7 +104,25 @@ confidence-threshold = 0.8
72104
exceptions = [
73105
# Each entry is the crate and version constraint, and its specific allow
74106
# list
75-
#{ allow = ["Zlib"], name = "adler32", version = "*" },
107+
#{ allow = ["Zlib"], crate = "adler32" },
108+
]
109+
110+
# Some crates don't have (easily) machine readable licensing information,
111+
# adding a clarification entry for it allows you to manually specify the
112+
# licensing information
113+
[[licenses.clarify]]
114+
# The package spec the clarification applies to
115+
crate = "ring"
116+
# The SPDX expression for the license requirements of the crate
117+
expression = "MIT AND ISC AND OpenSSL"
118+
# One or more files in the crate's source used as the "source of truth" for
119+
# the license expression. If the contents match, the clarification will be used
120+
# when running the license check, otherwise the clarification will be ignored
121+
# and the crate will be checked normally, which may produce warnings or errors
122+
# depending on the rest of your configuration
123+
license-files = [
124+
# Each entry is a crate relative path, and the (opaque) hash of its contents
125+
{ path = "LICENSE", hash = 0xbd0eed23 }
76126
]
77127

78128
[licenses.private]
@@ -81,6 +131,12 @@ exceptions = [
81131
# To see how to mark a crate as unpublished (to the official registry),
82132
# visit https://doc.rust-lang.org/cargo/reference/manifest.html#the-publish-field.
83133
ignore = true
134+
# One or more private registries that you might publish crates to, if a crate
135+
# is only published to private registries, and ignore is true, the crate will
136+
# not have its license(s) checked
137+
registries = [
138+
#"https://sekretz.com/registry
139+
]
84140

85141
# This section is considered when running `cargo deny check bans`.
86142
# More documentation about the 'bans' section can be found here:
@@ -89,7 +145,7 @@ ignore = true
89145
# Lint level for when multiple versions of the same crate are detected
90146
multiple-versions = "warn"
91147
# Lint level for when a crate version requirement is `*`
92-
wildcards = "warn"
148+
wildcards = "allow"
93149
# The graph highlighting used when creating dotgraphs for crates
94150
# with multiple versions
95151
# * lowest-version - The path to the lowest versioned duplicate is highlighted
@@ -106,17 +162,53 @@ workspace-default-features = "allow"
106162
external-default-features = "allow"
107163
# List of crates that are allowed. Use with care!
108164
allow = [
109-
#{ name = "ansi_term", version = "=0.11.0" },
165+
166+
#{ crate = "[email protected]", reason = "you can specify a reason it is allowed" },
110167
]
111168
# List of crates to deny
112169
deny = [
113-
# Each entry the name of a crate and a version range. If version is
114-
# not specified, all versions will be matched.
115-
#{ name = "ansi_term", version = "=0.11.0" },
116-
#
170+
171+
#{ crate = "[email protected]", reason = "you can specify a reason it is banned" },
117172
# Wrapper crates can optionally be specified to allow the crate when it
118173
# is a direct dependency of the otherwise banned crate
119-
#{ name = "ansi_term", version = "=0.11.0", wrappers = [] },
174+
#{ crate = "[email protected]", wrappers = ["this-crate-directly-depends-on-ansi_term"] },
175+
]
176+
177+
# List of features to allow/deny
178+
# Each entry the name of a crate and a version range. If version is
179+
# not specified, all versions will be matched.
180+
#[[bans.features]]
181+
#crate = "reqwest"
182+
# Features to not allow
183+
#deny = ["json"]
184+
# Features to allow
185+
#allow = [
186+
# "rustls",
187+
# "__rustls",
188+
# "__tls",
189+
# "hyper-rustls",
190+
# "rustls",
191+
# "rustls-pemfile",
192+
# "rustls-tls-webpki-roots",
193+
# "tokio-rustls",
194+
# "webpki-roots",
195+
#]
196+
# If true, the allowed features must exactly match the enabled feature set. If
197+
# this is set there is no point setting `deny`
198+
#exact = true
199+
200+
# Certain crates/versions that will be skipped when doing duplicate detection.
201+
skip = [
202+
203+
#{ crate = "[email protected]", reason = "you can specify a reason why it can't be updated/removed" },
204+
]
205+
# Similarly to `skip` allows you to skip certain crates during duplicate
206+
# detection. Unlike skip, it also includes the entire tree of transitive
207+
# dependencies starting at the specified crate, up to a certain depth, which is
208+
# by default infinite.
209+
skip-tree = [
210+
#"[email protected]", # will be skipped along with _all_ of its direct and transitive dependencies
211+
#{ crate = "[email protected]", depth = 20 },
120212
]
121213

122214
# This section is considered when running `cargo deny check sources`.
@@ -138,3 +230,7 @@ allow-git = []
138230
[sources.allow-org]
139231
# 1 or more github.com organizations to allow git sources for
140232
github = []
233+
# 1 or more gitlab.com organizations to allow git sources for
234+
gitlab = []
235+
# 1 or more bitbucket.org organizations to allow git sources for
236+
bitbucket = []

0 commit comments

Comments
 (0)