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[graph] 8# If 1 or more target triples (and optionally, target_features) are specified, 9# only the specified targets will be checked when running `cargo deny check`. 10# This means, if a particular package is only ever used as a target specific 11# dependency, such as, for example, the `nix` crate only being used via the 12# `target_family = "unix"` configuration, that only having windows targets in 13# this list would mean the nix crate, as well as any of its exclusive 14# dependencies not shared by any other crates, would be ignored, as the target 15# list here is effectively saying which targets you are building for. 16targets = [ 17 { triple = "aarch64-apple-darwin" }, 18 { triple = "aarch64-apple-ios" }, 19 { triple = "aarch64-unknown-linux-gnu" }, 20 { triple = "aarch64-unknown-linux-musl" }, 21 { triple = "arm-linux-androideabi" }, 22 { triple = "armv7-linux-androideabi" }, 23 { triple = "i686-pc-windows-gnu" }, 24 { triple = "i686-pc-windows-msvc" }, 25 { triple = "i686-unknown-linux-gnu" }, 26 { triple = "i686-unknown-linux-musl" }, 27 { triple = "x86_64-apple-darwin" }, 28 { triple = "x86_64-pc-windows-gnu" }, 29 { triple = "x86_64-pc-windows-msvc" }, 30 { triple = "x86_64-unknown-linux-gnu" }, 31 { triple = "x86_64-unknown-linux-musl" }, 32 { triple = "x86_64-unknown-netbsd" }, 33] 34 35# This section is considered when running `cargo deny check advisories` 36# More documentation for the advisories section can be found here: 37# https://embarkstudios.github.io/cargo-deny/checks/advisories/cfg.html 38[advisories] 39# Selects the default behavior for checking advisories. 40version = 2 41# The path where the advisory database is cloned/fetched into 42db-path = "~/.cargo/advisory-db" 43# The url(s) of the advisory databases to use 44db-urls = ["https://github.com/rustsec/advisory-db"] 45# The lint level for crates that have been yanked from their source registry 46yanked = "deny" 47# A list of advisory IDs to ignore. Note that ignored advisories will still 48# output a note when they are encountered. 49ignore = [ 50 "RUSTSEC-2021-0145", # caused by unmaintained atty 51 "RUSTSEC-2024-0370", # caused by unmaintained proc-macro-error used by some examples 52 "RUSTSEC-2024-0375", # caused by umnaintained atty (again, with migration hint) 53] 54# Threshold for security vulnerabilities, any vulnerability with a CVSS score 55# lower than the range specified will be ignored. Note that ignored advisories 56# will still output a note when they are encountered. 57# * None - CVSS Score 0.0 58# * Low - CVSS Score 0.1 - 3.9 59# * Medium - CVSS Score 4.0 - 6.9 60# * High - CVSS Score 7.0 - 8.9 61# * Critical - CVSS Score 9.0 - 10.0 62#severity-threshold = 63 64# If this is true, then cargo deny will use the git executable to fetch advisory database. 65# If this is false, then it uses a built-in git library. 66# Setting this to true can be helpful if you have special authentication requirements that cargo-deny does not support. 67# See Git Authentication for more information about setting up git authentication. 68#git-fetch-with-cli = true 69 70# This section is considered when running `cargo deny check licenses` 71# More documentation for the licenses section can be found here: 72# https://embarkstudios.github.io/cargo-deny/checks/licenses/cfg.html 73[licenses] 74# Selects the default behavior for checking licenses. 75version = 2 76# List of explicitly allowed licenses 77# See https://spdx.org/licenses/ for list of possible licenses 78# [possible values: any SPDX 3.11 short identifier (+ optional exception)]. 79allow = [ 80 "Apache-2.0", 81 "BSD-2-Clause", 82 "MIT", 83 "MPL-2.0", 84 "Unicode-3.0", 85 "Unicode-DFS-2016", 86] 87# The confidence threshold for detecting a license from license text. 88# The higher the value, the more closely the license text must be to the 89# canonical license text of a valid SPDX license file. 90# [possible values: any between 0.0 and 1.0]. 91confidence-threshold = 0.8 92# Allow 1 or more licenses on a per-crate basis, so that particular licenses 93# aren't accepted for every possible crate as with the normal allow list 94exceptions = [ 95 # Each entry is the crate and version constraint, and its specific allow 96 # list 97 #{ allow = ["Zlib"], name = "adler32", version = "*" }, 98] 99 100# Some crates don't have (easily) machine readable licensing information, 101# adding a clarification entry for it allows you to manually specify the 102# licensing information 103#[[licenses.clarify]] 104# The name of the crate the clarification applies to 105#name = "ring" 106# The optional version constraint for the crate 107#version = "*" 108# The SPDX expression for the license requirements of the crate 109#expression = "MIT AND ISC AND OpenSSL" 110# One or more files in the crate's source used as the "source of truth" for 111# the license expression. If the contents match, the clarification will be used 112# when running the license check, otherwise the clarification will be ignored 113# and the crate will be checked normally, which may produce warnings or errors 114# depending on the rest of your configuration 115#license-files = [ 116 # Each entry is a crate relative path, and the (opaque) hash of its contents 117 #{ path = "LICENSE", hash = 0xbd0eed23 } 118#] 119 120[licenses.private] 121# If true, ignores workspace crates that aren't published, or are only 122# published to private registries. 123# To see how to mark a crate as unpublished (to the official registry), 124# visit https://doc.rust-lang.org/cargo/reference/manifest.html#the-publish-field. 125ignore = false 126# One or more private registries that you might publish crates to, if a crate 127# is only published to private registries, and ignore is true, the crate will 128# not have its license(s) checked 129registries = [ 130 #"https://sekretz.com/registry 131] 132 133# This section is considered when running `cargo deny check bans`. 134# More documentation about the 'bans' section can be found here: 135# https://embarkstudios.github.io/cargo-deny/checks/bans/cfg.html 136[bans] 137# Lint level for when multiple versions of the same crate are detected 138multiple-versions = "deny" 139# Lint level for when a crate version requirement is `*` 140wildcards = "deny" 141# The graph highlighting used when creating dotgraphs for crates 142# with multiple versions 143# * lowest-version - The path to the lowest versioned duplicate is highlighted 144# * simplest-path - The path to the version with the fewest edges is highlighted 145# * all - Both lowest-version and simplest-path are used 146highlight = "all" 147# List of crates that are allowed. Use with care! 148allow = [ 149] 150# List of crates to deny 151deny = [ 152] 153# Certain crates/versions that will be skipped when doing duplicate detection. 154skip = [ 155] 156# Similarly to `skip` allows you to skip certain crates during duplicate 157# detection. Unlike skip, it also includes the entire tree of transitive 158# dependencies starting at the specified crate, up to a certain depth, which is 159# by default infinite 160skip-tree = [ 161 { name = "clap", version = "~3.2" }, # https://github.com/serialport/serialport-rs/pull/76 162] 163 164# This section is considered when running `cargo deny check sources`. 165# More documentation about the 'sources' section can be found here: 166# https://embarkstudios.github.io/cargo-deny/checks/sources/cfg.html 167[sources] 168# Lint level for what to happen when a crate from a crate registry that is not 169# in the allow list is encountered 170unknown-registry = "deny" 171# Lint level for what to happen when a crate from a git repository that is not 172# in the allow list is encountered 173unknown-git = "deny" 174# List of URLs for allowed crate registries. Defaults to the crates.io index 175# if not specified. If it is specified but empty, no registries are allowed. 176allow-registry = ["https://github.com/rust-lang/crates.io-index"] 177# List of URLs for allowed Git repositories 178allow-git = [] 179 180[sources.allow-org] 181# 1 or more github.com organizations to allow git sources for 182#github = [""] 183# 1 or more gitlab.com organizations to allow git sources for 184#gitlab = [""] 185# 1 or more bitbucket.org organizations to allow git sources for 186#bitbucket = [""] 187