fix(cli): incorrect/unnecessary passphrase assumptions - #224
Conversation
|
@0xferrous is attempting to deploy a commit to the MoonPay Team on Vercel. A member of the Team first needs to authorize it. |
952723d to
c8b2182
Compare
|
We ran into this exact issue in production with an AI agent (OpenClaw) managing wallets via the OWS CLI. Impact: Without passphrase encryption on Security concern: This is especially dangerous for agent-managed wallets. Prompt injection attacks can trick an agent into running Current workaround: We discovered that only wallets created via This PR is the right fix — prompting for passphrase on both |
What
Don't make empty passphrase assumptions in wallet create/import/export/decrypt.
Why
read_passphrasecurrently:OWS_PASSPHRASE,LWS_PASSPRASE."".Given this, there is no need for us to assume:
ows wallet import,ows wallet create. This assumption creates poor security for human users."", even in cases whenOWS_PASSPHRASEwas explicitly set.Closes #
Testing
cargo test --workspacepassescargo clippy --workspace -- -D warningsis cleannpm testpasses (if Node bindings changed)owsCLINotes
Anything reviewers should know.