Skip to content

P1: Write-side threat scan for capture/import paths — quarantine tag instead of injection #38

Closed

Description

@abogartz

Part of #83.

Problem

Read-side defenses are strong (FRAME framing, newline collapse, [via] provenance), but a poisoned row arriving via memory_import or auto-capture (transcripts may contain fetched web pages) still rides the epoch-frozen block every turn of every future session. Hermes Agent scans content at write time precisely because its frozen prefix persists for the whole session — the same economics as our epoch freeze. MemoryGraft (arXiv:2512.16962) demonstrated 23/48 poisoned retrievals into a BM25+FAISS agent via a note it read.

Proposal

  • Instruction-pattern scan on untrusted write paths only (capture candidates, import rows): role-override lines, "ignore previous", fake-header shapes beyond the newline collapse, curl-pipe/exec shapes.
  • Hit → quarantine tag: excluded from every injection path, visible in viewer + /memory-report, human-releasable (removes the tag). Never a silent drop — record evidence with the matched pattern.
  • Gate-scanned rows keep full write-gate treatment; quarantine is an additional read-path withhold, not a replacement.

Cost

~40 lines in the capture/import path + tests (extend injection-framing tripwires).

Activity

  1. added
    store-security
    on Oct 24, 2026
  2. added
    severity:high
    on Oct 30, 2026
  3. abogartz commented on Oct 30, 2026

    @abogartz
    OwnerAuthor

    Severity triage 2026-10-30 — severity:high, and unblocked (its stated dependency has shipped)

    Reviewed against main @ 525ed89. Still unbuilt: grep -rn "quarantine" src/ → zero hits.

    Important board correction: #83 lists this as "After #37: quarantine is an additional read-path withhold on top of the row tags #37 introduces". #37 is CLOSED COMPLETED (2026-10-27) — per-row provenance tiers exist and injected rows surface a [via import] marker. So the ordering constraint this ticket was waiting on is gone. It is now ready to build, and I'd rank it second behind #35.

    Marked high rather than critical because the arriving-poison path is currently narrow in practice: auto-capture is off by default and still has never been observed firing on a live store, so the realistic vector today is memory_import of an untrusted JSONL. The mechanism it defends — a row that rides the epoch-frozen block every turn of every future session — is exactly the one your #165/#162 cache work makes expensive to dislodge, which is what keeps it high rather than medium.

    Two things worth deciding before writing code:

    1. Interaction with the epoch freeze. A row newly tagged quarantine must bust or be excluded from an already-frozen block, or the withhold silently doesn't apply for the rest of that session. P0: Value-keyed rejection tombstone — rejected content must stay rejected across re-ingestion #35's tombstone and this need the same answer.
    2. False positives are a UX cost, not a safety cost. A quarantine that wrongly withholds a legitimate row is invisible to the user unless the viewer and /memory-report both say so — your "never a silent drop" rule is the load-bearing part, more than the scanner patterns are.
  4. WhollyMindless commented on Oct 30, 2026

    @WhollyMindless
    Contributor

    Claiming #38, queued immediately after our small #13 warning PR and before #71. I understand you are handling #35, so I will leave that work to you. I will check your tombstone changes before touching shared gate/epoch paths and keep quarantine additional to existing gate checks, visible in the viewer/report, and explicitly releasable. Please redirect the ordering or shared-boundary approach if needed.

  5. abogartz-opencode-self-improvement commented on Oct 31, 2026

    @abogartz-opencode-self-improvement

    🎉 This issue has been resolved in version 0.15.0 🎉

    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

    releasedseverity:highstore-security

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions