Skip to content

docs(proposal): add build isolation design for sandboxed builds#1077

Open
pavank63 wants to merge 1 commit intopython-wheel-build:mainfrom
pavank63:proposal/build-isolation
Open

docs(proposal): add build isolation design for sandboxed builds#1077
pavank63 wants to merge 1 commit intopython-wheel-build:mainfrom
pavank63:proposal/build-isolation

Conversation

@pavank63
Copy link
Copy Markdown
Contributor

Add design proposal for --build-isolation flag that sandboxes PEP 517 build backend subprocesses using ephemeral Unix users and Linux namespaces. Includes security findings from proof-of-concept testing with build-attack-test package.

See: #1019

@pavank63 pavank63 requested a review from a team as a code owner April 21, 2026 20:35
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 21, 2026

Warning

Rate limit exceeded

@pavank63 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 57 minutes and 11 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 57 minutes and 11 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 061d0301-f7ab-43b6-ae55-3bbe8ca10b7c

📥 Commits

Reviewing files that changed from the base of the PR and between 60e3892 and 5fb0f31.

📒 Files selected for processing (2)
  • docs/proposals/build-isolation.md
  • docs/proposals/index.rst
📝 Walkthrough

Walkthrough

This PR introduces documentation for a build isolation feature proposal. The proposal specifies a --build-isolation/--no-build-isolation CLI flag that sandboxes PEP 517 build backend invocations by creating ephemeral Linux users and isolating network, PID, IPC, and UTS namespaces via unshare. It details environment variable scrubbing, integration points in __main__.py, WorkContext, BuildEnvironment, and external_commands, cleanup procedures via signal handlers, UID mapping, and filesystem setup. The documentation enumerates isolated vs. non-isolated attack surfaces and includes security evaluation based on proof-of-concept testing. A single toctree entry is added to the proposals index to include the new documentation.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: adding a design proposal document for build isolation feature with sandboxed builds.
Description check ✅ Passed The description is directly related to the changeset, explaining the build isolation design proposal and its security implications from proof-of-concept testing.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/proposals/build-isolation.md`:
- Around line 206-210: The sentence claiming "Works in unprivileged Podman and
Docker containers" is contradictory because Docker's default seccomp may block
unshare; update the text around that sentence to make Docker support conditional
on seccomp/user namespace configuration: explicitly state that Podman works
unprivileged, and for Docker note that it only works if the container runtime
permits user namespaces/unshare (e.g., using a permissive seccomp profile or
enabling userns), and keep the existing note about Ubuntu 24.04 requiring sysctl
kernel.apparmor_restrict_unprivileged_userns=0; reference the existing terms
"unprivileged Podman and Docker containers", "unshare", and "sysctl
kernel.apparmor_restrict_unprivileged_userns=0" when making the clarification.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 81f43311-90aa-45a7-ac42-a78c1e652930

📥 Commits

Reviewing files that changed from the base of the PR and between c833650 and 60e3892.

📒 Files selected for processing (2)
  • docs/proposals/build-isolation.md
  • docs/proposals/index.rst

Comment thread docs/proposals/build-isolation.md
Add design proposal for --build-isolation flag that sandboxes PEP 517
build backend subprocesses using ephemeral Unix users and Linux
namespaces. Includes security findings from proof-of-concept testing
with build-attack-test package.

Signed-off-by: Pavan Kalyan Reddy Cherupally <pcherupa@redhat.com>
Co-Authored-By: Claude <claude@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant