You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
post-tool-hook.sh basename-derived SESSION_ID still reaches argv unguarded (leading-dash gap closed on two of three routes) #620
cohort-8Open at the v0.29.1 tag; frozen, can only shrinkfiled-by-loopFiled by the maintainer loop, not by a human. Sets the author axis in dispatch_rank.lane-capturein-session hooks and the summarizer — post-tool, prompt, session-start/end, haiku.py, prompts/priority:lowReal, but neither blocking nor compounding fast
Filed by the release-3 audit for v0.29.0..HEAD (round 1, dispatch token gate3-682bbe1d0550).
This delta closed the leading-dash gap twice -- post-tool-hook.sh:422 (#610) and session-end-hook.sh:141 (#600) -- both on the stdin session id. The basename route in the same file is untouched:
SESSION_ID="${TRANSCRIPT##*/}"; SESSION_ID="${SESSION_ID%.jsonl}" # post-tool-hook.sh:604-605, from LATEST_JSONL at :554
and that value reaches argv unguarded at :910: nohup "$SAVE_SCRIPT" "$SESSION_ID". The two case arms at :646 and :700 that still lack a -* pattern only skip the sidecar/marker paths; they never clear SESSION_ID. save-session.sh:141-147 recognises exactly --dry and --force and treats everything else as positional, so the reachable values are narrow: a transcript file literally named --dry.jsonl or --force.jsonl in the session dir turns a delta-triggered save into a silent dry-run.
Note: the comment added at :404-417 asserts the stdin id now "faces the same guard the basename-derived id has always faced" -- after this change the stdin id faces a stronger guard, so the comment describes a symmetry that no longer holds.
This condition predates this delta (present at HEAD~10); reported now because the delta closed two of three sites and the third is the one the new comment claims parity with.
Fix: apply the same -*/-- guard to the basename-derived SESSION_ID at post-tool-hook.sh:604-605 before it reaches :910, and correct the comment's parity claim.
Row: splices (can ship behind a filed issue, not blocking). Whether the transcript directory is attacker-writable in practice is unresolved; if not, this is hygiene rather than exposure.
cohort-8Open at the v0.29.1 tag; frozen, can only shrinkfiled-by-loopFiled by the maintainer loop, not by a human. Sets the author axis in dispatch_rank.lane-capturein-session hooks and the summarizer — post-tool, prompt, session-start/end, haiku.py, prompts/priority:lowReal, but neither blocking nor compounding fast
Activity
fix(#621): drop the hot-path control-byte pre-check, restore uncondit…
Guard basename SESSION_ID, cut a hot-path tr fork, flatten hook-error…
Fix post-tool-hook.sh basename SESSION_ID sanitiser silently emptying…
Document #621's abandoned hot-path pre-check accurately, and record t…
Cut $( ) subshell forks on SessionStart's config/timestamp/slug paths (…