Fix R5: SealedStore plaintext tmp 0600 + SQLCipher deferred note #9

Merged
leora merged 1 commits from leora/fix-r5-sealed-tmp-hardening into sigil-initial 2026-10-06 06:14:43 +08:00
Contributor

Summary

R5: plaintext working copy was 0644; document SQLCipher deferred.

Changes

  • _write_private_file via os.open(..., 0o600) + fsync + unlink on failure
  • Pin temp dir 0700; chmod plain/export; delete export after flush
  • Docs: SQLCipher deferred; seal ≠ encrypted-DB-while-open
  • Regression test for 0600/0700

Test plan

  • 142 tests pass
## Summary **R5**: plaintext working copy was 0644; document SQLCipher deferred. ## Changes - `_write_private_file` via `os.open(..., 0o600)` + fsync + unlink on failure - Pin temp dir 0700; chmod plain/export; delete export after flush - Docs: SQLCipher deferred; seal ≠ encrypted-DB-while-open - Regression test for 0600/0700 ## Test plan - [x] 142 tests pass
leora added 1 commit 2026-10-06 06:14:42 +08:00
Plaintext working copy and export backup were creatable world-readable
under a 0700 temp dir. Write via os.open(mode=0600), fsync, unlink on
failure; pin temp dir 0700; remove export after flush. Document SQLCipher
as deferred — seal-on is not an encrypted DB while the process is open.
leora merged commit cd87be6b8d into sigil-initial 2026-10-06 06:14:43 +08:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: bigpickle/sigil#9
No description provided.