[graph]
targets = [
    { triple = "x86_64-unknown-linux-gnu" },
    { triple = "aarch64-unknown-linux-gnu" },
    { triple = "x86_64-apple-darwin" },
    { triple = "aarch64-apple-darwin" },
]

[advisories]
version = 2
db-path = "~/.cargo/advisory-db"
db-urls = ["https://github.com/rustsec/advisory-db"]
ignore = [
    # RSA key extraction "Marvin Attack". This is only relevant when using
    # PKCS#1 v1.5 encryption, which we don't
    "RUSTSEC-2023-0071",

    # `paste`, as used by `aws-lc-rs` is unmaintained, but we're not concerned
    # about it having a security vulnerability
    "RUSTSEC-2024-0436",
]

[licenses]
version = 2
allow = [
    "0BSD",
    "AGPL-3.0",
    "Apache-2.0 WITH LLVM-exception",
    "Apache-2.0",
    "BSD-2-Clause",
    "BSD-3-Clause",
    "ISC",
    "MIT",
    "MPL-2.0",
    "OpenSSL",
    "Unicode-3.0",
    "Zlib",
]

# Ring's license is a bit complicated, so we need to specify it manually
[[licenses.clarify]]
name = "ring"
version = "*"
expression = "MIT AND ISC AND OpenSSL"
license-files = [{ path = "LICENSE", hash = 0xbd0eed23 }]

[bans]
# List of crates to deny
deny = [
    # We should never depend on openssl
    { name = "openssl" },
    { name = "openssl-sys" },
    { name = "native-tls" },
]

# We try to avoid duplicating crates and track exceptions here
multiple-versions = "deny"

skip = [
    { name = "base64", version = "0.21.7" },         # many dependencies depends on this old version
    { name = "regex-syntax", version = "0.6.29" },   # tracing-subscriber[env-filter] -> matchers depends on the old version
    { name = "regex-automata", version = "0.1.10" }, # ^
    { name = "itertools", version = "0.13.0" },      # zxcvbn depends on this old version
    { name = "indexmap", version = "1.9.3" },        # schemars depends on this old version
    { name = "hashbrown", version = "0.12.3" },      # schemars -> indexmap depends on this old version
    { name = "hashbrown", version = "0.14.5" },      # a few crates depend on this old version
    # a few dependencies depend on the 1.x version of thiserror
    { name = "thiserror", version = "1.0.69" },
    { name = "thiserror-impl", version = "1.0.69" },
    # axum-macros, sqlx-macros and sea-query-attr use an old version
    { name = "heck", version = "0.4.1" },
    # wasmtime -> cranelift is depending on this old version
    { name = "itertools", version = "0.12.1" },
    # pad depends on an old version
    { name = "unicode-width", version = "0.1.14" },
    { name = "zerocopy", version = "0.7.35" },      # hashbrown 0.14.5 depends on this old version

    # We are still mainly using rand 0.8
    { name = "rand", version = "0.8.5" },
    { name = "rand_chacha", version = "0.3.1" },
    { name = "rand_core", version = "0.6.4" },
    { name = "getrandom", version = "0.2.15" },
]

skip-tree = []

# We should never enable the (default) `oldtime` feature of `chrono`
[[bans.features]]
name = "chrono"
deny = ["oldtime"]

[sources]
unknown-registry = "warn"
unknown-git = "warn"
allow-registry = ["https://github.com/rust-lang/crates.io-index"]
