feat(supervisor): netlink/syscall network setup so the privileged supervisor needs no workload-image tools
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 38/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- linux, rust
- 領域
- networking, security
調査の方向性
まず crates/openshell-supervisor-process/src/netns/mod.rs を読み、特に external ip、nsenter、nft、dmesg の外部呼び出し箇所を確認し、関連する Issue #2750、#2382、#1335 を調査してください。提案されている rtnetlink、setns/unshare、nf_tables、NFLOG のアプローチを検討し、その後 Docker、rootless Podman、Kubernetes における受け入れ基準を確認してください。変更されていない Alpine イメージ上で、workload-image にネットワークツールがなくても proxy mode が起動し、既存のツールを含むイメージでは従来の動作が維持されれば完了です。
索引モデルが issue の本文から書いたものです。
説明
User Story
As an OpenShell operator, I want a sandbox to start with the default generic Alpine image in proxy mode without the sandbox image having to ship iproute2/nftables, so that the #3116 Alpine default works on unmodified base images.
Problem Statement
In proxy mode the privileged supervisor sets up the sandbox network namespace by shelling out to tools resolved from the workload image: ip (netns/veth/addr/route — 32 call sites in crates/openshell-supervisor-process/src/netns/mod.rs), nsenter (9), nft (6), and dmesg (bypass monitoring). A bare Alpine image only ships busybox ip (no netns subcommand) and no nftables/iptables, so the supervisor fails at startup with Network namespace creation failed ... iproute2 is installed and the sandbox container exits.
The community base image previously provided these tools; #3116 removes that dependency by defaulting to bare Alpine, which surfaces the gap. Only setns (8 call sites) is already a direct syscall today — namespace/veth/route creation and firewall rules still spawn external binaries.
This is the networking subset of #2750 (make the privileged supervisor independent of workload-image code), scoped down so it can land as a focused change that unblocks #3116.
Impact / Why This Matters
Without this, the #3116 default (bare Alpine) cannot run in proxy mode — the enforced-egress path that Secure Agent Workspace and any default-deny deployment rely on. The current workarounds are to keep shipping iproute2/nftables inside every sandbox image (re-introducing the exact image dependency #3116 removes) or to disable proxy mode (losing egress isolation). Neither is acceptable for a generic default.
Proposed Design
Replace the privileged network setup's external-helper calls with in-process kernel interfaces, so the supervisor is self-contained:
- Namespace + veth + addresses + routes: route netlink (
rtnetlink) plussetns/unsharewith FD-owned namespaces (removes the/run/netnsrequirement). - Enter namespaces:
setnsdirectly (already used for the enter path). - Firewall / bypass rules: nf_tables netlink instead of the
nftbinary. - Bypass monitoring: NFLOG instead of
dmesg(also drops theCAP_SYSLOGrequirement; see #2382).
The supervisor binary stays musl-static so it carries no dynamic loader or NSS dependency on the workload image. Behavior on base images that already ship iproute2/nftables must be unchanged.
Acceptance Criteria
- A sandbox created from an unmodified
docker.io/library/alpine:*image starts in proxy mode with noip/nsenter/nft/dmesgexecuted from the workload image. - Network namespace, veth, addressing, and routing are created without spawning
ip/nsenter. - Bypass-detection firewall rules are programmed without the
nftbinary. - Bypass monitoring works without
dmesg/CAP_SYSLOG. - Verified on the Docker, rootless Podman, and Kubernetes runtimes.
- No behavior change for base images that already ship the tools.
Alternatives Considered
- Mount the tools from a trusted OpenShell image into the sandbox (Phase 1 of #2750): works, but drags dynamic libraries across libc boundaries (glibc tools on musl Alpine) and remains a mount/compatibility burden; the netlink approach removes the dependency entirely.
- Require the default image to bundle
iproute2/nftables: re-introduces the image dependency #3116 removes and bloats the generic default.
Scope
In: the networking subset above.
Out (remains in #2750): the Phase 3 execution boundary (deny execve after startup, unprivileged workload/SSH execution), the Podman health-check and Kubernetes PVC-seeding shells, the hostile-image test suite, and the VM guest path.
Related
- Sub-task of #2750
- Unblocks #3116 (proxy-mode networking on a bare Alpine default)
- Related: #2382 (NFLOG bypass detection), #1335 (nftables migration)
- 主要言語
- Rust
- スター
- 8.7k
- フォーク
- 1.3k
- 平均マージ
- 2日 7時間
- マージ済み PR(30日)
- 243
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
NVIDIA/OpenShell のほかの issue
-
area:docs
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
-
state:triage-needed
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
-
area:cli state:validated
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
state:triage-needed
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
-
area:build spike state:review-ready state:stale
難易度 2/5 半日 初心者へのやさしさ 68/100
NVIDIA/OpenShell の issue をすべて見る
似ている issue
-
risk:low runtime status:in-progress type:test
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
zeroclaw-labs/zeroclaw#11023 ·
-
good first issue refactor
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
EricSpencer00/Resilient#4835 · コメント 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
bisq-network/bisq-musig#204 ·
-
agent:ready documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
cesarferreira/stax#890 ·