feat: Bubblewrap (Linux) ExecutionResourceProvider - #336
Conversation
drscrewdriver
commented
Jul 29, 2026
- Add BubblewrapCodeExecutionResource with bundle/manifest/grant validation
- Add BubblewrapExecutionResourceProvider conforming to 4.1.4.2 contract
- provider_id=bubblewrap, supported_kinds=(code_execution,)
- Implements async_probe/async_ensure/async_health_check/async_release
- Linux-only conditional import in init.py
- Supports bind_ro/bind_rw/tmpfs/unshare_all/share_net configuration
- Add BubblewrapCodeExecutionResource with bundle/manifest/grant validation - Add BubblewrapExecutionResourceProvider conforming to 4.1.4.2 contract - provider_id=bubblewrap, supported_kinds=(code_execution,) - Implements async_probe/async_ensure/async_health_check/async_release - Linux-only conditional import in __init__.py - Supports bind_ro/bind_rw/tmpfs/unshare_all/share_net configuration
- 文件系统隔离:无法读 /etc/shadow、只读绑定、tmpfs 可写 - 进程隔离:PID namespace - 网络隔离:无网络访问 - 用户隔离:UID 映射 - 资源限制:tmpfs 大小 Workaround for AppArmor blocking bwrap: - sudo aa-disable /usr/bin/bwrap - OR sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
- 检测函数添加 /usr 绑定,解决 echo 找不到问题 - run_bwrap 添加 /usr、/bin 符号链接 - 修复 tmpfs 测试重复绑定问题 测试结果: 11 passed, 2 skipped (Provider 集成测试需对应分支)
- 文件头部文档字符串添加中文版本 - pytestmark skip reason 添加中文翻译
- 添加限制范围设置表格(9 种隔离能力) - 添加配置参数详解(文件系统/命名空间/进程控制/高级选项) - 添加默认只读绑定列表 - 添加 async_probe 返回的 capabilities 结构 - 中英文双语同步更新
|
Maintainer integration draft: #352. #352 preserves this PR's six commits and authors, merges current Per #342's evidence rules, #336 remains open and #352 remains draft until a representative Linux runner can produce real mechanism evidence without weakening AppArmor/userns policy. |
Maintainer handoff back to contributor@drscrewdriver, the Bubblewrap direction is being handed back to your original PR #336 because the available maintainer environments cannot produce honest unprivileged mechanism evidence:
The maintainer integration draft #352 preserves your six commits and contains reusable corrections:
Please resume ownership through #336 (or a successor based on current
When the branch and evidence are ready, mention #342 and we will review it promptly. #336 remains open as the active contributor-owned PR. |
|
@drscrewdriver,补充 #336 的架构验收边界:#354 已修正并合入 更新 #336 或 successor 时请保持:
已接受的 gVisor、Seatbelt、Landlock 实现与贡献历史没有被改写;本次只是把选择逻辑从 core 收回到通用 provider seam。 |