CSE Roadmap

Core tier · about 4 hours · 13 parts

Part 8 of 13 · 1 min read

How to build it so it holds up

  • Run model-written code in a boundary that does not trust it: separate container or microVM, non-root user, read-only root, a writable scratch directory, no host mounts.
  • Deny network by default; if needed, route through a proxy with a host allowlist, and log requests.
  • Scrub the environment: pass only the variables the task needs; never inherit secrets.
  • Set limits on CPU, memory, file size, process count and wall clock, and kill the whole process group on timeout.
  • Confine file tools with realpath plus commonpath against a resolved root, reject null bytes, and prefer opening relative to a directory descriptor with O_NOFOLLOW.
  • Validate URLs by parsing, and re-validate after each redirect and DNS resolution (rebinding), or block internal ranges at the network layer.
  • Allowlist commands and arguments; prefer purpose-built tools to a general shell.
  • Make the sandbox disposable: one per task or session, destroyed afterwards, so persistence is limited.
  • Log and alert on denials (module 9).