Wallet config file is saved with default permissions

未关闭
#331 0 条评论 0 个 reaction 已指派 1 人 在 GitHub 查看

@tvpeter 已经在做这个了。

开始于 2026年9月21日。

评估

这个 Issue 还没有评估数据。

描述

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:
主要语言
Rust
星标
142
派生
99
PR 合并指标
30 天内没有已合并 PR

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

bitcoindevkit/bdk-cli 的其他 Issue

查看 bitcoindevkit/bdk-cli 的全部 Issue

相似的 Issue

更多 Rust Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。