• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Note that all fields that take a lint level have these possible values:
2# * deny - An error will be produced and the check will fail
3# * warn - A warning will be produced, but the check will not fail
4# * allow - No warning or error will be produced, though in some cases a note
5# will be
6
7# This section is considered when running `cargo deny check advisories`
8# More documentation for the advisories section can be found here:
9# https://embarkstudios.github.io/cargo-deny/checks/advisories/cfg.html
10[advisories]
11# The lint level for security vulnerabilities
12vulnerability = "deny"
13# The lint level for unmaintained crates
14unmaintained = "warn"
15# The lint level for crates that have been yanked from their source registry
16yanked = "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
20notice = "warn"
21# A list of advisory IDs to ignore. Note that ignored advisories will still
22# output a note when they are encountered.
23#
24# e.g. "RUSTSEC-0000-0000",
25ignore = [
26]
27
28# This section is considered when running `cargo deny check licenses`
29# More documentation for the licenses section can be found here:
30# https://embarkstudios.github.io/cargo-deny/checks/licenses/cfg.html
31[licenses]
32unlicensed = "deny"
33# List of explicitly allowed licenses
34# See https://spdx.org/licenses/ for list of possible licenses
35# [possible values: any SPDX 3.11 short identifier (+ optional exception)].
36allow = [
37    "MIT",
38    "MIT-0",
39    "Apache-2.0",
40    "BSD-3-Clause",
41    "MPL-2.0",
42    "Unicode-DFS-2016",
43    "CC0-1.0",
44    "ISC",
45]
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)].
49deny = [
50]
51# Lint level for licenses considered copyleft
52copyleft = "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
59allow-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"
64default = "deny"
65# The confidence threshold for detecting a license from license text.
66# The higher the value, the more closely the license text must be to the
67# canonical license text of a valid SPDX license file.
68# [possible values: any between 0.0 and 1.0].
69confidence-threshold = 0.8
70# Allow 1 or more licenses on a per-crate basis, so that particular licenses
71# aren't accepted for every possible crate as with the normal allow list
72exceptions = [
73    # Each entry is the crate and version constraint, and its specific allow
74    # list
75    #{ allow = ["Zlib"], name = "adler32", version = "*" },
76]
77
78[licenses.private]
79# If true, ignores workspace crates that aren't published, or are only
80# published to private registries.
81# To see how to mark a crate as unpublished (to the official registry),
82# visit https://doc.rust-lang.org/cargo/reference/manifest.html#the-publish-field.
83ignore = true
84
85# This section is considered when running `cargo deny check bans`.
86# More documentation about the 'bans' section can be found here:
87# https://embarkstudios.github.io/cargo-deny/checks/bans/cfg.html
88[bans]
89# Lint level for when multiple versions of the same crate are detected
90multiple-versions = "warn"
91# Lint level for when a crate version requirement is `*`
92wildcards = "warn"
93# The graph highlighting used when creating dotgraphs for crates
94# with multiple versions
95# * lowest-version - The path to the lowest versioned duplicate is highlighted
96# * simplest-path - The path to the version with the fewest edges is highlighted
97# * all - Both lowest-version and simplest-path are used
98highlight = "all"
99# The default lint level for `default` features for crates that are members of
100# the workspace that is being checked. This can be overridden by allowing/denying
101# `default` on a crate-by-crate basis if desired.
102workspace-default-features = "allow"
103# The default lint level for `default` features for external crates that are not
104# members of the workspace. This can be overridden by allowing/denying `default`
105# on a crate-by-crate basis if desired.
106external-default-features = "allow"
107# List of crates that are allowed. Use with care!
108allow = [
109    #{ name = "ansi_term", version = "=0.11.0" },
110]
111# List of crates to deny
112deny = [
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    #
117    # Wrapper crates can optionally be specified to allow the crate when it
118    # is a direct dependency of the otherwise banned crate
119    #{ name = "ansi_term", version = "=0.11.0", wrappers = [] },
120]
121
122# This section is considered when running `cargo deny check sources`.
123# More documentation about the 'sources' section can be found here:
124# https://embarkstudios.github.io/cargo-deny/checks/sources/cfg.html
125[sources]
126# Lint level for what to happen when a crate from a crate registry that is not
127# in the allow list is encountered
128unknown-registry = "deny"
129# Lint level for what to happen when a crate from a git repository that is not
130# in the allow list is encountered
131unknown-git = "deny"
132# List of URLs for allowed crate registries. Defaults to the crates.io index
133# if not specified. If it is specified but empty, no registries are allowed.
134allow-registry = ["https://github.com/rust-lang/crates.io-index"]
135# List of URLs for allowed Git repositories
136allow-git = []
137
138[sources.allow-org]
139# 1 or more github.com organizations to allow git sources for
140github = []
141