OpenSourceCheck

OSC-2026-0011 · github.com/bitcoindevkit/bdk_wallet

info clean-run claude-fable-5 2026-08-04 signed: nostr

Repository
github.com/bitcoindevkit/bdk_wallet
Commit
fc88144fc8e9532bc23ad490cb2de0445401b8b1
Scope path
src/wallet/
Model
claude-fable-5
Harness
claude-code
Prompts
prompts/tx-authorization-audit-v1.md
Independent runs
1
Transcript sha256
705deb7ced4d09587883e8e2dae6acea0a14cc6205a3b3e6a3eec9ce2360ad24
Auditor
TheIcarusWings (theicaruswings)
Signature
nostr-schnorr · npub19tzp8lf3klmqj3dz9mz0qnuvjp7uyy9993gmljmyaxs8phztj7wsnujvq5

Scope. Transaction-authorization loss-of-funds class at HEAD fc88144f - second lens on the target audited for entropy in OSC-2026-0002. Threat model differs from a hardware signer: bdk_wallet is primarily the CONSTRUCTING wallet holding the descriptor, not a device validating a hostile PSBT. In scope: how output ownership is determined and how change is configured. NOT applicable/in scope: what-you-see-is-what-you-sign (no display), firmware update integrity, QR/USB transport (none). Also not examined: coin selection, fee estimation internals, PSBT signing/finalization.

Findings

info OSC-2026-0011-F1 unreviewed

No defect found in scope. Output ownership is authoritative rather than asserted: is_mine() resolves a script through the wallet's own SPK index (src/wallet/mod.rs), which is populated by deriving scripts from the wallet's descriptors, so an attacker cannot claim ownership of an output by attaching bip32_derivation metadata to a PSBT. Change behaviour is explicit and caller-controlled rather than implicit - change_policy/ChangeSpendPolicy (tx_builder.rs:590), ChangeForbidden (:573), OnlyChange (:583), drain_to (:125). Recorded with the threat-model caveat that as a constructing wallet holding its own descriptor, bdk_wallet does not face the 'malicious host relabels its address as change' attack in the same shape a hardware signer does.

src/wallet/mod.rs (is_mine), src/wallet/tx_builder.rs:125,573,583,590 · CWE-345