We pin and wipe the raw key bytes we control — and say what that doesn't cover
Your encryption key lives in the OS keychain and is read into RAM only while your vault is unlocked. For the raw 32-byte form of the key that SealedBrief handles directly, we ask the OS to pin its memory page out of swap — and on the rare machine that refuses, we log a warning rather than fail silently. The moment we finish deriving your per-record keys from it (an HKDF step), we overwrite those raw bytes with zeros. We will not pretend a dump of the running process finds nothing: while the vault is unlocked your key is genuinely in use, so the keychain and the open database engine each hold their own working copy, and Python cannot force-zero the immutable text form of a key — a live dump can still contain it. Our guarantee is narrower and testable: for the raw key bytes we manage, no copy survives once the per-record keys are derived, and after you lock the vault our own memory-dump scanner finds no copy of those controlled key bytes.
Key handling Run the heap-scan unit tests (tests/unit/security/test_secure_key_buffer.py) for the raw key buffer, then take a process dump AFTER locking the vault and run scripts/security/scan_memory_for_key.py — it reports zero hits for the raw key bytes we control.