How Cloud Infrastructure Teams Audit Platform Isolation Claims for Claude Code Codex Cursor and OpenCode
Sandbox claims and execution environments need separate audits.

Isolated VM environments for cloud coding agents should give each workload a dedicated kernel, narrowly scoped access, and audit logs the agent cannot alter. For Claude Code, Codex, Cursor, and OpenCode, the tool’s sandbox claims and the execution environment require separate audits. In production, agents should request infrastructure actions through a governed platform while cloud credentials remain outside their control.
Why isolation claims require infrastructure-level verification
The tool layer and the execution environment are architecturally separate. Coding tools handle agent logic and model inference, while the execution infrastructure has the controls for isolation, governance, and compliance. Neither layer proves the other is secure. A container namespace, a microVM with a dedicated kernel, a GitHub-hosted runner, and a local sandboxed process describe different boundaries, even when each is called “isolated.” An audit must first check which boundary is in place, then test what it stops.
That distinction becomes consequential when agents write files, install packages, run shell commands, and make network requests. Running locally can expose credentials in environment files, internal services, SSH keys, and sensitive context built up on a developer’s machine. The tool alone does not provide an enterprise audit trail, network policy, or a way to meet data residency compliance requirements. Remote execution changes where those controls can be enforced. Access then depends on the environment’s configuration and policies instead of the developer’s local setup, but those remote controls still need to be checked.
What Claude Code, Codex, Cursor, and OpenCode each provide at the sandbox layer
Claude Code’s GitHub action executes on the organization’s own GitHub runner, whether GitHub-hosted or self-hosted. The runner is therefore part of the audit scope. This setup can run unit tests, but deploying to a real environment or generating a preview URL requires additional infrastructure. The action’s placement on a runner does not, by itself, establish the runner’s filesystem scope, credential exposure, or isolation from other workloads.
OpenAI Codex separates cloud execution from local execution. OpenAI’s system card describes cloud tasks as running in an isolated container hosted by OpenAI, while CLI and IDE tasks use a local OS-enforced sandbox. Codex’s default workspace-write mode keeps network access off unless enabled in configuration. Its sandbox supports code changes and tests, but deployment with live services and end-to-end verification requires infrastructure beyond that sandbox.
Cursor Cloud Agents run in isolated VMs with parallel sub-agents. Cursor Blame, available with Enterprise, distinguishes tab completions, agent runs, and human edits, but attribution is not an isolation boundary. Cursor’s engineering described building “essentially enterprise IT for agents” because useful execution also requires tests, services, and APIs. Those dependencies expand the audit beyond the VM. Unit tests can run there, but deployment and end-to-end verification need more infrastructure.
OpenCode’s permissions operate at the policy-check layer. That is a different kind of control. Sensitive repositories require an explicit security review, disabled public sharing, restricted provider and tool access, changed permissive defaults, and an external operating-system or container sandbox. Across these tools, the audit begins where the tool’s provisions stop, particularly when a task needs real databases, deployed services, or a working preview URL.
The technical distinction that determines actual isolation strength
Containers share the host kernel, so their isolation depends on namespaces, cgroups, and hardening. A kernel exploit can defeat that shared boundary. MicroVMs instead place hardware virtualization between workloads, with a separate kernel for each workload. For multi-tenant deployments, that dedicated-kernel model is the appropriate baseline because the audit must establish whether a compromised workload can reach adjacent tenants even when its processes have separate namespaces.
The central audit question is therefore concrete. Which side of the kernel boundary does the workload run on? Kata Containers with Cloud Hypervisor, Firecracker, and gVisor represent different isolation approaches and should not be treated as interchangeable labels. An auditor should establish the deployed mechanism and whether it meets the dedicated-kernel requirement, rather than accept “sandboxed” as sufficient evidence.
The same separation applies to governance controls. Cursor’s Sandbox Mode and hooks govern Cursor, while GitHub Copilot’s audit logs cover Copilot sessions, giving these controls tool-specific scope. A platform-level infrastructure layer is needed to apply consistent policy across multiple tools, including who may request an action, which actions are permitted, and where the resulting evidence is stored.
Auditing the filesystem and network boundary claims
Each session should get a clone of the target repository and nothing else. It should have no access to other repositories, persistent home directories, shared volumes, or state from previous sessions. Ambient credentials make this boundary especially important. In the infrastructure case described in the brief, an agent committed a .env file containing API keys to a private repository. The commit stayed in history after the file was reverted, and credentials had to be rotated across four downstream services.
The filesystem verification should inspect actual mounts and teardown behavior. Confirm that the container or VM has no bind-mounts outside the checked-out repository and that no persistent home directory survives the session. Each session should start from a clean definition file with only the tools and access its task requires. Image hardening narrows the available attack surface further. Remove curl, wget, SSH clients, and other exfiltration primitives where they serve no purpose in the task, using the same logic applied by distroless or other minimal container images.
Network access needs a separate enforcement test. Legitimate destinations are typically the LLM API, the project’s package registries, including npm, PyPI, or Maven, and an internal artifact registry where applicable. Default-deny egress with an explicit allowlist is the appropriate posture because blocklists cannot anticipate unknown destinations. Confirm that enforcement occurs at the network layer rather than only in application configuration, and that outbound connections are logged. Wiz’s GhostApproval finding concerned symlink-based writes outside the workspace, so it supports scrutiny of sandbox boundaries without proving anything about a deployment’s egress policy.
Auditing identity, credential handling, and secret scanning controls
Every session must be tied to a named human identity. Without that mapping, access reviews, offboarding, and incident attribution lose their anchor. Claude Code, Codex, and Cursor support SAML SSO, but availability and provisioning controls depend on the product tier. Claude Code’s Team tier includes Google/Microsoft SSO, while full SAML/OIDC SSO for any IdP requires Enterprise. SCIM and audit logs also require Enterprise, so the audit must examine the contract as well as the settings.
Before an agent reaches a production repository, confirm that SSO is configured and that each request can be attributed to a specific person in the SIEM. Then check how credentials are handled, apart from sign-in. An authenticated session can still have more privileges than it needs. Agents should ask for infrastructure actions through an MCP or API interface to a platform that holds the cloud credentials, checks policy before every apply, and logs each action.
The credential inspection should look for cloud credential files, ambient AWS/GCP/Azure credential chains, and SSH private keys outside the task’s scope. None should be available to the agent. Agent PRs should also identify the tool and session ID so security operations can move from a code change to its originating session in the SIEM. Secret scanning must enforce the boundary at the PR as well, because preventing credentials from entering a repository cannot depend on the agent choosing correctly. The notes identify credential commits as more frequent among coding agents than human developers, making infrastructure enforcement preferable to treating the problem as model quality alone.
Auditing audit log integrity and PR policy gates
Audit evidence must record actions that succeed as well as those that fail. Record the prompt, tool call, parameters, and result, then store that record outside the agent’s environment in an immutable audit trail. The agent cannot control its own evidence. Confirm that logs reach the enterprise SIEM, that retention meets the applicable compliance requirements, and that the execution role has no write access to the log store. SOC 2 Type 2 requires evidence that controls worked throughout the audit period, which point-in-time screenshots cannot show.
Agent PRs must pass the same owner review, coverage thresholds, lint, SAST, and secret detection required of human PRs, without pilot exemptions. A review requirement alone is insufficient. In the infrastructure case, an agent asked to “add logging to the payments service” also changed retry behavior under error conditions, and a reviewer rubber-stamped the large diff. The required gates must be enforced, only named roles should have the right to override them, and every bypass should appear in the audit log.
Verification should establish that agent PRs cannot merge without the required checks and that bypass events are recorded. Incident response must be set out before an agent does something unexpected. Suspend the session token immediately rather than only revoking the PR, then review the logs, determine the impact, and rotate credentials the agent could access. Independent vulnerability validation needs its own separation as well. The agent verifying a finding should be strictly isolated from the agent that discovered it, avoiding correlated failure between discovery and verification.
How cloud environments can enforce these controls by design
A governed cloud environment makes the execution platform, rather than each agent’s defaults, the enforcement point. Its configuration defines which files, services, and actions a session can reach. That changes the unit of audit. A platform that can run Claude Code, Codex, Cursor, and OpenCode under the same controls lets teams audit the shared execution layer without rebuilding governance for each harness. How each tool behaves still needs to be checked on its own.
For Kubernetes deployments, pod-per-session with gVisor or Kata Containers is the minimum described for untrusted agent workloads. For teams outside Kubernetes, Docker containers with explicit bind-mounts scoped to one checked-out repository provide a baseline. Those baselines do not show that the isolation is equally strong. Multi-tenant workloads still need the dedicated-kernel assessment described earlier. Managed sandbox platforms, including Firecracker microVM-based services, can supply that isolation layer without requiring teams to operate their own hypervisor stack.
Within this model, the unit of completed agent work is a reviewable pull request that a human can merge, comment on, or send back. Work done in parallel still needs the usual review. Scheduled and event-driven tasks triggered by production alerts, CI failures, or Linear tickets should use the same isolation and logging controls as interactive sessions. More concurrent agents do not justify broader access or weaker gates.
Making the audit repeatable as agent tooling changes
An isolation audit must survive changes in capabilities, vulnerabilities, and commercial tiers. CVE-2026-21852, which affected Claude Code 2.0.65 and has been fixed, shows why approval at deployment time is not enough. It was a trust-model vulnerability. The MITRE CVE record lists a CVSS 4.0 base score of 5.3, while a vulnerability-database-enriched CVSS 3.1 score of 7.5 also circulated. Keeping those classifications distinct prevents a vulnerability notice from becoming an inaccurate claim about the execution boundary.
An upgrade or downgrade may change access to provisioning or audit capabilities, so entitlement changes belong in the review process. Pwn2Own Berlin 2026 added a coding agents category targeting Claude Code, OpenAI Codex, and Cursor, establishing sandbox escape as an active research target.
The standing process should automate synthetic secret PRs, egress probes, and log-write access checks on a defined cadence. New tools should face the same tests. An agent-agnostic execution environment gives teams a stable layer where they can test changing harnesses without rebuilding governance. The operational measure is pull requests shipped through that environment with evidence that survives incident review.


