Context
Found in the review of #6094 (feat(session-bridge): claude-interactive triage board and plan view). Found while delivering spec container #5835. All items are hardening; none is exploitable beyond the stated limits.
Problem
- An orphaned
watch.sh after a session crash loops on timeouts and keeps the view-bridge server and its token alive.
- The page and the watcher share one token, so page script could call
/api/wait or release the lease (denial of service only).
Sec-Fetch-Site is a browser-only defence; it does not stop other local OS users.
json.dumps(ensure_ascii=False) passes U+2028 raw into the watcher line (cosmetic).
Suggested fix
- Add a parent-liveness check to
watch.sh so it exits when the owning session is gone, which lets the server and token expire.
- Use separate tokens (or scopes) for the page and the watcher.
- Document the local-user limit, or bind the listener with a per-user credential.
- Escape U+2028 and U+2029 in the watcher line.
Related: #5835
Context
Found in the review of #6094 (
feat(session-bridge): claude-interactive triage board and plan view). Found while delivering spec container #5835. All items are hardening; none is exploitable beyond the stated limits.Problem
watch.shafter a session crash loops on timeouts and keeps the view-bridge server and its token alive./api/waitor release the lease (denial of service only).Sec-Fetch-Siteis a browser-only defence; it does not stop other local OS users.json.dumps(ensure_ascii=False)passes U+2028 raw into the watcher line (cosmetic).Suggested fix
watch.shso it exits when the owning session is gone, which lets the server and token expire.Related: #5835