deny.toml 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189
  1. # This template contains all of the possible sections and their default values
  2. # Note that all fields that take a lint level have these possible values:
  3. # * deny - An error will be produced and the check will fail
  4. # * warn - A warning will be produced, but the check will not fail
  5. # * allow - No warning or error will be produced, though in some cases a note
  6. # will be
  7. # The values provided in this template are the default values that will be used
  8. # when any section or field is not specified in your own configuration
  9. # If 1 or more target triples (and optionally, target_features) are specified,
  10. # only the specified targets will be checked when running `cargo deny check`.
  11. # This means, if a particular package is only ever used as a target specific
  12. # dependency, such as, for example, the `nix` crate only being used via the
  13. # `target_family = "unix"` configuration, that only having windows targets in
  14. # this list would mean the nix crate, as well as any of its exclusive
  15. # dependencies not shared by any other crates, would be ignored, as the target
  16. # list here is effectively saying which targets you are building for.
  17. targets = [
  18. # The triple can be any string, but only the target triples built in to
  19. # rustc (as of 1.40) can be checked against actual config expressions
  20. #{ triple = "x86_64-unknown-linux-musl" },
  21. # You can also specify which target_features you promise are enabled for a
  22. # particular target. target_features are currently not validated against
  23. # the actual valid features supported by the target architecture.
  24. #{ triple = "wasm32-unknown-unknown", features = ["atomics"] },
  25. ]
  26. # This section is considered when running `cargo deny check advisories`
  27. # More documentation for the advisories section can be found here:
  28. # https://embarkstudios.github.io/cargo-deny/checks/advisories/cfg.html
  29. [advisories]
  30. # The path where the advisory database is cloned/fetched into
  31. db-path = "~/.cargo/advisory-db"
  32. # The url of the advisory database to use
  33. db-url = "https://github.com/rustsec/advisory-db"
  34. # The lint level for security vulnerabilities
  35. vulnerability = "deny"
  36. # The lint level for unmaintained crates
  37. unmaintained = "allow"
  38. # The lint level for crates that have been yanked from their source registry
  39. yanked = "warn"
  40. # The lint level for crates with security notices. Note that as of
  41. # 2019-12-17 there are no security notice advisories in
  42. # https://github.com/rustsec/advisory-db
  43. notice = "warn"
  44. # A list of advisory IDs to ignore. Note that ignored advisories will still
  45. # output a note when they are encountered.
  46. ignore = [
  47. #"RUSTSEC-0000-0000",
  48. ]
  49. # Threshold for security vulnerabilities, any vulnerability with a CVSS score
  50. # lower than the range specified will be ignored. Note that ignored advisories
  51. # will still output a note when they are encountered.
  52. # * None - CVSS Score 0.0
  53. # * Low - CVSS Score 0.1 - 3.9
  54. # * Medium - CVSS Score 4.0 - 6.9
  55. # * High - CVSS Score 7.0 - 8.9
  56. # * Critical - CVSS Score 9.0 - 10.0
  57. #severity-threshold =
  58. # This section is considered when running `cargo deny check licenses`
  59. # More documentation for the licenses section can be found here:
  60. # https://embarkstudios.github.io/cargo-deny/checks/licenses/cfg.html
  61. [licenses]
  62. # The lint level for crates which do not have a detectable license
  63. unlicensed = "allow"
  64. # List of explictly allowed licenses
  65. # See https://spdx.org/licenses/ for list of possible licenses
  66. # [possible values: any SPDX 3.7 short identifier (+ optional exception)].
  67. allow = [
  68. #"MIT",
  69. #"Apache-2.0",
  70. #"Apache-2.0 WITH LLVM-exception",
  71. ]
  72. # List of explictly disallowed licenses
  73. # See https://spdx.org/licenses/ for list of possible licenses
  74. # [possible values: any SPDX 3.7 short identifier (+ optional exception)].
  75. deny = [
  76. #"Nokia",
  77. ]
  78. # Lint level for licenses considered copyleft
  79. copyleft = "warn"
  80. # Blanket approval or denial for OSI-approved or FSF Free/Libre licenses
  81. # * both - The license will be approved if it is both OSI-approved *AND* FSF
  82. # * either - The license will be approved if it is either OSI-approved *OR* FSF
  83. # * osi-only - The license will be approved if is OSI-approved *AND NOT* FSF
  84. # * fsf-only - The license will be approved if is FSF *AND NOT* OSI-approved
  85. # * neither - This predicate is ignored and the default lint level is used
  86. allow-osi-fsf-free = "neither"
  87. # Lint level used when no other predicates are matched
  88. # 1. License isn't in the allow or deny lists
  89. # 2. License isn't copyleft
  90. # 3. License isn't OSI/FSF, or allow-osi-fsf-free = "neither"
  91. default = "allow"
  92. # The confidence threshold for detecting a license from license text.
  93. # The higher the value, the more closely the license text must be to the
  94. # canonical license text of a valid SPDX license file.
  95. # [possible values: any between 0.0 and 1.0].
  96. confidence-threshold = 0.8
  97. # Allow 1 or more licenses on a per-crate basis, so that particular licenses
  98. # aren't accepted for every possible crate as with the normal allow list
  99. exceptions = [
  100. # Each entry is the crate and version constraint, and its specific allow
  101. # list
  102. #{ allow = ["Zlib"], name = "adler32", version = "*" },
  103. ]
  104. # Some crates don't have (easily) machine readable licensing information,
  105. # adding a clarification entry for it allows you to manually specify the
  106. # licensing information
  107. #[[licenses.clarify]]
  108. # The name of the crate the clarification applies to
  109. #name = "ring"
  110. # THe optional version constraint for the crate
  111. #version = "*"
  112. # The SPDX expression for the license requirements of the crate
  113. #expression = "MIT AND ISC AND OpenSSL"
  114. # One or more files in the crate's source used as the "source of truth" for
  115. # the license expression. If the contents match, the clarification will be used
  116. # when running the license check, otherwise the clarification will be ignored
  117. # and the crate will be checked normally, which may produce warnings or errors
  118. # depending on the rest of your configuration
  119. #license-files = [
  120. # Each entry is a crate relative path, and the (opaque) hash of its contents
  121. #{ path = "LICENSE", hash = 0xbd0eed23 }
  122. #]
  123. [licenses.private]
  124. # If true, ignores workspace crates that aren't published, or are only
  125. # published to private registries
  126. ignore = true
  127. # One or more private registries that you might publish crates to, if a crate
  128. # is only published to private registries, and ignore is true, the crate will
  129. # not have its license(s) checked
  130. registries = [
  131. #"https://sekretz.com/registry
  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
  138. multiple-versions = "deny"
  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
  144. highlight = "all"
  145. # List of crates that are allowed. Use with care!
  146. allow = [
  147. #{ name = "ansi_term", version = "=0.11.0" },
  148. ]
  149. # List of crates to deny
  150. deny = [
  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. # Certain crates/versions that will be skipped when doing duplicate detection.
  156. skip = [
  157. #{ name = "ansi_term", version = "=0.11.0" },
  158. ]
  159. # Similarly to `skip` allows you to skip certain crates during duplicate
  160. # detection. Unlike skip, it also includes the entire tree of transitive
  161. # dependencies starting at the specified crate, up to a certain depth, which is
  162. # by default infinite
  163. skip-tree = [
  164. #{ name = "ansi_term", version = "=0.11.0", depth = 20 },
  165. ]
  166. # This section is considered when running `cargo deny check sources`.
  167. # More documentation about the 'sources' section can be found here:
  168. # https://embarkstudios.github.io/cargo-deny/checks/sources/cfg.html
  169. [sources]
  170. # Lint level for what to happen when a crate from a crate registry that is not
  171. # in the allow list is encountered
  172. unknown-registry = "warn"
  173. # Lint level for what to happen when a crate from a git repository that is not
  174. # in the allow list is encountered
  175. unknown-git = "warn"
  176. # List of URLs for allowed crate registries. Defaults to the crates.io index
  177. # if not specified. If it is specified but empty, no registries are allowed.
  178. allow-registry = ["https://github.com/rust-lang/crates.io-index"]
  179. # List of URLs for allowed Git repositories
  180. allow-git = []