Skip to content

Harden sandbox escape boundaries - #828

Merged
ewhauser merged 1 commit into
mainfrom
codex/sandbox-escape-hardening
May 2, 2026
Merged

ewhauser merged 1 commit into
mainfrom
codex/sandbox-escape-hardening

Conversation

@ewhauser

@ewhauser ewhauser commented May 2, 2026

Copy link
Copy Markdown
Owner

Summary

  • close a host-path TOCTOU window in ReadWriteFS.Mkfifo by creating FIFOs relative to a resolved sandbox-confined parent directory handle
  • install a sandbox-owned default HTTP transport that ignores host proxy environment variables and enforces private-range checks during the actual dial
  • add regression coverage for the FIFO containment and network transport boundary cases
  • update SPEC.md to document the hardened filesystem and network guarantees

Security notes

This came out of a focused sandbox escape review. The filesystem issue was limited to explicit read-write host-backed filesystem mode, where Mkfifo used a checked absolute host path for the final host operation. The network issue affected enabled sandbox networking by letting Go's default transport consult ambient proxy configuration and perform its own dial-time resolution after preflight checks.

Scan artifacts from the local review are under /tmp/codex-security-scans/gbash/79318321aa89_20260502T215553Z/.

Verification

  • go test ./fs ./network
  • make test
  • make lint
  • git diff --check
  • cross-compiled the ./fs test binary for linux, freebsd, netbsd, openbsd, dragonfly, solaris, and aix helper coverage

@ewhauser
ewhauser merged commit 888951c into main May 2, 2026
16 checks passed
@ewhauser
ewhauser deleted the codex/sandbox-escape-hardening branch May 2, 2026 23:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant