Repository navigation
Releases
Releases · heyvaldemar/kubernetes-coder-agent-workspaces
v1.2.0
The last claim the README read in Coder's code instead of measuring is now measured, and one claim the docs made is corrected.
What is new
- The linked external-auth case, measured. The endpoint in
manifests/model/also stands in for an OAuth2 provider: single-use codes, a random access token per exchange, only its sha256 logged. The e2e configures it as a second external-auth provider (tests/e2e/values-e2e-oauth.yaml), declares it in the tampered fixture only, and links it as the owner through Coder's own OAuth flow: the browser's half over the runner's port-forwards, the code exchange and validation from the Coder server inside the cluster. Step 6b: from inside a workspace the agent's token gets the owner's access token, and its sha256 is the one the provider logged when it issued it. That is how git gets its token in a Coder workspace; now the README's table says it from a run.
What was corrected
- ADR 4 and the threat model said a namespace per user would close the shared-claim finding (a template that names another workspace's claim mounts it). It would not on Community: the one in-process provisioner has to reach every user's namespace and the template chooses which, and admission cannot tell the right claim from the wrong one when the template writes every name and label it could compare. It takes an identity per tenant at admission time. Both documents now say so.
How it was checked
- e2e on this commit: 43053488976, 100 of 100. Verify on this commit: 43053488432.
- The release archive, its keyless cosign signature and its SLSA provenance are attached by
release-assets.ymland verified there the way a stranger would; the commands are at the top of that workflow.
v1.1.0
Coder's own agent runs under the same boundary now, and the Coder server reaches nothing outside the cluster.
What is new
- Coder Agents, driven by a model that has been talked into it (ADR 7).
manifests/model/is a scripted OpenAI-compatible endpoint in its own namespace, reached by the Coder server and nothing else;tests/e2e/agents.pyregisters it through Coder's API and starts a chat on the e2e workspace. The agent'sexecutetool runs in the workspace on gVisor's kernel, and each of eight attempts the model asks for dies at the boundary: the internet by name and by address, the metadata service, the Kubernetes API, an API token on disk, another namespace's service, DNS, and the model endpoint from inside the workspace. The model's key stays with the Coder server. - Template builds without the internet. Terraform's providers come from a filesystem mirror the installing machine fills from the templates' lock file (signatures checked as it downloads), on a volume the Coder server mounts read-only; in the cluster Terraform checks each package against the lock file again.
- No way out for the control plane. The Coder server's 443 rule moved to
manifests/optional/, applied only for GitHub sign-in or a model provider on the internet. The e2e requires that the server look up no outside name from its start to the end of the run, two template pushes, 24 builds and the Coder Agents chat included, and that none of its network policies name an outside address. - Eighteen planted violations for the static checks, three new: a model step that reads a credential without being marked secret, a dropped provider mirror, and the server's way to the internet back in the default policies.
What was found while building it
- With Coder Agents, the model provider receives whatever a tool reads. The scripted model asked the agent to print
CODER_AGENT_TOKEN, then to fetch the owner's Git SSH key with it, and both reached the model endpoint in the next request. That is how tool results are meant to travel, from the workspace to the Coder server over the workspace connection and from the server to the model; the workspace's network policy never sees that path. Measured on every run and listed in the threat model: keep the model endpoint where the operator controls it, and scope what the owner's git key and external-auth apps can do. - During the chat the server looked up no outside name: on a Community deployment nothing reports Agent Time to Coder, as the code says (the publisher is gated on a license).
- From a filesystem mirror Terraform reports each provider "(unauthenticated)": the signatures were checked when the mirror was built, and the lock file's hashes are what Terraform checks in the cluster.
How it was checked
- e2e on this commit: 42945327313, 98 of 98. Verify on this commit: 42945327561. Server egress: 42944155466.
- The release archive, its keyless cosign signature and its SLSA provenance are attached by
release-assets.ymland verified there the way a stranger would; the commands are at the top of that workflow.
v1.0.0
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.yamlwith its reason. Stable channel, not mainline. - The sandbox's kind cluster, gVisor, RuntimeClass, admission policy and resolver, unchanged;
scripts/check-vendor.pychecks 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=falseinto 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 andcheckpoint-api.hashicorp.comon 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.ymland verified there the way a stranger would; the commands are at the top of that workflow.