Skip to content

Commit 83e02d7

Browse files
committed
1 parent 723f803 commit 83e02d7

File tree

1 file changed

+80
-16
lines changed

1 file changed

+80
-16
lines changed

.github/other/deny.toml

Lines changed: 80 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
# The values provided in this template are the default values that will be used
1010
# when any section or field is not specified in your own configuration
1111

12+
# Root options
13+
1214
# If 1 or more target triples (and optionally, target_features) are specified,
1315
# only the specified targets will be checked when running `cargo deny check`.
1416
# This means, if a particular package is only ever used as a target specific
@@ -26,6 +28,30 @@ targets = [
2628
# the actual valid features supported by the target architecture.
2729
#{ triple = "wasm32-unknown-unknown", features = ["atomics"] },
2830
]
31+
# When creating the dependency graph used as the source of truth when checks are
32+
# executed, this field can be used to prune crates from the graph, removing them
33+
# from the view of cargo-deny. This is an extremely heavy hammer, as if a crate
34+
# is pruned from the graph, all of its dependencies will also be pruned unless
35+
# they are connected to another crate in the graph that hasn't been pruned,
36+
# so it should be used with care. The identifiers are [Package ID Specifications]
37+
# (https://doc.rust-lang.org/cargo/reference/pkgid-spec.html)
38+
#exclude = []
39+
# If true, metadata will be collected with `--all-features`. Note that this can't
40+
# be toggled off if true, if you want to conditionally enable `--all-features` it
41+
# is recommended to pass `--all-features` on the cmd line instead
42+
all-features = false
43+
# If true, metadata will be collected with `--no-default-features`. The same
44+
# caveat with `all-features` applies
45+
no-default-features = false
46+
# If set, these feature will be enabled when collecting metadata. If `--features`
47+
# is specified on the cmd line they will take precedence over this option.
48+
#features = []
49+
# When outputting inclusion graphs in diagnostics that include features, this
50+
# option can be used to specify the depth at which feature edges will be added.
51+
# This option is included since the graphs can be quite large and the addition
52+
# of features from the crate(s) to all of the graph roots can be far too verbose.
53+
# This option can be overridden via `--feature-depth` on the cmd line
54+
feature-depth = 1
2955

3056
# This section is considered when running `cargo deny check advisories`
3157
# More documentation for the advisories section can be found here:
@@ -48,7 +74,7 @@ notice = "warn"
4874
# A list of advisory IDs to ignore. Note that ignored advisories will still
4975
# output a note when they are encountered.
5076
ignore = [
51-
# "RUSTSEC-0000-0000",
77+
#"RUSTSEC-0000-0000",
5278
]
5379
# Threshold for security vulnerabilities, any vulnerability with a CVSS score
5480
# lower than the range specified will be ignored. Note that ignored advisories
@@ -60,6 +86,12 @@ ignore = [
6086
# * Critical - CVSS Score 9.0 - 10.0
6187
#severity-threshold =
6288

89+
# If this is true, then cargo deny will use the git executable to fetch advisory database.
90+
# If this is false, then it uses a built-in git library.
91+
# Setting this to true can be helpful if you have special authentication requirements that cargo-deny does not support.
92+
# See Git Authentication for more information about setting up git authentication.
93+
#git-fetch-with-cli = true
94+
6395
# This section is considered when running `cargo deny check licenses`
6496
# More documentation for the licenses section can be found here:
6597
# https://embarkstudios.github.io/cargo-deny/checks/licenses/cfg.html
@@ -79,16 +111,6 @@ allow = [
79111
"MPL-2.0",
80112
#"Apache-2.0 WITH LLVM-exception",
81113
]
82-
# What to do if a license in the above list is not actually used in a dependency
83-
# We allow this since we don't want to fine-tune deny.toml every time we add/remove
84-
# a permissive license.
85-
unused-allowed-license = "allow"
86-
# Allow 1 or more licenses on a per-crate basis, so that particular licenses
87-
# aren't accepted for every possible crate as with the normal allow list
88-
exceptions = [
89-
# Each entry is the crate and version constraint, and its specific allow list
90-
# { name = "crate", allow = ["License"], version = "*" },
91-
]
92114
# List of explicitly disallowed licenses
93115
# See https://spdx.org/licenses/ for list of possible licenses
94116
# [possible values: any SPDX 3.11 short identifier (+ optional exception)].
@@ -100,8 +122,10 @@ copyleft = "deny"
100122
# Blanket approval or denial for OSI-approved or FSF Free/Libre licenses
101123
# * both - The license will be approved if it is both OSI-approved *AND* FSF
102124
# * either - The license will be approved if it is either OSI-approved *OR* FSF
103-
# * osi-only - The license will be approved if is OSI-approved *AND NOT* FSF
104-
# * fsf-only - The license will be approved if is FSF *AND NOT* OSI-approved
125+
# * osi - The license will be approved if it is OSI approved
126+
# * fsf - The license will be approved if it is FSF Free
127+
# * osi-only - The license will be approved if it is OSI-approved *AND NOT* FSF
128+
# * fsf-only - The license will be approved if it is FSF *AND NOT* OSI-approved
105129
# * neither - This predicate is ignored and the default lint level is used
106130
allow-osi-fsf-free = "neither"
107131
# Lint level used when no other predicates are matched
@@ -114,6 +138,13 @@ default = "deny"
114138
# canonical license text of a valid SPDX license file.
115139
# [possible values: any between 0.0 and 1.0].
116140
confidence-threshold = 0.8
141+
# Allow 1 or more licenses on a per-crate basis, so that particular licenses
142+
# aren't accepted for every possible crate as with the normal allow list
143+
exceptions = [
144+
# Each entry is the crate and version constraint, and its specific allow
145+
# list
146+
#{ allow = ["Zlib"], name = "adler32", version = "*" },
147+
]
117148

118149
# Some crates don't have (easily) machine readable licensing information,
119150
# adding a clarification entry for it allows you to manually specify the
@@ -131,8 +162,8 @@ confidence-threshold = 0.8
131162
# and the crate will be checked normally, which may produce warnings or errors
132163
# depending on the rest of your configuration
133164
#license-files = [
134-
# Each entry is a crate relative path, and the (opaque) hash of its contents
135-
#{ path = "LICENSE", hash = 0xbd0eed23 }
165+
# Each entry is a crate relative path, and the (opaque) hash of its contents
166+
#{ path = "LICENSE", hash = 0xbd0eed23 }
136167
#]
137168

138169
[licenses.private]
@@ -162,6 +193,14 @@ wildcards = "allow"
162193
# * simplest-path - The path to the version with the fewest edges is highlighted
163194
# * all - Both lowest-version and simplest-path are used
164195
highlight = "all"
196+
# The default lint level for `default` features for crates that are members of
197+
# the workspace that is being checked. This can be overridden by allowing/denying
198+
# `default` on a crate-by-crate basis if desired.
199+
workspace-default-features = "allow"
200+
# The default lint level for `default` features for external crates that are not
201+
# members of the workspace. This can be overridden by allowing/denying `default`
202+
# on a crate-by-crate basis if desired.
203+
external-default-features = "allow"
165204
# List of crates that are allowed. Use with care!
166205
allow = [
167206
#{ name = "ansi_term", version = "=0.11.0" },
@@ -189,14 +228,38 @@ deny = [
189228
{ name = "syn", wrappers = ["bindgen", "gensym"] },
190229
{ name = "serde", wrappers = ["godot-core", "serde_json"] },
191230
]
231+
232+
# List of features to allow/deny
233+
# Each entry the name of a crate and a version range. If version is
234+
# not specified, all versions will be matched.
235+
#[[bans.features]]
236+
#name = "reqwest"
237+
# Features to not allow
238+
#deny = ["json"]
239+
# Features to allow
240+
#allow = [
241+
# "rustls",
242+
# "__rustls",
243+
# "__tls",
244+
# "hyper-rustls",
245+
# "rustls",
246+
# "rustls-pemfile",
247+
# "rustls-tls-webpki-roots",
248+
# "tokio-rustls",
249+
# "webpki-roots",
250+
#]
251+
# If true, the allowed features must exactly match the enabled feature set. If
252+
# this is set there is no point setting `deny`
253+
#exact = true
254+
192255
# Certain crates/versions that will be skipped when doing duplicate detection.
193256
skip = [
194257
#{ name = "ansi_term", version = "=0.11.0" },
195258
]
196259
# Similarly to `skip` allows you to skip certain crates during duplicate
197260
# detection. Unlike skip, it also includes the entire tree of transitive
198261
# dependencies starting at the specified crate, up to a certain depth, which is
199-
# by default infinite
262+
# by default infinite.
200263
skip-tree = [
201264
#{ name = "ansi_term", version = "=0.11.0", depth = 20 },
202265
]
@@ -218,6 +281,7 @@ allow-registry = ["https://github.com/rust-lang/crates.io-index"]
218281
allow-git = []
219282

220283
[sources.allow-org]
284+
# 1 or more github.com organizations to allow git sources for
221285
github = ["godot-rust"]
222286
# 1 or more gitlab.com organizations to allow git sources for
223287
#gitlab = [""]

0 commit comments

Comments
 (0)