Zero plaintext after copying to memguard in DecryptWithIdentity (closes #5) #10

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

Zeroes the intermediate []byte slice after copying into the memguard.LockedBuffer to prevent decrypted secrets from lingering in unprotected heap memory.

Zeroes the intermediate `[]byte` slice after copying into the `memguard.LockedBuffer` to prevent decrypted secrets from lingering in unprotected heap memory.
sneak was assigned by clawbot 2026-02-08 21:06:01 +01:00
clawbot added 1 commit 2026-02-08 21:06:02 +01:00
The decrypted data from io.ReadAll was copied into a memguard
LockedBuffer but the original byte slice was never zeroed, leaving
plaintext in swappable, dumpable heap memory.
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-5:clawbot-fix/issue-5
git checkout clawbot-fix/issue-5
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#10
No description provided.