Skip to content

Commit c1056ba

Browse files
alphaqiuclaude
andcommitted
fix: secure clipboard, recover command, and first-time user experience
Major security and functionality fixes: 1. **Secure Clipboard (macOS)** - Replace insecure pbcopy subprocess with arboard crate - arboard uses NSPasteboard API directly (no subprocess exposure) - Fixes security vulnerability: passwords no longer visible via ps/procfs - Implement auto-clear after timeout (30s macOS, 45s Linux) 2. **Recover Command Fix** - Add initialize_with_wrapped_passkey() to CryptoManager - Store KDF nonce in wrapped_passkey for proper recovery - Fix unlock_keystore() to check wrapped_passkey first - New password now works after recover, old password correctly fails 3. **First-Time User Experience** - Add is_first_time() detection in onboarding module - Show welcome message directing users to 'ok wizard' - Fix confusing TUI /new command help text 4. **Code Quality** - Add base64::Engine import for wrapped_passkey handling - Fix clipboard manager to use new() constructors correctly Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent a219025 commit c1056ba

8 files changed

Lines changed: 537 additions & 49 deletions

File tree

Cargo.lock

Lines changed: 260 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,13 @@ opendal = { version = "0.50", features = [
140140
] }
141141

142142
# Clipboard (platform-specific)
143+
# SECURITY: Do NOT use pbcopy/pbpaste subprocess - exposes password via process arguments
144+
# Using arboard crate for secure, direct clipboard API access
145+
arboard = "3"
146+
143147
[target.'cfg(target_os = "macos")'.dependencies]
144-
# macOS uses pbcopy/pbpaste via std::process
148+
# macOS uses NSPasteboard via arboard (no subprocess)
149+
arboard = "3"
145150

146151
[target.'cfg(target_os = "linux")'.dependencies]
147152
# Linux clipboard via xclip/wl-copy

0 commit comments

Comments
 (0)