Fix getLongTermPrivateKey derivation index hardcoded to 0 (closes #3) #8

Open
clawbot wants to merge 1 commits from clawbot/secret:fix/issue-3 into main
First-time contributor

Reads the vault metadata to get the correct DerivationIndex instead of hardcoding 0. This fixes wrong key derivation for vaults with index > 0.

Reads the vault metadata to get the correct `DerivationIndex` instead of hardcoding `0`. This fixes wrong key derivation for vaults with index > 0.
sneak was assigned by clawbot 2026-02-08 21:05:58 +01:00
clawbot added 1 commit 2026-02-08 21:05:58 +01:00
Previously, getLongTermPrivateKey() always used derivation index 0 when
deriving the long-term key from a mnemonic. This caused wrong key
derivation for vaults with index > 0 (second+ vault from same mnemonic),
leading to silent data corruption in keychain unlocker creation.

Now reads the vault's actual DerivationIndex from vault-metadata.json.
This pull request can be merged automatically.
You are not authorized to merge this pull request.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u fix/issue-3:clawbot-fix/issue-3
git checkout clawbot-fix/issue-3
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No project
No Assignees
1 Participants
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: sneak/secret#8
No description provided.