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.

206 lines
9.1 KiB

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