@@ -49,13 +49,21 @@ pr_body_template: |-
4949# the workflow BEFORE the agent, so the venv exists; the agent runs the suite
5050# to self-verify its red→green fix. Bare `python -m pytest` is also allowed
5151# for when the active interpreter already has the deps.
52- # - `git diff` is pinned to HEAD-relative / index forms. A bare (git,diff)
53- # prefix would allow `git diff --no-index /etc/passwd /dev/null`, reading
54- # arbitrary ABSOLUTE paths and bypassing safe_path. Pinning to `HEAD` also
55- # defeats the `git diff HEAD --no-index <abs> <abs>` prefix-match variant:
56- # with a revision (HEAD) present git is in tree-diff mode and rejects paths
57- # outside the repo (`fatal: '<path>' is outside repository`), so --no-index
58- # cannot escape the worktree — verified on the runner.
52+ # - The diff/log-GENERATING git subcommands (`git diff`, `git log`) are
53+ # deliberately ABSENT. They all honor the shared `--output=<file>` diff
54+ # option, which performs NO repo-containment check: `git diff HEAD
55+ # --output=/abs/path` (and the `--cached` / `git log -p` variants) OVERWRITES
56+ # an arbitrary absolute path on the runner (e.g. ~/.bashrc, ~/.gitconfig).
57+ # Prefix matching cannot block a trailing `--output` — args after the prefix
58+ # are model-supplied — and issue bodies are untrusted input, so a
59+ # prompt-injected agent could be steered into it. This arbitrary-WRITE escape
60+ # is worse than the `git diff --no-index` arbitrary-READ escape, so — exactly
61+ # as with cat/ls/find below — the primitive is removed rather than pinned
62+ # (no prefix form can express "diff but never --output"). Confirmed on the
63+ # runner that `git diff HEAD --output=<path>` writes the file.
64+ # - `git status` is KEPT: it generates no diff and accepts no `--output`, so it
65+ # is a safe way to list changed files. The agent inspects its own work via
66+ # read_file / glob / grep (repo-relative, safe_path-contained) plus that list.
5967# - `cat`, `ls`, `find` are deliberately ABSENT — they read arbitrary absolute
6068# paths (the bash tool validates only the argv PREFIX, not path args). The
6169# agent has read_file / glob / grep for repo-relative reads, all safe_path-
@@ -65,9 +73,6 @@ bash_allowlist:
6573 - [poetry, run, python, -m, pytest]
6674 - [python, -m, pytest]
6775 - [python3, -m, pytest]
68- - [git, diff, HEAD]
69- - [git, diff, --cached]
70- - [git, log]
7176 - [git, status]
7277
7378# Author phase. The user prompt is ENGINE-RENDERED from the convention template
0 commit comments