-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathclippy.toml
More file actions
37 lines (33 loc) · 1.74 KB
/
Copy pathclippy.toml
File metadata and controls
37 lines (33 loc) · 1.74 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
# Project-wide clippy configuration. See docs/AGENTIC-ENGINEERING.md §2.
# Keep clippy's API suggestions within what the pinned toolchain supports.
msrv = "1.95.0"
# These pair with deckard-core's crate-level restriction lints (unwrap_used/expect_used/panic, denied
# in its lib.rs): production code must not unwrap/expect/panic, but test code may freely. Without these
# keys the deny would also fire inside #[cfg(test)].
allow-unwrap-in-tests = true
allow-expect-in-tests = true
allow-panic-in-tests = true
allow-indexing-slicing-in-tests = true # tamper tests index byte offsets on purpose
# Crypto / Ethereum jargon that would otherwise trip clippy::doc_markdown. ".." keeps clippy's
# built-in default identifier list (GitHub, OAuth, ...) and extends it.
doc-valid-idents = [
"..",
"BIP-39",
"BIP-32",
"EIP-1559",
"ERC-20",
"XChaCha20",
"Argon2id",
"ChaCha20-Poly1305",
"secp256k1",
"keccak",
"Multicall3",
]
# Wallet-specific footguns, banned by construction (both are unused today, so zero migration cost).
disallowed-methods = [
{ path = "std::mem::forget", reason = "skips Drop, so skips zeroize scrubbing of key material; use drop()" },
{ path = "core::mem::forget", reason = "same as std::mem::forget (re-export) — skips zeroize scrubbing; use drop()" },
{ path = "rand::thread_rng", reason = "use OsRng for anything key-derived (keystore.rs already does)" },
{ path = "rand::RngCore::fill_bytes", reason = "panics if the OS CSPRNG fails; in deckard-core use keystore::fill_secure() (try_fill_bytes) and propagate the error" },
{ path = "rand::seq::SliceRandom::shuffle", reason = "calls fill_bytes internally (latent panic on CSPRNG failure); use a try_fill_bytes-based selection instead" },
]