add support for gVisor over podman #93
Labels
No labels
bug
cannot reproduce
duplicate
enhancement
help wanted
invalid
need info
need triage
need verification
not a bug
question
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
claudiomaradonna/azkaban#93
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@aramaki we need a brief for this to understand how much intensive is
Route: brief 4210
@claudiomaradonna A new feature, an extension of what the launcher already has: the per-launch engine control pair
--unmask-proc/AZKABAN_UNMASK_PROCinbin/azkaban. It runs the client container on Linux under gVisor'srunscOCI runtime instead of the engine's defaultcrun, so the agent's commands meet a userspace kernel rather than the host kernel directly.Problem
The container is the containment boundary: Codex and Claude launch with their native approval checks disabled, and the README's Security model says a rootless container "is not a virtual machine" and is no defense against every kernel or container-runtime vulnerability. Nothing today chooses a stronger runtime for one launch. Podman takes the OCI runtime from
containers.conf[containers] runtime, andpodman runhas no per-container runtime option. The shell workaround,CONTAINERS_CONF=<file> codex ., makes the engine ignore every system and user config file for that launch and applies to each engine call the launcher makes, builds and pulls included; the same setting cannot live in an identity'senv, sinceCONTAINERS_*is host-sensitive and the launcher drops it (_is_host_sensitive_env_nameinbin/azkaban, guarded bytests/integration/test_env_passthrough.sh).Goals
env.<client>>env> built-in default. Check: an integration test in the style oftest_common_unmask_proc_lifts_the_proc_masks_only_when_asked(tests/integration/test_runtime.sh) shows the runtime reaching the engine for each layer, shows the launch unchanged when nothing sets it, and shows an unaccepted value stopping the launch;--helpprints the option and the control.runscrather than quietly under the default runtime. Check: a real-Podman case intests/e2e/, on a host that hasrunsc, launches each client image and shows the container ran under gVisor, from the engine or from inside the container; a launch the engine served on the default runtime fails the case.--userns=keep-id:uid=1000,gid=1000,--pids-limit 512,--memory,--http-proxy=false,--security-opt unmask=/proc/*— and the mounts, each showing the effect it has today or naming the difference indocs/configuration.md, which also states how the nestedbwrapsandbox behaves under gVisor.runscand where it comes from; withSTUB_HOST=Darwinthe selection never reaches thecontainerstub and the documented behavior holds.make testpasses withtest_runtime.sh, the custom-image tests and the install tests unchanged;podman buildkeeps the default runtime.runsc. Check: a reviewer confirmsREADME.md(Features, the options table, Security model),docs/configuration.md,docs/installation.md's prerequisites, andexamples/env.azkaban.examplename the control, state that the host suppliesrunscand that azkaban does not install it, and give the gVisor cost without claiming it holds a command crafted to escape it.Constraints
containerengine keep what they have, as--unmask-procdoes.install.shgoes on installing Podman alone, andrunscstays a host prerequisite you bring, since AGENTS.md § Engineering gates third-party sources. The host for G2 and G3, withrunscat a named version, is what you provide; the real-Podman gate stays outside Verify.AZKABAN_prefix (test_env_passthrough.sh, whose control list gains the new name), the help surface (test_arg_parsing.sh), the host-sensitive filter named above, the custom-image build and approval path, and the publishedbasecontract in docs/development.md. The recording stub's value-taking flag list intests/stub/engine-common.shis extended in place.bwrapjail work under gVisor beyond documenting how it behaves.run-reviewsbrings the security reviewer.Where the weight sits: G1, G5 and G6 follow the
--unmask-procpattern and are patterned work. G2 and G3 carry the cost, and two things settle them on a machine that has rootless Podman andrunscrather than on paper: whether the engine accepts that runtime with the launcher's fixed flags, and how the launcher asks for a runtime at all now thatpodman runtakes none — a launcher-ownedCONTAINERS_CONF, a crun handler, or another waydesignshould weigh against such a host.@claudiomaradonna approve it with a
@motokocomment, or say what to change.