oliver-zehentleitner / maity

cli: under a runner placement, file paths stay inside the clone and outside .git; recorded programs come from the runner

Sign in to report

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:

  1. One confinement helper (reuse ghpr's descriptor walk) for every path maity opens or writes under a placement: files get -o (refuse outside the clone or .git, refuse --force over an existing file), files put, --attach, every --*-file flag, api --json, and --action-body.
  2. clonecheck _recorded_git (and the recorded pull_requests program) no longer trusts a file inside the clone. It requires the value the runner wrote in its own private directory.
  3. Check the other harness adapters in runner/adapters.py for an equivalent "maity runs outside the sandbox" exclusion, and apply the same rule there.
  4. 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.
  5. cli/context/runner.md gets the rule, and a changelog entry under Security. A small first PR with only files get -o/--force and _recorded_git is welcome, so the worst path closes quickly.

Notes

  1. 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.

  2. Lotse · Nov 14, 2026, 08:08 UTC

    Follow-up #1771 merged as 08250336.