1# This template contains all of the possible sections and their default values
2
3# Note that all fields that take a lint level have these possible values:
4# * deny - An error will be produced and the check will fail
5# * warn - A warning will be produced, but the check will not fail
6# * allow - No warning or error will be produced, though in some cases a note
7# will be
8
9# The values provided in this template are the default values that will be used
10# when any section or field is not specified in your own configuration
11
12# This section is considered when running `cargo deny check advisories`
13# More documentation for the advisories section can be found here:
14# https://embarkstudios.github.io/cargo-deny/checks/advisories/cfg.html
15[advisories]
16# The path where the advisory database is cloned/fetched into
17db-path = "~/.cargo/advisory-db"
18# The url(s) of the advisory databases to use
19db-urls = ["https://github.com/rustsec/advisory-db"]
20# The lint level for crates that have been yanked from their source registry
21yanked = "warn"
22# A list of advisory IDs to ignore. Note that ignored advisories will still
23# output a note when they are encountered.
24ignore = [
25    # comment explaining why we have to ignore it
26    # "RUSTSEC-FOO",
27]
28# Threshold for security vulnerabilities, any vulnerability with a CVSS score
29# lower than the range specified will be ignored. Note that ignored advisories
30# will still output a note when they are encountered.
31# * None - CVSS Score 0.0
32# * Low - CVSS Score 0.1 - 3.9
33# * Medium - CVSS Score 4.0 - 6.9
34# * High - CVSS Score 7.0 - 8.9
35# * Critical - CVSS Score 9.0 - 10.0
36#severity-threshold =
37
38# If this is true, then cargo deny will use the git executable to fetch advisory database.
39# If this is false, then it uses a built-in git library.
40# Setting this to true can be helpful if you have special authentication requirements that cargo-deny does not support.
41# See Git Authentication for more information about setting up git authentication.
42#git-fetch-with-cli = true
43
44# This section is considered when running `cargo deny check licenses`
45# More documentation for the licenses section can be found here:
46# https://embarkstudios.github.io/cargo-deny/checks/licenses/cfg.html
47[licenses]
48# List of explicitly allowed licenses
49# See https://spdx.org/licenses/ for list of possible licenses
50# [possible values: any SPDX 3.11 short identifier (+ optional exception)].
51allow = [
52    "MIT",
53    "Apache-2.0",
54    "Apache-2.0 WITH LLVM-exception",
55    "BSD-3-Clause",
56    "BSD-2-Clause",
57    "ISC",
58    "Unicode-DFS-2016",
59    "OpenSSL",
60    "Unlicense",
61    "CC0-1.0"
62]
63# The confidence threshold for detecting a license from license text.
64# The higher the value, the more closely the license text must be to the
65# canonical license text of a valid SPDX license file.
66# [possible values: any between 0.0 and 1.0].
67confidence-threshold = 0.8
68# Allow 1 or more licenses on a per-crate basis, so that particular licenses
69# aren't accepted for every possible crate as with the normal allow list
70exceptions = [
71    # Each entry is the crate and version constraint, and its specific allow
72    # list
73
74
75    # "Reciprocal" licensed crate pulled directly from crates.io without modifications
76    # Important: Update https://third-party-mirror.googlesource.com/webpki-roots/ if you update this version
77    { allow = ["MPL-2.0"], name = "webpki-roots", version = "0.25.2" },
78    # "Reciprocal" licensed crate pulled directly from crates.io without modifications
79    # Important: Update https://third-party-mirror.googlesource.com/option-ext/ if you update this version
80    { allow = ["MPL-2.0"], name = "option-ext", version = "0.2.0" },
81    # "Reciprocal" licensed crate pulled directly from crates.io without modifications
82    # Important: Update https://third-party-mirror.googlesource.com/smartstring/ if you update this version
83    { allow = ["MPL-2.0"], name = "smartstring", version = "1.0.1" },
84    # "Reciprocal" licensed crate pulled directly from crates.io without modifications
85    # Important: Update https://third-party-mirror.googlesource.com/cbindgen/ if you update this version
86    { allow = ["MPL-2.0"], name = "cbindgen", version = "0.26.0" },
87]
88
89# Some crates don't have (easily) machine readable licensing information,
90# adding a clarification entry for it allows you to manually specify the
91# licensing information
92#[[licenses.clarify]]
93# The name of the crate the clarification applies to
94#name = "ring"
95# The optional version constraint for the crate
96#version = "*"
97# The SPDX expression for the license requirements of the crate
98#expression = "MIT AND ISC AND OpenSSL"
99# One or more files in the crate's source used as the "source of truth" for
100# the license expression. If the contents match, the clarification will be used
101# when running the license check, otherwise the clarification will be ignored
102# and the crate will be checked normally, which may produce warnings or errors
103# depending on the rest of your configuration
104#license-files = [
105# Each entry is a crate relative path, and the (opaque) hash of its contents
106#{ path = "LICENSE", hash = 0xbd0eed23 }
107#]
108
109[[licenses.clarify]]
110name = "ring"
111version = "*"
112expression = "MIT AND ISC AND OpenSSL"
113license-files = [
114    # Each entry is a crate relative path, and the (opaque) hash of its contents
115    { path = "LICENSE", hash = 0xbd0eed23 }
116]
117
118[licenses.private]
119# If true, ignores workspace crates that aren't published, or are only
120# published to private registries.
121# To see how to mark a crate as unpublished (to the official registry),
122# visit https://doc.rust-lang.org/cargo/reference/manifest.html#the-publish-field.
123ignore = true
124# One or more private registries that you might publish crates to, if a crate
125# is only published to private registries, and ignore is true, the crate will
126# not have its license(s) checked
127registries = [
128    #"https://sekretz.com/registry
129]
130
131# This section is considered when running `cargo deny check bans`.
132# More documentation about the 'bans' section can be found here:
133# https://embarkstudios.github.io/cargo-deny/checks/bans/cfg.html
134[bans]
135# Lint level for when multiple versions of the same crate are detected
136multiple-versions = "allow"
137# Lint level for when a crate version requirement is `*`
138wildcards = "allow"
139# The graph highlighting used when creating dotgraphs for crates
140# with multiple versions
141# * lowest-version - The path to the lowest versioned duplicate is highlighted
142# * simplest-path - The path to the version with the fewest edges is highlighted
143# * all - Both lowest-version and simplest-path are used
144highlight = "all"
145# List of crates that are allowed. Use with care!
146allow = [
147    #{ name = "ansi_term", version = "=0.11.0" },
148]
149# List of crates to deny
150deny = [
151    # Each entry the name of a crate and a version range. If version is
152    # not specified, all versions will be matched.
153    #{ name = "ansi_term", version = "=0.11.0" },
154    #
155    # Wrapper crates can optionally be specified to allow the crate when it
156    # is a direct dependency of the otherwise banned crate
157    #{ name = "ansi_term", version = "=0.11.0", wrappers = [] },
158]
159# Certain crates/versions that will be skipped when doing duplicate detection.
160skip = [
161    #{ name = "ansi_term", version = "=0.11.0" },
162]
163# Similarly to `skip` allows you to skip certain crates during duplicate
164# detection. Unlike skip, it also includes the entire tree of transitive
165# dependencies starting at the specified crate, up to a certain depth, which is
166# by default infinite
167skip-tree = [
168    #{ name = "ansi_term", version = "=0.11.0", depth = 20 },
169]
170
171# This section is considered when running `cargo deny check sources`.
172# More documentation about the 'sources' section can be found here:
173# https://embarkstudios.github.io/cargo-deny/checks/sources/cfg.html
174[sources]
175# Lint level for what to happen when a crate from a crate registry that is not
176# in the allow list is encountered
177unknown-registry = "warn"
178# Lint level for what to happen when a crate from a git repository that is not
179# in the allow list is encountered
180unknown-git = "warn"
181# List of URLs for allowed crate registries. Defaults to the crates.io index
182# if not specified. If it is specified but empty, no registries are allowed.
183allow-registry = ["https://github.com/rust-lang/crates.io-index"]
184# List of URLs for allowed Git repositories
185allow-git = []
186