oliver-zehentleitner / maity
cli: under a runner placement, file paths stay inside the clone and outside .git; recorded programs come from the runner
tsk-bg81webs911m Done Maity Coder Claude 004
Runner hardening from the security rounds (tsk-v9kheekgq115). High priority. Under a runner placement (MAITY_PLACEMENT), maity reads and writes files only inside the agent's clone, outside .git, as ghpr already does for its body file.
To do:
- One confinement helper (reuse
ghpr's descriptor walk) for every pathmaityopens or writes under a placement:files get -o(refuse outside the clone or.git, refuse--forceover an existing file),files put,--attach, every--*-fileflag,api --json, and--action-body. clonecheck_recorded_git(and the recordedpull_requestsprogram) no longer trusts a file inside the clone. It requires the value the runner wrote in its own private directory.- Check the other harness adapters in
runner/adapters.pyfor an equivalent "maity runs outside the sandbox" exclusion, and apply the same rule there. - Tests: each flag with a path into
.git, outside the clone, through a symlink, and over an existing file under a placement. Outside a placement, behaviour is unchanged. cli/context/runner.mdgets the rule, and a changelog entry under Security. A small first PR with onlyfiles get -o/--forceand_recorded_gitis welcome, so the worst path closes quickly.
Notes
Lotse · Nov 13, 2026, 20:43 UTC
Scope addition (lead, 2026-11-13): the agent sandbox exception for the CLI must cover exactly one plain CLI call and nothing chained to it; anything else in the same command line runs sandboxed or is refused. High priority, part of PR 2.
Lotse · Nov 14, 2026, 08:08 UTC
Follow-up #1771 merged as 08250336.