Fix review findings: PAX sizes, agent stdin, PEM parity, sticky writer
- absorb uses the PAX-corrected entry size (large Go/bsdtar archives were stored truncated) and refuses GNU sparse entries - the agent reads the key from fd 0 straight into locked memory, and never unlinks a live agent's socket - the key file PEM parser is a port of Go's pem.Decode - the STREAM writer fails permanently after a write error; plaintext is cleared on reader error paths; AEAD, HMAC and hash states are zeroized - add/migrate refuse paths inside the vault; publish reports filesystems without an atomic no-replace primitive clearly and treats a leftover temporary name as a warning; Windows rejects NTFS-special names - the leak test runs in its own process Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -23,6 +23,14 @@ Safety and correctness:
|
||||
use, see `SECURITY.md`.)
|
||||
- **Extracted files are synced** to disk before they appear under their
|
||||
name, and their directory afterwards.
|
||||
- **`get` needs an atomic no-replace primitive.** On a filesystem with
|
||||
neither `RENAME_NOREPLACE` nor hard links (some FUSE mounts, FAT) it fails
|
||||
with a message saying so, where Go would rename.
|
||||
- **`add`/`migrate` refuse paths inside the vault directory** (Go refused
|
||||
only the directory itself; `migrate store/records` would have deleted the
|
||||
vault's records).
|
||||
- **`absorb` refuses GNU sparse files** (Go expanded them), and honours PAX
|
||||
size records as Go does.
|
||||
- **A source file that changes while being added is not stored.** If it
|
||||
grows, shrinks, is modified or replaced during `add`/`migrate`, the
|
||||
command fails and nothing is stored. Go stored whatever it read (for a
|
||||
|
||||
Reference in New Issue
Block a user