Skip to content

write-handoff.sh's tracked-target guard (#750) omits the symlinked-ancestor state the read side already refuses #799

Closed

Description

@fdaviddpt

Found during release gate-3 audit (v0.34.1..HEAD, commit 1a3dd7b)

Class B finding (a guard that did not run), ranked unranked against the release
audit's ranking table -- none of containment (write), containment (read) or
misreports cleanly covers it. Filed as an issue per the audit's routing rule for
an unranked finding; not in a row the table marks blocking, so it does not by
itself block this tag, but the maintainer should decide whether it blocks v-next.

What is wrong

scripts/write-handoff.sh:295-308 (introduced by #750, commit 8bd5b7e) refuses
only the tracked and unavailable states returned by
_remember_file_tracked_state_into. That helper also returns
symlinked-ancestor, and the read side (_remember_may_inject,
lib-memory-context.sh:656) already refuses that state. On the write side the
case falls through for it, and the write proceeds.

What an attacker gets

A cloned repo can commit .remember as a symlink pointing anywhere the repo
author chooses. /remember then creates or overwrites remember.md (or
remember.<id>.md) at that target. The script reports
Wrote handoff to: ... (success), and the next SessionStart refuses to show
the note back -- the exact "reports success, then silently refuses on read"
shape #750 was meant to close, via the read-side guard's own vocabulary.

How this was verified

The auditor built scratch repos with an empty HOME and ran the HEAD script
directly, then the v0.34.1 script (via git archive v0.34.1) against the same
fixtures:

Also missing

tests/test_write_handoff_tracked_target_750.py has no symlink case.

The fact that would settle it

Whether the write side is meant to mirror all four refusal states the read
side enforces. If so, the fix is adding the symlinked-ancestor arm to the
case in write-handoff.sh, mirroring lib-memory-context.sh:656.

Related, not confirmed

Other writers that go through a symlinked in-project .remember
(save-session.sh and the SessionStart hint files) may have the same
pre-existing exposure -- confirming that needs a whole-repo census outside
this delta.

Provenance

Filed from the release-auditor's gate-3 report (dispatch token
RELTOK-9f31c7-r1b, round 1) during the v0.35.0 release attempt for
Digital-Process-Tools/claude-remember.

[AI-generated]

Activity

  1. added
    priority:high
    filed-by-loop
    lane-storage
    on Sep 26, 2026
  2. added 2 commits that reference this issue on Sep 26, 2026
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

    filed-by-looplane-storagepriority:high

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions