deny.toml 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313
  1. [bans]
  2. multiple-versions = "deny"
  3. # Try to avoid exemptions for duplicate dependencies! Duplicate dependencies
  4. # slow down compilation, bloat the binary, and tickle race conditions in `cargo
  5. # doc` (see rust-lang/cargo#3613).
  6. #
  7. # If possible, submit PRs upstream to remove duplicated transitive dependencies.
  8. # You can use patch directives in the root Cargo.toml to point at a
  9. # Materialize-maintained fork that avoids the duplicated transitive
  10. # dependencies.
  11. skip = [
  12. # arrayvec had a significant API change in 0.7
  13. { name = "arrayvec", version = "0.5.2" },
  14. # One-time exception for base64 due to its prevalence in the crate graph.
  15. { name = "base64", version = "0.13.1" },
  16. { name = "base64", version = "0.21.5" },
  17. # `syn` is a core crate that a huge part of the ecosystem either directly, or
  18. # transitively depends on. They just released v2.0 which not all crates have
  19. # migrated to yet.
  20. { name = "syn", version = "1.0.107" },
  21. # `tokio` depends on a newer version of socket2, we are okay with _temporarily_
  22. # allowing these duplicate dependencies until the rest of the ecosystem catches
  23. # up.
  24. { name = "socket2", version = "0.4.9" },
  25. # held back by regex 1.7.0 depended on by arrow-string and bindgen
  26. { name = "regex-syntax", version = "0.6.28" },
  27. # held back by thrift 0.17.0 depended on by parquet 51.0.0
  28. { name = "ordered-float", version = "2.10.1" },
  29. { name = "ordered-float", version = "4.6.0" },
  30. # held back by 'ciborium' which is depended on by 'criterion'
  31. { name = "half", version = "1.6.0" },
  32. { name = "windows-targets", version = "0.48.0" },
  33. { name = "windows-sys", version = "0.48.0" },
  34. { name = "windows_aarch64_gnullvm", version = "0.48.0" },
  35. { name = "windows_aarch64_msvc", version = "0.48.0" },
  36. { name = "windows_i686_gnu", version = "0.48.0" },
  37. { name = "windows_i686_msvc", version = "0.48.0" },
  38. { name = "windows_x86_64_gnullvm", version = "0.48.0" },
  39. { name = "windows_x86_64_gnu", version = "0.48.0" },
  40. { name = "windows_x86_64_msvc", version = "0.48.0" },
  41. { name = "windows-sys", version = "0.52.0" },
  42. # Newer versions of crates like `tempfile` are held back by crates like `atty`.
  43. # This is very Unfortunate as we don't actually use these platforms.
  44. { name = "redox_syscall", version = "0.2.10" },
  45. { name = "redox_syscall", version = "0.4.1" },
  46. # Will require updating many crates
  47. { name = "indexmap", version = "1.9.1" },
  48. # Required by indexmap 1.9.1, which is depended on by many things
  49. { name = "hashbrown", version = "0.12.3" },
  50. { name = "hashbrown", version = "0.14.5" },
  51. # Had to update `tower-http` to `0.4.3` to fix the `base64` duplicate version
  52. # but this introduced a new dependency on `bitflags 2.3.3` but all the rest of
  53. # our crates use `bitflags 1.3.2`
  54. # TODO: fork `tower-http` and swap to use older bitflags
  55. { name = "bitflags", version = "1.3.2" },
  56. # TODO(parkmycar): In a followup/stacked PR, get rid of these duplicates.
  57. { name = "regex-automata", version = "0.1.9" },
  58. # TODO: Required for Rust nightly upgrade
  59. { name = "http", version = "0.2.9" },
  60. # TODO: Required for Rust nightly upgrade
  61. { name = "http-body", version = "0.4.5" },
  62. # There are many external crates that rely on 0.10.5. Upgrading them should
  63. # be its own PR.
  64. { name = "itertools", version = "0.10.5" },
  65. # A few crates -> `num_enum_derive` -> `proc-macro-crate` -> `toml_edit v0.19.14`.
  66. { name = "toml_edit", version = "0.19.14" },
  67. { name = "winnow", version = "0.5.4" },
  68. # There are some crates in our dependency tree that have yet to upgrade to
  69. # `hyper 1.*`. As of now these are:
  70. # * `aws-config`
  71. # * `aws-smithy-runtime`
  72. # * `eventsource-client`
  73. # * `launchdarkly-server-sdk`
  74. # Until they upgrade we'll need to duplicate some related hyper deps.
  75. { name = "hyper", version = "0.14.27" },
  76. { name = "h2", version = "0.3.26" },
  77. { name = "hyper-tls", version = "0.5.0" },
  78. { name = "hyper-timeout", version = "0.4.1" },
  79. { name = "tungstenite", version = "0.24.0" },
  80. { name = "tokio-tungstenite", version = "0.24.0" },
  81. # `axum 0.7.5` depends on both `sync_wrapper 1.*` and `axum-core 0.4.3`.
  82. # The latter depends on `sync_wrapper 0.1.*`.
  83. { name = "sync_wrapper", version = "0.1.2" },
  84. { name = "memmap2", version = "0.5.4" },
  85. { name = "wasi", version = "0.9.0+wasi-snapshot-preview1" },
  86. { name = "wasi", version = "0.11.0+wasi-snapshot-preview1" },
  87. { name = "async-channel", version = "1.9.0" },
  88. { name = "event-listener", version = "2.5.3" },
  89. { name = "fastrand", version = "1.9.0" },
  90. { name = "futures-lite", version = "1.13.0" },
  91. { name = "getrandom", version = "0.1.16" },
  92. { name = "getrandom", version = "0.2.10" },
  93. { name = "rand", version = "0.7.3" },
  94. { name = "rand", version = "0.8.5" },
  95. { name = "rand_chacha", version = "0.2.2" },
  96. { name = "rand_chacha", version = "0.3.0" },
  97. { name = "rand_core", version = "0.5.1" },
  98. { name = "rand_core", version = "0.6.2" },
  99. { name = "reqwest", version = "0.11.24" },
  100. { name = "rustls-pemfile", version = "1.0.4" },
  101. # Used by reqwest
  102. { name = "system-configuration", version = "0.5.1" },
  103. { name = "system-configuration-sys", version = "0.5.0" },
  104. { name = "thiserror", version = "1.0.61" },
  105. { name = "thiserror-impl", version = "1.0.61" },
  106. { name = "twox-hash", version = "1.6.3" },
  107. { name = "unicode-width", version = "0.1.10" },
  108. # Used by rdkafka-sys
  109. { name = "num_enum", version = "0.5.11" },
  110. { name = "num_enum_derive", version = "0.5.11" },
  111. # Used by protobuf-parse
  112. { name = "which", version = "4.4.2" },
  113. # Used by tempfile
  114. { name = "linux-raw-sys", version = "0.9.2" },
  115. { name = "rustix", version = "0.38.44" },
  116. # Used by axum
  117. { name = "tower", version = "0.4.13" },
  118. # Used by tracing-capture
  119. { name = "predicates", version = "2.1.5" },
  120. # Used by launchdarkly-server-sdk (via moka)
  121. { name = "windows-result", version = "0.2.0" },
  122. { name = "windows-strings", version = "0.1.0" },
  123. { name = "windows-targets", version = "0.52.6" },
  124. { name = "windows_aarch64_gnullvm", version = "0.52.6" },
  125. { name = "windows_aarch64_msvc", version = "0.52.6" },
  126. { name = "windows_i686_gnu", version = "0.52.6" },
  127. { name = "windows_i686_gnullvm", version = "0.52.6" },
  128. { name = "windows_i686_msvc", version = "0.52.6" },
  129. { name = "windows_x86_64_gnu", version = "0.52.6" },
  130. { name = "windows_x86_64_gnullvm", version = "0.52.6" },
  131. { name = "windows_x86_64_msvc", version = "0.52.6" },
  132. # Used by aws-config
  133. { name = "aws-smithy-http", version = "0.60.10" },
  134. # Used by aws-sdk-s3
  135. { name = "lru", version = "0.12.5" },
  136. # Used by tower-lsp
  137. { name = "dashmap", version = "5.5.3" },
  138. # Used by bindgen
  139. { name = "itertools", version = "0.12.1" },
  140. { name = "itertools", version = "0.13.0" },
  141. # Used by pprof
  142. { name = "nix", version = "0.26.4" },
  143. # Used by dynfmt
  144. { name = "erased-serde", version = "0.3.26" },
  145. ]
  146. [[bans.deny]]
  147. crate = "crossbeam-channel@0.5.14"
  148. reason = "memory corruption, https://github.com/MaterializeInc/database-issues/issues/9091"
  149. # Use `tracing` instead.
  150. [[bans.deny]]
  151. name = "env_logger"
  152. # Use `md-5` instead, which is part of the RustCrypto ecosystem.
  153. [[bans.deny]]
  154. name = "md5"
  155. # Use `sha1` instead, which the RustCrypto ecosystem recently took control of.
  156. # `sha-1` is the older and now deprecated name.
  157. [[bans.deny]]
  158. name = "sha-1"
  159. # Use `prost` or `protobuf-native` instead.
  160. [[bans.deny]]
  161. name = "protobuf"
  162. wrappers = ["protobuf-parse"]
  163. # Strum has suspect code quality and includes many unneeded features. Use
  164. # more targeted enum macro crates, e.g. `enum-kinds`.
  165. [[bans.deny]]
  166. name = "strum"
  167. [[bans.deny]]
  168. name = "strum-macros"
  169. [[bans.deny]]
  170. name = "log"
  171. wrappers = [
  172. "azure_svc_blobstorage",
  173. "buildid",
  174. "cookie_store",
  175. "deadpool-postgres",
  176. "eventsource-client",
  177. "fail",
  178. "generator",
  179. "globset",
  180. "launchdarkly-server-sdk",
  181. "launchdarkly-server-sdk-evaluation",
  182. "native-tls",
  183. "os_info",
  184. "postgres",
  185. "pprof",
  186. "prost-build",
  187. "protobuf-parse",
  188. # TODO(guswynn): switch to tracing in rdkafka
  189. "rdkafka",
  190. "reqwest",
  191. "tokio-postgres",
  192. "tokio-tungstenite",
  193. "tracing-log",
  194. "tracing",
  195. "tungstenite",
  196. "want",
  197. "wasm-bindgen-backend",
  198. "workspace-hack",
  199. ]
  200. # We prefer the system's native TLS or OpenSSL to Rustls, since they are more
  201. # mature and more widely used.
  202. [[bans.deny]]
  203. name = "rustls"
  204. # once_cell is going to be added to std, and doesn't use macros
  205. # Unfortunately, its heavily used, so we have lots of exceptions.
  206. [[bans.deny]]
  207. name = "lazy_static"
  208. wrappers = [
  209. "bindgen",
  210. "dynfmt",
  211. "findshlibs",
  212. "launchdarkly-server-sdk",
  213. "launchdarkly-server-sdk-evaluation",
  214. "prometheus",
  215. "proptest",
  216. "rayon-core",
  217. "schannel",
  218. "sharded-slab",
  219. ]
  220. # The `uncased` crate serves the same purpose as `unicase` and is more
  221. # actively maintained.
  222. [[bans.deny]]
  223. name = "unicase"
  224. wrappers = [
  225. "mime_guess",
  226. ]
  227. # We shouldn't manually vendor `protoc`, instead rely on it through `mz-build-tools`.
  228. [[bans.deny]]
  229. name = "protobuf-src"
  230. wrappers = [
  231. "mz-build-tools",
  232. "protobuf-native",
  233. ]
  234. [advisories]
  235. version = 2
  236. ignore = [
  237. # Consider `encoding_rs` instead of `encoding` (unmaintained)
  238. "RUSTSEC-2021-0153",
  239. # proc-macro-error is unmaintained, possible alternative: proc-macro-error2
  240. "RUSTSEC-2024-0370",
  241. # `derivative` is unmaintained; consider using an alternative (unmaintained)
  242. "RUSTSEC-2024-0388",
  243. # `instant` is unmaintained, and the author recommends using the maintained [`web-time`] crate instead.
  244. "RUSTSEC-2024-0384",
  245. # The creator of the crate `paste` has stated in the [`README.md`](https://github.com/dtolnay/paste/blob/master/README.md) that this project is not longer maintained as well as archived the repository
  246. "RUSTSEC-2024-0436",
  247. ]
  248. # Must be manually kept in sync with about.toml.
  249. # See: https://github.com/EmbarkStudios/cargo-about/issues/201
  250. [licenses]
  251. version = 2
  252. allow = [
  253. "Apache-2.0",
  254. "Apache-2.0 WITH LLVM-exception",
  255. "CC0-1.0",
  256. "0BSD",
  257. "BSD-2-Clause",
  258. "BSD-3-Clause",
  259. "ICU",
  260. "ISC",
  261. "MIT",
  262. "MPL-2.0",
  263. "Zlib",
  264. "Unicode-3.0",
  265. ]
  266. # copyleft is denied by default
  267. private = { ignore = true }
  268. [[licenses.clarify]]
  269. name = "ring"
  270. expression = "ISC"
  271. license-files = [
  272. { path = "LICENSE", hash = 0xbd0eed23 }
  273. ]
  274. [sources]
  275. unknown-git = "deny"
  276. unknown-registry = "deny"
  277. # Do not allow non-MaterializeInc Git repositories here! Git repositories must
  278. # be owned by the MaterializeInc organization so that maintainership is shared
  279. # amongst Materialize employees and so that historical versions of Materialize
  280. # remain buildable even if upstream Git repositories disappear. If you don't
  281. # have permissions to create a fork in the MaterializeInc organization, ask in
  282. # #eng-infra on Slack.
  283. allow-org = { github = ["MaterializeInc"] }