Pull-request target builds share no writable home, cache or socket (v1.36.1) #118

Merged
mi merged 4 commits from mihoe/pull-request-target-fresh-home into main 2026-10-05 09:21:38 +02:00
Owner

Security fix for pull-request target builds (PR#117): a target build now shares nothing that the repository's other builds can write.

  • werkdock: a fresh, empty home per build as /root; never .git/werkator/buildenv/home, never werkdock.gradleHome.
  • Docker: no shared Gradle volume, no Docker socket.
  • A target definition without a sandbox, or with docker.socket: true, is refused at start.

Found in the AI-review trial on mih09: ordinary CI builds run PR code with the shared home read-write and could plant e.g. a sitecustomize.py that the next target build, which holds the host's secrets, would execute.
Details: the PR-doc under docs/prs/.

🤖 Generated with Claude Code

Security fix for pull-request target builds (PR#117): a target build now shares nothing that the repository's other builds can write. - werkdock: a fresh, empty home per build as `/root`; never `.git/werkator/buildenv/home`, never `werkdock.gradleHome`. - Docker: no shared Gradle volume, no Docker socket. - A target definition without a sandbox, or with `docker.socket: true`, is refused at start. Found in the AI-review trial on mih09: ordinary CI builds run PR code with the shared home read-write and could plant e.g. a `sitecustomize.py` that the next target build, which holds the host's secrets, would execute. Details: the PR-doc under `docs/prs/`. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
mi added 3 commits 2026-10-05 07:30:23 +02:00
On the host it would run in the host user's HOME, and the socket reaches a daemon every socket build commands.
Fragments and committed files checked on their own are skipped; the sandbox may come from the layers they join.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
werkdock binds a fresh home beside the build's fresh workspace as /root instead of .git/werkator/buildenv/home,
and mounts no werkdock.gradleHome; Docker mounts neither the per-repository Gradle volume nor the socket;
the native runner refuses such a build. The watcher removes the home with the workspace.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mi added 1 commit 2026-10-05 07:31:43 +02:00
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mi marked the pull request as ready for review 2026-10-05 09:21:23 +02:00
mi merged commit d23f43bf49 into main 2026-10-05 09:21:38 +02:00
mi deleted branch mihoe/pull-request-target-fresh-home 2026-10-05 09:21:38 +02:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mi/werkator#118