You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

207 lines
9.1 KiB

3 years ago
3 years ago
3 years ago
  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(s) of the advisory databases to use
  33. db-urls = ["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 = "warn"
  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 = "deny"
  64. # List of explicitly allowed licenses
  65. # See https://spdx.org/licenses/ for list of possible licenses
  66. # [possible values: any SPDX 3.11 short identifier (+ optional exception)].
  67. allow = [
  68. "Apache-2.0",
  69. "BSD-3-Clause",
  70. "MIT",
  71. "MPL-2.0",
  72. "Unicode-DFS-2016",
  73. ]
  74. # List of explicitly disallowed licenses
  75. # See https://spdx.org/licenses/ for list of possible licenses
  76. # [possible values: any SPDX 3.11 short identifier (+ optional exception)].
  77. deny = [
  78. #"Nokia",
  79. ]
  80. # Lint level for licenses considered copyleft
  81. copyleft = "warn"
  82. # Blanket approval or denial for OSI-approved or FSF Free/Libre licenses
  83. # * both - The license will be approved if it is both OSI-approved *AND* FSF
  84. # * either - The license will be approved if it is either OSI-approved *OR* FSF
  85. # * osi-only - The license will be approved if is OSI-approved *AND NOT* FSF
  86. # * fsf-only - The license will be approved if is FSF *AND NOT* OSI-approved
  87. # * neither - This predicate is ignored and the default lint level is used
  88. allow-osi-fsf-free = "neither"
  89. # Lint level used when no other predicates are matched
  90. # 1. License isn't in the allow or deny lists
  91. # 2. License isn't copyleft
  92. # 3. License isn't OSI/FSF, or allow-osi-fsf-free = "neither"
  93. default = "deny"
  94. # The confidence threshold for detecting a license from license text.
  95. # The higher the value, the more closely the license text must be to the
  96. # canonical license text of a valid SPDX license file.
  97. # [possible values: any between 0.0 and 1.0].
  98. confidence-threshold = 0.8
  99. # Allow 1 or more licenses on a per-crate basis, so that particular licenses
  100. # aren't accepted for every possible crate as with the normal allow list
  101. exceptions = [
  102. # Each entry is the crate and version constraint, and its specific allow
  103. # list
  104. #{ allow = ["Zlib"], name = "adler32", version = "*" },
  105. ]
  106. # Some crates don't have (easily) machine readable licensing information,
  107. # adding a clarification entry for it allows you to manually specify the
  108. # licensing information
  109. #[[licenses.clarify]]
  110. # The name of the crate the clarification applies to
  111. #name = "ring"
  112. # The optional version constraint for the crate
  113. #version = "*"
  114. # The SPDX expression for the license requirements of the crate
  115. #expression = "MIT AND ISC AND OpenSSL"
  116. # One or more files in the crate's source used as the "source of truth" for
  117. # the license expression. If the contents match, the clarification will be used
  118. # when running the license check, otherwise the clarification will be ignored
  119. # and the crate will be checked normally, which may produce warnings or errors
  120. # depending on the rest of your configuration
  121. #license-files = [
  122. # Each entry is a crate relative path, and the (opaque) hash of its contents
  123. #{ path = "LICENSE", hash = 0xbd0eed23 }
  124. #]
  125. [licenses.private]
  126. # If true, ignores workspace crates that aren't published, or are only
  127. # published to private registries.
  128. # To see how to mark a crate as unpublished (to the official registry),
  129. # visit https://doc.rust-lang.org/cargo/reference/manifest.html#the-publish-field.
  130. ignore = false
  131. # One or more private registries that you might publish crates to, if a crate
  132. # is only published to private registries, and ignore is true, the crate will
  133. # not have its license(s) checked
  134. registries = [
  135. #"https://sekretz.com/registry
  136. ]
  137. # This section is considered when running `cargo deny check bans`.
  138. # More documentation about the 'bans' section can be found here:
  139. # https://embarkstudios.github.io/cargo-deny/checks/bans/cfg.html
  140. [bans]
  141. # Lint level for when multiple versions of the same crate are detected
  142. multiple-versions = "warn"
  143. # Lint level for when a crate version requirement is `*`
  144. wildcards = "allow"
  145. # The graph highlighting used when creating dotgraphs for crates
  146. # with multiple versions
  147. # * lowest-version - The path to the lowest versioned duplicate is highlighted
  148. # * simplest-path - The path to the version with the fewest edges is highlighted
  149. # * all - Both lowest-version and simplest-path are used
  150. highlight = "all"
  151. # List of crates that are allowed. Use with care!
  152. allow = [
  153. #{ name = "ansi_term", version = "=0.11.0" },
  154. ]
  155. # List of crates to deny
  156. deny = [
  157. # Each entry the name of a crate and a version range. If version is
  158. # not specified, all versions will be matched.
  159. #{ name = "ansi_term", version = "=0.11.0" },
  160. #
  161. # Wrapper crates can optionally be specified to allow the crate when it
  162. # is a direct dependency of the otherwise banned crate
  163. #{ name = "ansi_term", version = "=0.11.0", wrappers = [] },
  164. ]
  165. # Certain crates/versions that will be skipped when doing duplicate detection.
  166. skip = [
  167. #{ name = "ansi_term", version = "=0.11.0" },
  168. ]
  169. # Similarly to `skip` allows you to skip certain crates during duplicate
  170. # detection. Unlike skip, it also includes the entire tree of transitive
  171. # dependencies starting at the specified crate, up to a certain depth, which is
  172. # by default infinite
  173. skip-tree = [
  174. #{ name = "ansi_term", version = "=0.11.0", depth = 20 },
  175. ]
  176. # This section is considered when running `cargo deny check sources`.
  177. # More documentation about the 'sources' section can be found here:
  178. # https://embarkstudios.github.io/cargo-deny/checks/sources/cfg.html
  179. [sources]
  180. # Lint level for what to happen when a crate from a crate registry that is not
  181. # in the allow list is encountered
  182. unknown-registry = "warn"
  183. # Lint level for what to happen when a crate from a git repository that is not
  184. # in the allow list is encountered
  185. unknown-git = "warn"
  186. # List of URLs for allowed crate registries. Defaults to the crates.io index
  187. # if not specified. If it is specified but empty, no registries are allowed.
  188. allow-registry = ["https://github.com/rust-lang/crates.io-index"]
  189. # List of URLs for allowed Git repositories
  190. allow-git = []
  191. [sources.allow-org]
  192. # 1 or more github.com organizations to allow git sources for
  193. #github = [""]
  194. # 1 or more gitlab.com organizations to allow git sources for
  195. #gitlab = [""]
  196. # 1 or more bitbucket.org organizations to allow git sources for
  197. #bitbucket = [""]