Wallet config file is saved with default permissions

Aperta
#331 0 commenti 0 reazioni 1 assegnatario Vedi su GitHub

@tvpeter ci sta già lavorando.

Dal 21/9/2026.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

bug

Describe the bug
The app wallet config command saves wallet configuration into config.toml using default directory permissions. As a result, the plaintext keys are readable, allowing any other local user or process on the host to be able to read the content of the file. A user reading it would reasonably expect the file to be user-only similar to bitcoind's cookie and LND macaroons.

To Reproduce

On a system with the common default :

  • Generate a key and build a secret descriptor via the documented flow (key generate to xprv/tprv, then descriptor).
  • Save a wallet config containing that secret descriptor:
  • bdk-cli wallet -w test config -e "wpkh(…/84'/1'/0'/0/)" -i "wpkh(…/84'/1'/0'/1/)"
  • Inspect the resulting permissions

Expected behavior

The application should enforce strict, user-only permissions for sensitive key-bearing files, matching standard security practices.

Build environment

  • BDK-CLI tag/commit: v4.0.0 5b3cb00
  • OS+version: macOS 26.6.2
  • Rust/Cargo version: 1.98.1
  • Rust/Cargo target:
Lingua principale
Rust
Stelle
142
Fork
99
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di bitcoindevkit/bdk-cli

Tutte le issue di bitcoindevkit/bdk-cli

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.