gabriel / muse public
patch dev
AI Agent gabriel · 162 days ago · Apr 17, 2026 · Diff

security: zero DerivedKey in get_signing_identity MUSE_AGENT_KEY_FD path

- After Ed25519PrivateKey.from_private_bytes(dk.private_bytes), dk was never zeroed — DerivedKey's 32-byte private_bytes and chain_code lingered in heap - Added dk.zero() immediately after key object creation, before zeroing sub_seed - Add tests/test_agent_key_fd_zeroing.py (2 tests) — RED before this commit

sha256:e503af6ad34feaa2dad274389984a7f01df7df6c2f234819b7911f8f1a9f4664 sha
+17 ~1 symbols
sha256:c99aeb2e8232b5e3c4284de299379d0bc48fe82f7b56ee06a632d78aa236df3f snapshot
+17
symbols added
~1
symbol modified
0
dead code introduced
Semantic Changes 18 symbols
~ tests/test_agent_key_fd_zeroing.py .py 17 symbols added
+ TestAgentKeyFdDerivedKeyZeroed class class TestAgentKeyFdDerivedKeyZeroed L42–94
+ _make_fd method method _make_fd L43–48
+ test_I1_private_bytes_zeroed_after_fd_read method method test_I1_private_bytes_zeroed_after_fd_read L50–71
+ test_I2_chain_code_zeroed_after_fd_read method method test_I2_chain_code_zeroed_after_fd_read L73–94
+ _MNEMONIC variable variable _MNEMONIC L34–37
+ _SEED variable variable _SEED L38–38
+ _SUB_SEED variable variable _SUB_SEED L39–39
+ DOMAIN_IDENTITY import import DOMAIN_IDENTITY L31–31
+ DerivedKey import import DerivedKey L29–29
+ _hdkeys import import _hdkeys L28–28
+ annotations import import annotations L21–21
+ config_mod import import config_mod L32–32
+ derive_agent_sub_seed import import derive_agent_sub_seed L31–31
+ mnemonic_to_seed import import mnemonic_to_seed L30–30
+ os import import os L23–23
+ patch import import patch L24–24
+ pytest import import pytest L26–26
~ muse/cli/config.py .py 1 symbol modified
← Older Oldest on dev
All commits
Newer → Latest on dev

0 comments

No comments yet. Be the first to start the discussion.

To add a comment, use the Muse CLI: muse hub commit comment sha256:e503af6ad34feaa2dad274389984a7f01df7df6c2f234819b7911f8f1a9f4664 --body "your comment"