Skip to content

[outboxlog] Journal unreachable when both configured + no signature re-verify on load (persisted file = trust root) #146

Description

@bigdestiny2

Severity: MED — correctness/security (dmc + systems lens)

Two wiring defects:

  • saveState() (outbox-log.js:488-491) appends to the journal only when !statePersistence, but start() passes both journalPath + storagePath, so the fast append-log is silently empty while the expensive snapshot runs.
  • On restore, applyState() (:524-601) and applyJournalEntry() (:649-713) re-check size/namespace limits but do not re-run verifyOutboxRecordSignature — the live append path gates sigs (:141-152), the restore path doesn't. Anyone who can write outboxlog-state.json/the journal injects rows attributed to any pubkey, loaded as authentic on boot. Trust silently shifts from writer-key to filesystem.

Fix: decide layering explicitly (journal-first + periodic snapshot; remove the !statePersistence guard), and re-run verifyOutboxRecordSignature during load (respect shouldVerifyAppend), dropping unverifiable rows. Tests: both-configured → append lands in journal; hand-edited row rejected on load.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions