Refactor: Tauri core idiomatic cleanup (zeroize, dedup, mutex poisoning) #88

Closed
opened 2026-07-08 02:40:33 +00:00 by icub3d · 0 comments
Owner

Category: Refactor / idiomatic (Tauri core) — found in code review 2026-07-07.

Collection of lower-urgency cleanups in client/src-tauri:

  • Add the zeroize feature to ed25519-dalekSigningKey is not zeroized on drop today; every SigningKey::from_bytes leaves expanded secret material in freed heap (identity.rs:297,314,291). Wrap intermediate mnemonic Strings in Zeroizing.
  • Collapse the byte-identical get_signing_key_for and get_seed_for (identity.rs:297 / :314) into one seed loader.
  • Handle mutex poisoning instead of .lock().unwrap() (identity.rs:95,151,180,265,346) — a panic while holding ACTIVE_ACCOUNT turns every later identity op into a crash. Use unwrap_or_else(|e| e.into_inner()) or parking_lot.
  • load_accounts_index silently unwrap_or_default()s a corrupt index (identity.rs:71) → surface a distinct error.
**Category: Refactor / idiomatic (Tauri core)** — found in code review 2026-07-07. Collection of lower-urgency cleanups in `client/src-tauri`: - [ ] Add the `zeroize` feature to `ed25519-dalek` — `SigningKey` is not zeroized on drop today; every `SigningKey::from_bytes` leaves expanded secret material in freed heap (`identity.rs:297,314,291`). Wrap intermediate mnemonic `String`s in `Zeroizing`. - [ ] Collapse the byte-identical `get_signing_key_for` and `get_seed_for` (`identity.rs:297` / `:314`) into one seed loader. - [ ] Handle mutex poisoning instead of `.lock().unwrap()` (`identity.rs:95,151,180,265,346`) — a panic while holding `ACTIVE_ACCOUNT` turns every later identity op into a crash. Use `unwrap_or_else(|e| e.into_inner())` or `parking_lot`. - [ ] `load_accounts_index` silently `unwrap_or_default()`s a corrupt index (`identity.rs:71`) → surface a distinct error.
icub3d referenced this issue from a commit 2026-07-10 02:08:55 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
icub3d/decentcom#88
No description provided.