Skip to content

v1.0.0

Choose a tag to compare

@heyvaldemar heyvaldemar released this 11 Nov 01:49

A Coder template is Terraform, and whoever can edit one decides what the workspace pod is. This release puts the boundary around an AI agent's Coder workspace where a template cannot move it: in the cluster.

Coder Community v2.38.6 on Kubernetes, with every workspace inside the boundary of kubernetes-ai-agent-sandbox v1.4.0, vendored verbatim with each file's sha256. Proven on a fresh kind cluster in GitHub Actions, CPU only, at no cloud cost. A reference, not a product.

What is new

  • Coder from its chart archive by sha256, the server and the official PostgreSQL 17 image by digest, every changed default in helm/values.yaml with its reason. Stable channel, not mainline.
  • The sandbox's kind cluster, gVisor, RuntimeClass, admission policy and resolver, unchanged; scripts/check-vendor.py checks the bytes on every Verify run and against GitHub weekly. ADR 2 lists every place this repository differs from the sandbox. The sandbox's policy, verbatim, admits the workspace this template writes.
  • One policy of this repository's own: a workspace runs the pinned workspace image and its gate the sandbox's busybox.
  • A template that fits the boundary: gVisor, read-only, no API token, the workspaces' resolver, the sandbox's gate, providers pinned by hash. GitHub external authentication optional.
  • The e2e, 83 checks in about four and a half minutes: the workspace through Coder on gVisor's kernel; from inside it, the Coder server answers and the internet, the Kubernetes API, the metadata service, another namespace, Coder's Postgres and DNS do not; the same targets answer from outside; the provisioner's rights asked of the API server; nineteen edited templates refused through Coder's build log (seven by the sandbox's policy, one by this repository's, five by Pod Security, six by RBAC); the agent's one credential measured; and what the Coder server looked up while it ran.
  • server-egress.yml: the server's lookups with Coder's defaults, its internet closed, against this repository's values.
  • Fifteen planted violations for the static checks, make up / demo / test / check / down, docs/first-workspace.md, a threat model and six decision records.

What was found while building it

  • The Terraform Kubernetes provider writes runAsNonRoot=false into a container's security context when the block leaves the field out, and Pod Security refuses the pod. The first build was refused that way.
  • The agent's token cannot act as a user or reach Kubernetes (401 at both), and it does fetch the owner's Git SSH private key from inside the workspace. It also asks for the owner's GitHub token; in CI nobody links an account, so the answer is a sign-in link, and that the same call returns the token once linked is read in Coder's code, not measured.
  • With Coder's defaults the server looks up telemetry.coder.com, api.github.com, five Google STUN servers and checkpoint-api.hashicorp.com on its own; with this repository's values, none. Template builds look up four names for Terraform's providers. A provider mirror is the next release's work.
  • Telemetry off is not silent on a deployment that once had it on: one last report goes out at the next start. Seen on a local kind cluster with a reused database and read in the code; CI checks the fresh-install case, which dials nothing.
  • A template that names another workspace's claim mounts it and reads its files. The boundary is the namespace, not the workspace; measured on every run and listed as a residual risk.

How it was checked

  • e2e on this commit: 42941113322, 83 of 83. Verify on this commit: 42941113344. Server egress: 42918598713.
  • The release archive, its keyless cosign signature and its SLSA provenance are attached by release-assets.yml and verified there the way a stranger would; the commands are at the top of that workflow.