qt: filter addhdkey from RPC console history #955

pull mateusz-klatt wants to merge 1 commits into bitcoin-core:master from mateusz-klatt:qt-addhdkey-history-filter changing 2 files +3 −0
  1. mateusz-klatt commented at 8:52 PM on July 31, 2026: none

    Filters addhdkey arguments from RPC console history, consistent with other RPCs that handle private key material.

    This prevents extended private keys from being retained in history. It also covers the mnemonic and passphrase inputs proposed in bitcoin/bitcoin#35857.

    Adds a parser test verifying that the arguments are redacted.

    Motivation

    addhdkey accepts a BIP 32 extended private key, but its arguments are currently retained in RPC console history, unlike other RPCs that handle private key material.

    The same filter would also protect the mnemonic and passphrase inputs proposed in bitcoin/bitcoin#35857.

    Changes

    • Add addhdkey to the RPC console sensitive-command filter.
    • Add a parser test verifying that its arguments are redacted as addhdkey(…).

    Tests

    • ./build_gui/bin/test_bitcoin-qt — all tests passed, including RPCNestedTests::rpcNestedTests().
  2. DrahtBot commented at 8:53 PM on July 31, 2026: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline and AI policy for information on the review process. A summary of reviews will appear here.

    <!--5faf32d7da4f0f540f40219e4f7537a3-->

  3. qt: filter addhdkey from RPC console history
    The addhdkey RPC accepts a BIP 32 extended private key, but it was not
    added to the RPC console sensitive-command filter when introduced. As
    a result, the key remains visible in console history.
    
    Add addhdkey to the filter and cover it in rpcnestedtests.
    31467d59a5
  4. mateusz-klatt force-pushed on Aug 1, 2026
  5. mateusz-klatt requested review from Copilot on Aug 1, 2026
  6. ?
    copilot_work_started mateusz-klatt
  7. Copilot commented at 7:58 AM on August 1, 2026: none

    Pull request overview

    This PR updates the Qt RPC console’s command-history redaction to treat addhdkey as a sensitive command, preventing extended private key material (and future mnemonic/passphrase inputs) from being retained in console history.

    Changes:

    • Add addhdkey to the Qt RPC console historyFilter sensitive-command list.
    • Extend RPCNestedTests to assert addhdkey arguments are redacted to addhdkey(…).

    Reviewed changes

    Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

    File Description
    src/qt/rpcconsole.cpp Adds addhdkey to the sensitive RPC history filter to redact its arguments in console history.
    src/qt/test/rpcnestedtests.cpp Adds a test case verifying addhdkey command-line parsing produces a redacted history entry.

    💡 <a href="/bitcoin-core/gui/new/master?filename=.github/instructions/*.instructions.md" class="Link--inTextBlock" target="_blank" rel="noopener noreferrer">Add Copilot custom instructions</a> for smarter, more guided reviews. <a href="https://docs.github.com/en/copilot/customizing-copilot/adding-repository-custom-instructions-for-github-copilot" class="Link--inTextBlock" target="_blank" rel="noopener noreferrer">Learn how to get started</a>.


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin-core/gui. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-08-09 05:20 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me