Skip to content

Viewer editor writes bypass the write gate: blocked content can be re-appended and stored #222

Closed

Description

@abogartz

Finding

runWriteGate is never called from the viewer. editMemory() (src/viewer/mutate.ts:73-122) calls appendMemory() directly, and restoreEntryRoute does the same (src/viewer/server.ts:320). Reproduced in a throwaway store: append a row, block it, append the identical content again through the editor path - result STORED, quarantined=false. This contradicts src/viewer/server.ts:308-310, which states a rejection is lifted only by an explicit release action. No test covers the viewer write endpoints.

Related family: #35 (value-keyed tombstone, closed) fixed the store-side path; this is the editor path reviving tombstoned strings. #214 covers the undo path.

Fix direction

Pick the invariant. Either run the same gate for viewer writes - runWriteGate already returns structured verdicts the UI can show as warnings - or declare the viewer a trusted root-editor and give it a tombstone check so blocked content stays blocked. Both are local and deterministic. Depends on the runWriteGate decomposition ticket for a clean entry point.

Source

Architecture review 2026-10-31, finding S4 (Med), reproduced live.

Activity

  1. added
    bug
    store-security
    severity:medium
    on Nov 1, 2026
  2. WhollyMindless commented on Nov 3, 2026

    @WhollyMindless
    Contributor

    Taking #222 following your Discord handoff to WhollyMindless. No existing assignment, implementation claim, or overlapping open PR is visible. I will reproduce the viewer edit and restore-entry rejection bypasses with temporary-store HTTP regressions, then take the trusted-admin-editor plus tombstone-check option described in this issue, preserving the explicit release action, repository stamps, provenance and existing edit/snapshot behavior. This keeps the fix independent of #220 gate decomposition and #168 session-binding work. Our contributor account cannot set assignees, so this comment records ownership. Please redirect if you prefer the full-gate option or a narrower scope.

  3. added 2 commits that reference this issue on Nov 3, 2026
  4. abogartz-opencode-self-improvement commented on Nov 3, 2026

    @abogartz-opencode-self-improvement

    🎉 This issue has been resolved in version 0.15.12 🎉

    The release is available on:

    Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugreleasedseverity:mediumstore-security

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions