Skip to content

Reserve the user-guided tag for the capture path (always-ride priority is a poisoning amplifier) #342

Closed

Description

@abogartz

Part of #334. severity:medium, store-security.

Problem

memory_remember accepts arbitrary tags from the model. With the hint channel, the tag user-guided grants a row ALWAYS-RIDE priority into every future session's system prompt of that repo. A prompt-injected agent (or a poisoned import) can therefore write a row and tag it user-guided to force its delivery — a direct amplifier of the memory-poisoning vector (research: injected memories retrieved in 60–89% of future agentic sessions).

Change

Reserve user-guided to the auto-capture path:

  1. Strip USER_GUIDED_TAG from tool-authored write candidates (the memory_remember tool boundary and the import path) before the gate — silently, like quarantine handles its own tag, or with a caveat. Pick one and test it.
  2. Capture keeps the tag (it is the only writer).
  3. Imports: strip as well — provenance does not survive a file round-trip; a re-imported row must not outrank the local store.

Acceptance

  • Tests: a memory_remember write cannot acquire the tag (stripped, row still promotes); an import strips it; a captured guided row keeps it; injection still rides captured rows.
  • A note in the security docs (the poisoning defense list) that always-ride priority is provenance-reserved.

Footguns

  • Do not strip at formatMemory/injection time — strip at the WRITE boundary, or the store fills with rows that claim a provenance they did not earn and every surface except injection lies.
  • quarantineCandidate already owns a reserved tag; follow its pattern for consistency.

Extension (2026-11-08, contradiction surface #349)

The stakes rose: memory_remember also accepts ref/claim/klass today. A minted user-guided row WITH those fields renders as a CONFLICT line carrying an AUTHORITY VERDICT ("Class: spec — the code is the bug; fix REF to ") — and #345/#349 measured that agents obey that verdict 3/3. A poisoned row can now instruct a specific code edit with human authority attached.

Extended scope: reserve ref, claim and klass exactly like user-guided — stripped at the WRITE boundary (tool + import), capture is the only writer.

Extended acceptance: a memory_remember write carrying ref/claim/klass promotes WITHOUT the fields; an import strips all four; a captured guided row keeps them; the existing conflicts tests keep passing.

Activity

  1. added
    store-security
    retrieval
    severity:medium
    on Nov 7, 2026
  2. abogartz commented on Nov 9, 2026

    @abogartz
    OwnerAuthor

    Closed — fully landed on main, verified today against d0929a6. Code: commit 2a64ea4 (reserve capture guidance provenance at write boundaries). AC check: memory_remember/memory_update strip user-guided including comma-delimited entries and still promote the row (test/guidance-provenance.test.ts); imports strip it even behind a forged export header, and the import allowlist excludes ref/claim/klass; captured guided rows keep the triple and ride an unrelated prompt; a tool update cannot reuse a captured row's provenance. Docs: README poisoning-defense list states the reservation, including contradiction verdicts. The extended scope from this morning's comment (ref/claim/klass) is covered by the same boundary: the tool schema never accepted those fields, so capture is the only writer.

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

    retrievalseverity:mediumstore-security

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions