Codex container sandbox
Skill santiago-afonso/codex-container-sandbox/skills/codex-container-sandbox
Run Codex CLI inside a Podman container with full internet access but filesystem exposure limited to the repo root + explicit bind mounts; use when you want yolo/web-search without giving the agent access to your whole host filesystem.From its SKILL.md
npx -y skills add santiago-afonso/codex-container-sandbox --skill codex-container-sandboxAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
2.1 KB, 498 tokens by cl100k_base, as published. Nobody here has run it
codex-container-sandbox
Use this when you want:
- Full egress/network for
codex(web search, fetching, etc.) - Tight filesystem boundaries via container bind mounts (repo root + explicit allowlist)
This repo contains a wrapper script intended to be installed as codex-container-sandbox.
Workflow
-
Build the image
From the repo root (this repository):
podman build -t localhost/codex-container-sandbox:latest -f Containerfile . -
Install the wrapper
install -m 0755 codex-container-sandbox ~/.local/bin/codex-container-sandbox -
(Optional) Configure extra mounts
Create
~/.config/codex-container-sandbox/config.sh:CODEX_CONTAINER_SANDBOX_IMAGE="localhost/codex-container-sandbox:latest" # Extra read-only mounts (mapped under /home/codex/... if under $HOME) CODEX_CONTAINER_SANDBOX_RO_MOUNTS=( "$HOME/.local/bin" ) # Extra read-write mounts CODEX_CONTAINER_SANDBOX_RW_MOUNTS=( "$HOME/.cache/uv" "$HOME/tmp" ) -
Login once inside the container
codex-container-sandbox --shell codex login -
Run the self-test (recommended)
./selftest.shIf this repo is vendored as a git submodule at
./codex-container-sandbox/(for example in a dotfiles repo), either:cd codex-container-sandbox && ./selftest.sh, or- run
./codex-container-sandbox/selftest.shfrom the parent repo root.
-
Run Codex
codex-container-sandbox exec "Summarize this repo"
Safety notes
- This wrapper runs Codex in full-yolo mode (
--dangerously-bypass-approvals-and-sandbox) with full networking. Anything mounted into the container can be exfiltrated. - Keep mounts minimal; do not mount secrets, password stores, SSH keys, or large chunks of
$HOMEunless you intend to expose them.
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.