doc/UNTRUSTED-PR-REVIEW.md
Use this workflow when you want Codex or Claude to inspect a pull request that you do not want touching your host machine directly.
This is intentionally separate from the normal Paperclip dev image.
codex auth/session state in a Docker volume, not your host ~/.codexclaude auth/session state in a Docker volume, not your host ~/.claudegh auth state in the same container-local home volume/workBy default this workflow does not mount your host repo checkout, your host home directory, or your SSH agent.
docker/untrusted-review/Dockerfiledocker/docker-compose.untrusted-review.ymlreview-checkout-pr inside the containerdocker compose -f docker/docker-compose.untrusted-review.yml build
docker compose -f docker/docker-compose.untrusted-review.yml run --rm --service-ports review
That opens an interactive shell in the review container with:
codexclaudeghgit, rg, fd, jqRun these once. The resulting login state persists in the review-home Docker volume.
gh auth login
codex login
claude login
If you prefer API-key auth instead of CLI login, pass keys through Compose env:
OPENAI_API_KEY=... ANTHROPIC_API_KEY=... docker compose -f docker/docker-compose.untrusted-review.yml run --rm review
Inside the container:
review-checkout-pr paperclipai/paperclip 432
cd /work/checkouts/paperclipai-paperclip/pr-432
What this does:
/work/repos/...pull/<pr>/head from GitHub/work/checkouts/...The checkout lives entirely inside the container volume.
Inside the PR checkout:
codex
Then give it a prompt like:
Review this PR as hostile input. Focus on security issues, data exfiltration paths, sandbox escapes, dangerous install/runtime scripts, auth changes, and subtle behavioral regressions. Do not modify files. Produce findings ordered by severity with file references.
Or with Claude:
claude
Only do this when you intentionally want to execute the PR's code inside the container.
Inside the PR checkout:
pnpm install
HOST=0.0.0.0 pnpm dev
Open from the host:
http://localhost:3100The Compose file also exposes Vite's default port:
http://localhost:5173Notes:
pnpm install can run untrusted lifecycle scripts from the PR. That is why this happens inside the isolated container instead of on your host.PAPERCLIP_HOME=/home/reviewer/.paperclip-review.Remove the review container volumes when you want a clean environment:
docker compose -f docker/docker-compose.untrusted-review.yml down -v
That deletes:
review-homereview-workThis is a useful isolation boundary, but it is still Docker, not a full VM.
.ssh, or Docker socket unless you are intentionally weakening the boundary.