Repository navigation
Description
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:
- Tracked
.remember/remember.md: HEAD refuses (exit 1, unchanged); v0.34.1
wrote it (exit 0). The release-audit: write-handoff.sh writes into the tracked handoff file the #721 guard is meant to protect, and reports success (fails-to-preserve, non-blocking) #750 guard does work for thetrackedstate. .rememberstaged as a symlink toelsewhere/: HEAD wrote it (exit 0,
elsewhere/remember.mdcreated); v0.34.1 did the same. The guard does
nothing here.
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
fix(#799): refuse a symlinked-ancestor handoff target on write, not o…
curate: 8 trap.d fragments -- 1 promote, 1 merge, 6 decline (#807)