AI-generated analysisPublished automatically and not human-verified. Validated context appears in community notes below.
← Watch feed
Informational 15 Bitcoin

Merge bitcoin/bitcoin#37040: test: fix private key check in wallet_listdescriptors.py

Public commit record

What the developer wrote

Authored by merge-script

96/100 · Strong
Merge bitcoin/bitcoin#37040: test: fix private key check in wallet_listdescriptors.py

28a77a4b0afa41d1054f5fa2d1abe7b613214f2d test: fix private key check in wallet_listdescriptors.py (Sebastian Falbesoner)

Pull request description:

The `listdescriptors` RPC test checks that no private keys are revealed with `private=false`, but it iterates over the result dict's keys instead of the descriptors, so it can never fail. This PR fixes that by checking each descriptor's desc field.

ACKs for top commit:
maflcko:
tested lgtm ACK 28a77a4b0afa41d1054f5fa2d1abe7b613214f2d

Tree-SHA512: dd10fffda4c8e20553bba80175beed9ea7a475029f80dd5ef6e36cb23ace484acfb80bc28fbf8639518a873e9c7729b839ff752ca46f687e7c2c6efdb4e5e564
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification✓ Links an issue, advisory, or supporting reference✓ Names security-relevant behavior explicitly
The short version

What changed, and why it matters

This commit fixes a bug in a Bitcoin Core test script. The test was supposed to check that the listdescriptors command does not leak private keys when private=false, but it was checking the wrong thing—so the test would always pass even if a private key appeared. The fix makes the test inspect the actual descriptor strings. This is only a test-code correction; the underlying wallet behavior is unchanged and there is no indication that private keys were actually being leaked.

Recommended action

No security action required. Treat as a normal test-quality improvement. If backporting, include only for test correctness; the production wallet code is unaffected.

Security signals we found

01

Test-only fix

02

Corrects a vacuously-true assertion

03

No change to wallet/RPC implementation

04

No evidence of actual private-key leakage

Risk score

Why this scored 15/100

Our methodology →
Potential impact 0/30
Exploitability 0/25
Stealth signal 0/15
Affected reach 0/15
Confidence 10/10
Evidence quality 5/5
Human-validated context

Community notes

Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.

No validated notes yet.

The AI analysis stands alone for now. Submit a note if you can add evidence or important context.