Repository navigation
Expand file tree
/
Copy pathdeny.toml
More file actions
147 lines (141 loc) · 7.46 KB
/
Copy pathdeny.toml
File metadata and controls
147 lines (141 loc) · 7.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
# cargo-deny configuration -- supply chain policy for rustock.
#
# Run locally with: cargo deny check
# CI runs the same checks on every push/PR and on a daily schedule, so that
# advisories published against already-pinned dependencies are caught even when
# nobody touches the code.
[graph]
targets = [
"x86_64-unknown-linux-gnu",
"aarch64-unknown-linux-gnu",
"x86_64-apple-darwin",
"aarch64-apple-darwin",
]
all-features = false
# ---------------------------------------------------------------------------
# Security advisories (RustSec)
# ---------------------------------------------------------------------------
[advisories]
version = 2
# Refuse to build against a version that has been pulled from crates.io. This
# caught keccak 0.1.5, a yanked release of the Keccak-256 implementation behind
# every hash in the node.
yanked = "deny"
ignore = [
# paste -- unmaintained. Transitive only: pulled in by the ark-* crates
# behind revm's BN254/BLS12-381 precompiles. Not replaceable from here, and
# unmaintained is not the same as vulnerable. Kept as an explicit entry
# rather than relaxing the unmaintained policy, so that a NEW unmaintained
# crate still fails CI and forces a deliberate decision.
{ id = "RUSTSEC-2024-0436", reason = "paste, unmaintained; transitive via ark-* under revm precompiles" },
# pin-utils -- unmaintained; the upstream repository was archived on
# 2026-10-01, after its final release. There is no patched version to
# move to: the advisory lists `patched = []`, so 0.1.1 is flagged exactly
# as 0.1.0 is, and `cargo update` cannot resolve it.
#
# Transitive only, and not reachable from here: futures-util and hyper
# pull it in, which arrive through axum, futures and tokio-tungstenite.
# Dropping it is the futures ecosystem's job, not this node's.
#
# The crate is three macros and about 150 lines -- `pin_mut!`,
# `unsafe_pinned!`, `unsafe_unpinned!` -- with no functions, no types and
# no statics. It contributes no runtime code, so "unmaintained" here
# means the macros will not change, which is the one thing that cannot
# rot. `core::pin::pin!` has superseded `pin_mut!` since Rust 1.68 and
# pin-project-lite the other two, so the ecosystem is already moving.
#
# Explicit entry rather than relaxing the unmaintained policy, so a NEW
# unmaintained crate still fails CI and forces a deliberate decision.
{ id = "RUSTSEC-2026-0441", reason = "pin-utils, unmaintained and archived with no patched version; transitive via futures-util and hyper, macros only" },
# crypto-bigint 0.5.5 -- leading-zero counting, division and Montgomery
# multiplication are not constant-time, so an operation on a secret
# integer can leak it through timing. Fixed in 0.7.6, which we cannot
# reach: the version is pinned transitively by revm 36, through
# revm-context-interface -> alloy-eip7702 -> k256 0.13.4 -> ecdsa ->
# elliptic-curve 0.13.8. `cargo update -p crypto-bigint` locks 0 packages.
#
# This entry is NOT a claim that the node is unaffected, because it is
# not. Most of the path is harmless -- revm reaches k256 only to *recover*
# signatures, which is arithmetic on public data, and the `--wallet-file`
# signer uses secp256k1 rather than k256, so no transaction key goes
# through this crate. But the node's own identity key does:
# `networking/src/handshake.rs` performs the RLPx ECDH with it, and
# `networking/src/node.rs` and `cli/src/main.rs` build a SigningKey from
# it. A peer can initiate handshakes and time the replies.
#
# Worst case is therefore disclosure of node.key -- the network identity,
# not funds, not consensus, and not the miner key. A remote timing attack
# on ECDH is a hard thing to actually land, which is why this is an
# ignore and not an incident, but "hard" is not "impossible" and the
# distinction belongs in writing rather than in someone's memory.
#
# The real remedy is #335: move the handshake and node-key operations to
# secp256k1, which this node already depends on and which is Bitcoin
# Core's constant-time implementation. That removes the first-party
# exposure without waiting for revm. Revisit this entry when either lands.
{ id = "RUSTSEC-2026-0387", reason = "crypto-bigint timing variability; pinned by revm 36. Exposure is node.key via RLPx ECDH -- see #335" },
]
# Note on RUSTSEC-2025-0055 (tracing-subscriber 0.2.25, ANSI escape injection)
# and RUSTSEC-2024-0388 (derivative, unmaintained): deliberately NOT ignored. cargo-audit reports it because it scans
# Cargo.lock flatly, but cargo-deny resolves the real build graph and correctly
# does not see it -- the crate is never compiled. It arrives via ark-relations
# 0.5.1 <- ark-r1cs-std 0.5.0 (which hard-pins ark-relations ^0.5.0) <-
# ark-bn254 <- revm-precompile, a path that is not built. The node's own logging
# uses tracing-subscriber 0.3.x, which is patched. Adding an ignore entry would
# only produce an "advisory was not encountered" warning.
# ---------------------------------------------------------------------------
# Where code is allowed to come from
# ---------------------------------------------------------------------------
# This is the core supply chain control: every dependency must come from
# crates.io, whose published versions are immutable. Combined with the checksums
# in Cargo.lock, a compromised maintainer cannot alter a version we already
# depend on -- they would have to publish a new one, which the lockfile will not
# pick up until someone deliberately runs `cargo update`.
[sources]
unknown-registry = "deny"
unknown-git = "deny"
allow-registry = ["https://github.com/rust-lang/crates.io-index"]
allow-git = []
# ---------------------------------------------------------------------------
# Bans and duplicate versions
# ---------------------------------------------------------------------------
[bans]
# Every duplicated crate is another maintainer to trust and another advisory to
# track. Kept at "warn" because the transitive tree still carries legitimate
# duplicates (ark-* 0.3/0.4/0.5/0.6, syn 1/2) that we do not control. Direct
# dependencies should always be consolidated -- prefer [workspace.dependencies]
# so two crates cannot silently pin different versions, as sync and storage did
# with lru 0.12 and 0.16.
multiple-versions = "warn"
# A wildcard version means "whatever is newest", which defeats the point of
# pinning.
wildcards = "deny"
deny = []
# ---------------------------------------------------------------------------
# Licenses
# ---------------------------------------------------------------------------
[licenses]
version = 2
confidence-threshold = 0.8
allow = [
"Apache-2.0", # 188 crates
"MIT", # 252 crates
"BSD-2-Clause",
"BSD-3-Clause",
"BSL-1.0",
"CC0-1.0",
"ISC",
"MITNFA", # hex_lit, via bitcoin: MIT + no-false-attribs
"Unicode-3.0",
"Unlicense",
"Zlib",
# webpki-roots, which carries Mozilla's CA bundle, under the optional
# `smtp` feature only. CDLA-Permissive-2.0 is a permissive data licence
# with no copyleft or attribution burden; it covers the certificate data,
# not code. A default build does not pull it in.
"CDLA-Permissive-2.0",
# quoted_printable, via lettre, under the optional `smtp` feature only.
# 0BSD is the BSD licence with the attribution clause removed -- OSI
# approved, no conditions at all. A default build does not pull it in.
"0BSD",
]