# cargo-deny configuration for omendb
# https://embarkstudios.github.io/cargo-deny/

[graph]
targets = [
    "x86_64-unknown-linux-gnu",
    "aarch64-unknown-linux-gnu",
    "x86_64-apple-darwin",
    "aarch64-apple-darwin",
]
all-features = true

[output]
feature-depth = 1

# =============================================================================
# Advisories - check for known security vulnerabilities
# =============================================================================
[advisories]
ignore = []

# =============================================================================
# Licenses - ensure all dependencies use acceptable licenses
# =============================================================================
[licenses]
allow = [
    "MIT",
    "Apache-2.0",
    "Apache-2.0 WITH LLVM-exception",
    "Elastic-2.0",
    "BSD-2-Clause",
    "BSD-3-Clause",
    "BSL-1.0",
    "Zlib",
    "Unicode-3.0",
]
confidence-threshold = 0.8

# Ring has a complex license situation
[[licenses.clarify]]
crate = "ring"
expression = "MIT AND ISC AND OpenSSL"
license-files = [{ path = "LICENSE", hash = 0xbd0eed23 }]

[licenses.private]
ignore = true

# =============================================================================
# Bans - prevent unwanted dependencies
# =============================================================================
[bans]
multiple-versions = "warn"
wildcards = "allow"
highlight = "all"
workspace-default-features = "allow"
external-default-features = "allow"

deny = [
    { crate = "openssl", reason = "Prefer rustls for TLS" },
    { crate = "openssl-sys", reason = "Prefer rustls for TLS" },
]

skip = []
skip-tree = []

# =============================================================================
# Sources - ensure dependencies come from trusted sources
# =============================================================================
[sources]
unknown-registry = "deny"
unknown-git = "warn"
allow-registry = ["https://github.com/rust-lang/crates.io-index"]
allow-git = []
