Repository navigation
v0.3.0 — phase 2: the approval channel
Phase 2: the approval channel — root the agent can only ask for.
Between "never root" and "pre-authorized root" there is now a middle way: rules with approval = true. The agent's exec exits 30 with a request id and executes nothing; a human answers from any root SSH session; the agent fetches the outcome read-only.
- Gateway request flow: deterministic request ids (identical live requests dedupe), a drop box with strict grammar,
O_NOFOLLOW/O_NONBLOCKreads, TTLs (requests 10 min, results 1 h), approval-fatigue bound (max 5 live requests) sysh approvals/approve/deny(root, real TTY required): every approval re-checks the argv against the installed policy — an operator cannot approve what policy forbids; pattern-chosen arguments must be typed by hand at the prompt; execution runs in a one-shotsystemd-runscope (TasksMax, MemoryMax, timeout, output caps); results landroot:sy 0640- Exclusive claim: concurrent approvals of the same request cannot double-execute (O_EXCL marker, released on every exit path; stranded markers stealable after the request TTL). The race was found and closed live before release
- Tamper resistance: request ids are bound to their content — a body rewritten under a valid-looking name is refused before any human or policy sees it; the drop box is sticky (
1730) sosycannot remove root's claim markers - Exit codes:
30approval required,31result unavailable policy.Parsenow refuses unknown TOML fields — a typo is policy, not a silent defaultexamples/webserver: the apache2 restart moved to the approval channel (reload is the routine; restart drops connections — the agent can only request it);usagedocs cover the full approve cycle
Verified end-to-end on a live host: full approve/fetch cycle, typed-argument challenge (and its wrong-answer abort), deny, dedupe, the concurrent-approval race, and symlink/FIFO/tampered-request probes.
Deferred (frontends and adjacent, not blockers): FIDO2/Telegram approval transports, seccomp read-only profile, sysh-mcp distribution.
curl -LO https://github.com/xezpeleta/sysh/releases/download/v0.3.0/sysh_0.3.0_amd64.deb
apt install ./sysh_0.3.0_amd64.deb
sysh doctor