Skip to content

Epic: Evidence emit, render and export paths leak unscrubbed or ambient data #292

Closed
4 of 4 issues completed

Description

@WhollyMindless

These are seven possible behaviors to investigate, not confirmed bugs. They came out of an AI-assisted local review of cb68647 (v0.15.21). I grouped them to keep the noise down, so please split, defer or close any of them as you see fit.

Items

  1. Evidence lines may get another session's repo. Calls to record(..., false) with no session ID (decay.ts:36, consolidate.ts:39, digest.ts:82, epochs.ts:254) seem to read whichever session ran last. With interleaved hooks in the harness, repo A's decay and frontier lines were stamped with repo B, and B's memory_evidence showed A's row IDs and scope names.
  2. A viewer block reason may keep a credential. blockMemory passes the raw reason to addBlock (mutate.ts:263), while its tombstone gets a redacted copy. A recognized synthetic token stayed in blocklist.logfmt and came back from /api/data. This is only reachable by someone using the viewer.
  3. A forget reason may keep newlines in the refusal text. ForgetArgs.reason is a plain string (schema.ts:112), and the refusal hint is built from it (gate.ts:833). A reason containing a newline came back with a real line break on a later matching write. The file stays one line per record, and the text didn't appear in the system prompt or recall. P0: Value-keyed rejection tombstone — rejected content must stay rejected across re-ingestion #35 asks for the reason in the hint, so only the formatting is in question.
  4. memory_consolidate may keep newlines in its output. It slices row content as stored (render.ts:16), while memory_recall flattened the same text. It took near-duplicate rows and a query-based read to see this, and proposals are read-only.
  5. Export may keep credentials in metadata on old rows. scope, tags and kw are written as stored (export.ts:173-177), while content and issue are scrubbed. New writes refuse such values, so this needs an older or hand-edited row. Secrets already in the store are never scrubbed, and memory_export writes them verbatim #74's criteria only named content and issue, so this isn't a claim against Secrets already in the store are never scrubbed, and memory_export writes them verbatim #74. README.md:230 still says export is "verbatim", which may be stale.
  6. Deleting an old row may copy its credential into the audit. The reason is redacted but copied content isn't (deletions.ts:25, mutate.ts:205). Snapshots already hold the original, so this looks like an extra copy, not new access. It sits awkwardly with README.md:221, and it may belong with Decide snapshot and undo policy for the store scrub before building it (#74 slice 2) #255.
  7. An init-stamp row may skip init. A context row tagged init-stamp, with the repo's scope and the current short HEAD, made memory_init reply "Already initialized" and write no command rows (run.ts:92-93). This worked through both memory_import and memory_remember. A full SHA did not. From reading the code, a new commit should clear it, but I didn't test that.

What is not established

  • All of this used synthetic rows and throwaway stores on Windows, through the test harness with a fake host.
  • No live host or model was involved, so nothing shows a model acting on items 3 and 4.
  • For items 5 and 6, I didn't look for such rows in a real store, so I don't know how often they exist.
  • None of the seven has been shown to affect a real user.

Sub-issues

Sub-issues

4 of 4 Issues completed
Loading 4 sub-issues

Activity

  1. added
    bug
    severity:medium
    store-security
    on Nov 4, 2026
  2. added
    agent:analysis
    on Nov 4, 2026
  3. added
    architect:working
    and removed
    agent:analysis
    on Nov 4, 2026
  4. changed the title [-]Possible behaviors to investigate: seven smaller items from a local review[/-] [+]Epic: Possible behaviors to investigate: seven smaller items from a local review[/+] on Nov 4, 2026
  5. ocsi-architect commented on Nov 4, 2026

    @ocsi-architect

    Architect verdict: PASS — decomposed; 5 of 7 items filed as 4 tickets, 1 belongs to #255, 1 not a defect

    Verified against main 7405dc61d919e7eee7033dea6e4324eda58ee669 (v0.15.33).

    Judgement

    Children

    Not filed

    Tickets are drafts: label one agent:ready when you want it built.

  6. added
    architect:done
    and removed
    architect:working
    on Nov 4, 2026
  7. changed the title [-]Epic: Possible behaviors to investigate: seven smaller items from a local review[/-] [+]Epic: Evidence emit, render and export paths leak unscrubbed or ambient data[/+] on Nov 4, 2026
  8. added
    agent:ready
    on Nov 5, 2026
  9. abogartz commented on Nov 9, 2026

    @abogartz
    Owner

    Status of the seven items, re-checked against main at d0929a6 (0.20.0) plus the PRs currently open

    Five of the seven are already gone. One is a deliberate no-fix. One is real and still open.

    1. Evidence lines inheriting another session's repo — fixed on main. All four call sites now pass the caller's own session id (src/tools/decay.ts:37, src/tools/consolidate.ts:40, src/inject/digest.ts:93, src/inject/epochs.ts:302), and record() resolves the repo from that session or from an explicit context rather than from whichever hook ran last, stamping repo/repoPath on the line (src/evidence/record.ts:139-159).

    2. Viewer block reason keeping a credential — fixed on main. addBlock redacts before it writes (src/store/blocklist.ts:60), so blocklist.logfmt and the /api/data read of it get the redacted copy. Reported against 0.15.21; the redaction landed after that.

    3. Forget reason newlines in the refusal hint — fixed by PR #369. The hint is flattened at the render seam.

    4. memory_consolidate keeping newlines in proposals — fixed by PR #369, same seam.

    5. Export writing scope/tags/kw unscrubbed — fixed by PR #370, along with the stale "verbatim" claim in the README.

    6. Deletion audit copying the row's content — not fixing, on purpose. The line is the record of what was deleted; redacting the content would make the audit describe a row the store never let go of. The value itself is already retained by design in the pre-delete snapshot, which is the same reasoning that closed #255. Nothing here widens access.

    7. A forged init-stamp row suppressing init — still open, and it is the one worth doing.

    Confirmed by reading main: initStamp() (src/init/run.ts:91-100) accepts any active context row in the repo's scope carrying the init-stamp tag, and there is no reserved-tag list anywhere — memory_remember and memory_import accept arbitrary tags. So a session that reads git rev-parse HEAD and writes one row can make memory_init answer "Already initialized" for that repository forever, and nothing in the store distinguishes the forged row from the plugin's own.

    Fix direction rather than a patch in this comment: the stamp is plugin-internal state that happens to live in the user-facing store. Moving it out — a stamp file under the memory root that no tool reads or writes, with a one-time migration that honours an existing store row so installed repos stay idempotent — removes the forge instead of filtering for it. A tag deny-list in the schema is the cheap alternative, but it protects the door and not the room: memory_import takes rows from a file.

    Split out as #374 and closing this epic against the evidence above.

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

    agent:readyarchitect:donebugseverity:mediumstore-security

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions