Files
rustfs/deny.toml
T
Chris An c3f2636c6b fix(security): drop expired rsa 0.9.10 advisory exception (#9678)
openidconnect 4.1.0 is the only consumer of rsa 0.9.10 and has no
released rsa 0.10 build. Vendor that crate, retarget JWS verification
to rsa 0.10, and remove the exception that expired on 2026-07-31.

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Chris An <overtrue@users.noreply.github.com>
2026-11-27 21:27:55 +08:00

134 lines
5.8 KiB
TOML

# cargo-deny configuration
#
# Run with `cargo deny check` (advisories, sources, bans, licenses).
# Schema: https://embarkstudios.github.io/cargo-deny/checks/cfg.html
#
# This file codifies what was previously implicit policy:
# - which RustSec advisories we knowingly accept and why,
# - which non-crates.io sources we trust,
# - which duplicate crate versions we tolerate vs. flag.
#
# When adding a non-advisory exception, include an `# owner: <github-handle> review: <yyyy-mm>`
# comment so future audits know who signed off and when to revisit.
# Advisory ignores below are machine-enforced against `.config/advisory-exceptions.toml`
# by `scripts/security/check_advisories.py` (rustfs/backlog#2668); both files must match.
[graph]
all-features = true
no-default-features = false
[advisories]
version = 2
yanked = "deny"
ignore = [
# `chrono` is retained only at compatibility boundaries while the project
# migrates its internal time model to jiff. The advisory reports no safe
# upgrade for any chrono release. Tracked in `.config/advisory-exceptions.toml`.
# owner: rustfs-maintainers review: 2026-11
{ id = "RUSTSEC-2026-0543", reason = "chrono is unmaintained; temporary exception during jiff migration" },
# `chrono-tz` is retained by a narrow compatibility path during the same
# migration and has no safe upstream upgrade. Tracked in `.config/advisory-exceptions.toml`.
# owner: rustfs-maintainers review: 2026-11
{ id = "RUSTSEC-2026-0555", reason = "chrono-tz is unmaintained; temporary exception during jiff migration" },
# humantime wraps chrono and is retained transitively while the chrono
# graph is being removed. Tracked in `.config/advisory-exceptions.toml`.
# owner: rustfs-maintainers review: 2026-11
{ id = "RUSTSEC-2026-0542", reason = "humantime is unmaintained through chrono; temporary exception during jiff migration" },
]
[sources]
unknown-registry = "deny"
unknown-git = "deny"
allow-registry = ["https://github.com/rust-lang/crates.io-index"]
allow-git = [
# The reviewed test oracles compare protocol behavior with this pinned s3s source.
# owner: GatewayJ review: 2026-10
"https://github.com/s3s-project/s3s",
# The native S3 gateway packages share one workspace revision.
# owner: rustfs-maintainers review: 2027-01
"https://github.com/rustfs/gateway",
# Completion ownership patch fixed to rustfs/uring#20.
# owner: overtrue review: 2026-10
"https://github.com/rustfs/uring.git",
# NIXL bindings fork pinned for the optional RustFS RDMA transport.
# owner: houseme review: 2027-02
"https://github.com/houseme/nixl",
]
[bans]
# Multiple-versions of the same crate are permitted with a warning so the
# graph remains buildable while we work the chains down. Crypto- and
# transport-sensitive crates are tracked separately below.
multiple-versions = "warn"
wildcards = "warn"
highlight = "all"
# Reviewed source locations for scripts/check_s3s_oracles.py. Each entry still
# requires cfg(test) on the file or on the item using the legacy crate.
# s3s-oracle: crates/e2e_test/src/access_request_validation_test.rs
# s3s-oracle: crates/s3-types/src/compat_s3s.rs
# s3s-oracle: crates/s3-types/src/compat_s3s/call_site_codes.rs
# s3s-oracle: crates/s3-types/src/error/http_response_tests.rs
# s3s-oracle: rustfs/src/admin/router.rs
# s3s-oracle: rustfs/src/auth.rs
# s3s-oracle: rustfs/src/error.rs
# s3s-oracle: rustfs/src/protocols/client.rs
# s3s-oracle: rustfs/src/server/http.rs
# s3s-oracle: rustfs/src/storage/legacy_s3_test_types.rs
# Only the old-stack comparison crates may have direct edges in this graph,
# which includes dev dependencies. check_s3s_footprint.sh separately rejects
# every normal edge, including optional, renamed and transitive dependencies.
deny = [
{ name = "s3s", wrappers = ["e2e_test", "rustfs", "rustfs-s3-types"], reason = "legacy test oracles only" },
{ name = "s3s-sigv4", wrappers = ["e2e_test", "rustfs", "s3s"], reason = "legacy signing oracles only" },
{ name = "s3s-multipart", wrappers = ["s3s"] },
{ name = "s3s-rfc2047", wrappers = ["s3s"] },
{ name = "s3s-sigv2", wrappers = ["s3s"] },
]
# Crates whose duplicate versions are most worth eliminating, because they
# touch crypto, parsing, or networking trust boundaries. Not currently a
# build error — the graph still has duplicates — but tracking the list keeps
# them visible.
[[bans.skip-tree]]
# `windows-sys` notoriously has many old versions in dependency closures;
# don't flood the report with it.
name = "windows-sys"
[licenses]
version = 2
allow = [
"Apache-2.0",
"Apache-2.0 WITH LLVM-exception",
"BSD-2-Clause",
"BSD-3-Clause",
"BSL-1.0", # boost; tracing-related crates
"CC0-1.0",
"CDLA-Permissive-2.0", # webpki / linux-raw-sys metadata
"ISC",
"MIT",
"MIT-0",
"MPL-2.0",
"Unicode-3.0",
"Zlib",
]
confidence-threshold = 0.93
exceptions = [
# `ring` ships a custom license combining ISC, MIT, and an OpenSSL-style
# notice that does not parse cleanly as SPDX OpenSSL.
{ allow = ["ISC", "MIT"], crate = "ring" },
# `inferno` is CDDL-1.0 (copyleft). Used only by profiling tooling
# (pyroscope / jemalloc_pprof) which is opt-in and never linked into the
# default S3 path. Tracked as an exception rather than a blanket allow.
# owner: rustfs-maintainers review: 2026-07
{ allow = ["CDDL-1.0"], crate = "inferno" },
# `libbz2-rs-sys` carries the upstream bzip2-1.0.6 license. It's used
# transitively via `bzip2`. Not on a hot path.
# owner: rustfs-maintainers review: 2026-07
{ allow = ["bzip2-1.0.6"], crate = "libbz2-rs-sys" },
# `aws-lc-fips-sys` declares ISC, Apache-2.0, and the OpenSSL license for
# the FIPS-validated AWS-LC module when the optional `fips` feature is enabled.
# owner: rustfs-maintainers review: 2026-10
{ allow = ["OpenSSL"], crate = "aws-lc-fips-sys" },
]