Skip to content

(sandbox): keep sandboxed sessions out of the triggers directory (#1022) - #1024

Merged
devsuitup merged 6 commits into
mainfrom
wt/1022
Nov 8, 2026
Merged

devsuitup merged 6 commits into
mainfrom
wt/1022

Conversation

@devsuitup

Copy link
Copy Markdown
Owner

First slice of #1022: the effective triggers directory becomes a protected host surface before any trigger can open or stop a session. Spec: issue comments, §1 and §6.

  • scripts/claude-sandbox.sh protects the control tree at every visible mount alias, pins ancestors, and refuses unsafe or missing paths and writable overlaps.
  • trigger-watcher.js exports the effective directory resolver; main.js passes that path to manual and schedule sandbox launches.
  • Legacy trigger formats and the Podman opt-in are unchanged. The protection does not hold when the Podman socket is exposed, as documented.

Not verified locally: this machine is Windows, so the wrapper's Linux cases and the real-bwrap fixture skip here. Ubuntu CI is the proof for them.

The open and stop actions come in later slices.

Harness-Claim: true
Agent: switchboard-dev
Host: ANCHOR
Base-Ref: origin/main
Base-SHA: e0f144b
Claimed-At: 2026-11-07T16:29:07.4833092Z
Nonce: 1fc9b61a5593e7e6
The effective triggers directory is a host control surface, and later slices of
#1022 let a trigger open and stop sessions. Protect it at every visible mount
alias for all sandbox launches, and refuse a launch whose mounts would expose it.
This does not hold when the Podman socket is exposed; docs/sandbox.md says so.
…hes every launch

A project path with a newline launches again unless it overlaps the control tree; the changelog says which layouts are refused; launch tests follow new, resume, fork and schedule to the spawn; Linux-only wrapper cases stay skipped on Windows.
# Conflicts:
#	CHANGELOG.md
#	main.js
The cron sandbox cases point SWITCHBOARD_TRIGGERS_DIR at their temp root instead of creating ~/.switchboard/triggers/processed in the runner's home.
…writable mounts

The wrapper mounts a fresh tmpfs on /tmp, so a control tree under the runner's TMP is covered by it and stays unexposed; the test only has to refuse a bind.
@devsuitup
devsuitup merged commit aea0409 into main Nov 8, 2026
10 checks passed
@devsuitup
devsuitup deleted the wt/1022 branch November 8, 2026 16:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant