mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-10-08 21:03:51 +02:00
The default form allocated under TMPDIR without the containment checks the explicit form used, so a TMPDIR pointing into the App checkout or the corpus would build the harness tree inside a source tree. Both branches now call one `assert_outside` helper. The temp root is checked before `mktemp` runs, so a refusal leaves nothing behind, and `pwd -P` resolves it first so a symlinked TMPDIR cannot slip past. Equality with the checkout, not only containment inside it, is refused. Executed: TMPDIR set to the checkout, to the corpus, to a symlink pointing at the checkout, and to a path that does not exist. All four exit 2 and create nothing. The seven earlier refusals still refuse, and the normal flow still runs end to end in both forms. Co-Authored-By: Paperclip <noreply@paperclip.ing>