4 ms·
What is the main benefit over doing something like: docker run --runtime krun --rm -it -v $(pwd):/workspace/$(basename $(pwd)) -w /workspace/$(basename $(p
by sureglymop 2mo ago
What is the main benefit over doing something like:
docker run --runtime krun --rm -it -v $(pwd):/workspace/$(basename $(pwd)) -w /workspace/$(basename $(pwd)) --network restricted-net ghcr.io/openai/codex-universal:latest sh
That runs the codex OCI in a qemu microvm. From what I can see, more fine grained network and filesystem access control as well as convenience?
- mdavidn 2mo agoAside from hiding agent credentials from the agent, it also runs an isolated Docker Engine for the agent to use freely.
- defraxi 2mo agoThe credentials part... https://docs.docker.com/ai/sandboxes/security/credentials/ https://docs.docker.com/ai/sandboxes/security/credentials/
- ShinyLeftPad 2mo agoIt seems to do a good job of not stating the actual threat model anywhere.
- codethief 2mo agoYes, pretty much, except for one detail: > That runs the codex OCI in a qemu microvm. AFAIU it's actually the other way around: krun spawns a libkrun-based (not QEMU-based) VM inside a crun container. Source: https://github.com/libkrun/libkrun/discussions/538#discussioncomment-15765542 https://github.com/libkrun/libkrun/discussions/538#discussio... So with your solution you get the additional security benefit of containerizing the hypervisor on the host.
- figmert 2mo agoOnce you have a vm, the container provides next to no additional security benefits. It's just unnecessary overhead at that point.
- codethief 2mo agoThat's not correct. Virtio devices have different security properties and many of them expose the host system to considerable risks. Using containerization on the host is one way to limit the latter. See e.g. https://github.com/libkrun/libkrun/#security-model https://github.com/libkrun/libkrun/#security-model for more details.
- figmert 2mo agoWell, I stand corrected! Thanks for the link