Paper
IsolationModel WeightsAI AgentsConfidential ComputingAttestationReference Architecture

The Workload Is the Adversary

Early research. Nine hypotheses are written down, each with what would show it wrong. None has been tested. A lab to test the first four at small scale is being built, and results will be published here, including the ones that go against me. The coding-agent material comes from vendor documentation. The training-cluster material is study: I haven't operated a training cluster, and I'm working from public research.

1. Why this matters

Most security architecture protects workloads from outsiders. The perimeter, the identity system and the network rules keep attackers away from the programs an organization runs, and inside, those programs are trusted to do what they were written to do.

AI systems put a possible adversary inside the boundary in several ways at once. A coding agent follows instructions it read in a file someone else wrote. A training job runs code from many people and libraries over data nobody fully read. A model can carry a backdoor planted in its training data. A tenant on a shared accelerator is someone else's workload a few memory addresses away. And the asset next to these workloads, model weights, is among the most valuable files in the industry.

The design question this paper asks is how to build environments that stay defensible when the workload running inside them is the attacker.

2. Start here: the minimum viable version

If you run coding agents on code you didn't write, such as in CI on pull requests, four controls cover most of the risk:

If you hold model weights, the equivalent starting point:

Everything after this section is about why those controls, what they assume, and where they stop working.

3. The assumption that breaks

Classical isolation rests on a few guarantees that are easy to forget because they usually hold. The operating system clears memory before giving it to another process. The kernel mediates every access to devices and the network, so host policy sees everything. The workload's own logs describe what it did. Code that came from inside the organization was written to do the organization's work.

Each of these weakens for AI workloads:

So the design rule is to place every boundary and every source of evidence at a layer the workload can't reach.

4. One problem at two scales

The small case: a coding agent in CI

A CI job runs a coding agent over a pull request. The pull request's author wrote the agent's configuration: hooks that run shell commands, MCP servers that start as local processes, instruction files that steer the model. In Claude Code's headless mode (claude -p and the Agent SDK), the workspace trust dialog never appears, and according to the permissions documentation the repository's hooks, environment block, helper commands and project MCP servers apply without it. The runner's secrets are in the environment those processes start in. The workload, meaning the agent plus everything the repository told it to do, is under the attacker's control and running inside the boundary with real credentials.

The post Headless is the hard case covers the Claude Code details.

The large case: a training cluster

A frontier training run is a workload spread over thousands of accelerators, connected by high-speed interconnects, reading from parallel storage, placed by a scheduler. Its code is the organization's own plus open-source libraries plus their dependencies. Its data is too large to read. Its output, and every checkpoint along the way, is a copy of the weights.

RAND's 2024 report Securing AI Model Weights frames the threat. It lists 38 attack vectors on frontier model weights and defines five security levels, from SL1, the lowest, up to SL5, intended against the most capable state operations. The SL5 Task Force, a separate effort, says current practice at frontier AI organizations doesn't reach SL5. I'm still reading the RAND report in full, so I use it here only for that frame: the threat to weights includes insiders and the workloads already running next to them.

The two cases share a shape. Untrusted instructions or code run inside the boundary, next to something valuable, with credentials the environment gave them. The difference is the value of the asset and the size of the attacker it draws.

5. Where AI compute breaks classical assumptions

These are the places I've found, from public research and vendor material, where the components of an AI cluster break an assumption that isolation designs usually make. This section is study notes, and I expect people who work closer to the hardware to correct parts of it.

Accelerator memory. In January 2024 Trail of Bits published LeftoverLocals (CVE-2023-4969). On affected Apple, AMD, Qualcomm and Imagination GPUs, GPU local memory wasn't cleared between programs, so one process could read what another left behind. NVIDIA confirmed its devices weren't affected, so this isn't a flaw in the GPUs most training clusters run. It's an example of an assumption that held on one vendor's hardware and failed on others'. Their proof of concept recovered about 181 MB per query from another user's LLM session (a 7B model in llama.cpp on an AMD Radeon RX 7900 XT). AMD's mitigation was an operating mode an administrator has to enable. The workaround Trail of Bits described for users was changing every GPU kernel that uses local memory to clear it, and they argued the real fix belongs at the vendor or driver level. A tenant boundary that relied on the operating system's memory guarantees didn't have them on the accelerator. Device isolation on the host also depends on the IOMMU remapping device memory access. A host without one can't safely hand a device to a guest.

Interconnects. RDMA fabrics such as InfiniBand and RoCE move data directly between machines' memory, and GPUDirect RDMA lets a network card read and write GPU memory directly. The data path bypasses the host kernel's network stack. My understanding is that host firewalls and kernel-level network telemetry don't see that traffic, and isolation has to come from the fabric itself, such as InfiniBand partitions set by the subnet manager. This is the claim in this paper I'm least sure of, and the lab can only test a software version of it.

Schedulers. Cluster schedulers such as Slurm run a job as the user who submitted it, on nodes shared across jobs over time, with shared filesystems governed by ordinary file permissions. Slurm's usual authentication, MUNGE, uses a key shared across the cluster. The scheduler decides placement, and placement decides which jobs share a node, a fabric partition and a filesystem. In Kubernetes, pods on a node share its kernel unless a sandboxed runtime is used.

Checkpoint storage. Training writes checkpoints often, and each one is close to a full copy of the weights, usually with optimizer state. They sit on parallel storage that many jobs and people can reach. My inference is that custody tends to focus on the final weights and the serving path, while checkpoints get the access model of the training storage. That's a guess, and it's one of the hypotheses below.

Data. Research published in October 2025 by Anthropic, the UK AI Security Institute and the Alan Turing Institute found that around 250 poisoned documents planted a backdoor in models from 600 million to 13 billion parameters, whatever the size of the clean data. The backdoor they tested was narrow and low-risk, and the finding is about how little data it takes. Training data is part of the workload, and it can be hostile in the same way the code can.

6. Hypotheses

Each hypothesis has a falsifier. H1 to H4 can be tested at small scale in the lab, and H9 in the drift lab. H5 to H8 need data-center hardware, practitioners, or both.

H1. A boundary with its own kernel stops what container hardening misses. For hostile agent workloads, a VM or microVM boundary stops escape and exfiltration attempts that a container with seccomp and Landlock doesn't, at overhead acceptable for CI. Wrong if a hardened container or gVisor stops every tested attempt equally, or the VM overhead makes teams route around it.

H2. Telemetry from below sees what the workload's own record misses. Host-level eBPF telemetry records agent side-channel actions (a hook's outbound connection, an MCP server's file reads) that the agent's own telemetry and the vendor's server-side transcripts don't show. Wrong if the agent's own record shows everything host telemetry shows, in the lab tests.

H3. Narrow identity and egress bound an injected agent more than a content filter does. With a narrowly scoped credential and an egress allowlist, injected instructions achieve materially less than with a broad credential behind a prompt filter. Wrong if exfiltration success in the lab is similar under both setups.

H4. Attested key release turns custody into a deterministic decision. Encrypting weights at rest, with the key released only to an environment whose boot chain and image have been measured and checked, makes copies stolen from storage useless and replaces file permissions with a cryptographic check. Wrong if attestation failures and operational burden lead operators to bypass it, or if key exposure in memory after release undoes the benefit in practice.

H5. Checkpoints are the weak copy. Checkpoints get weaker custody than final weights while holding nearly the same value. Wrong if practitioners report checkpoints are covered by the same controls as final weights as a matter of course.

H6. Egress sized to the asset makes theft slow enough to catch. Egress caps and monitoring on environments that can read weights make moving a full copy out take long enough to detect and stop. Wrong if exfiltration can be split across enough paths, or slowed enough, to stay under detection, or if legitimate traffic such as checkpoint sync and dataset pulls is too large to cap.

H7. Accelerator memory has to be verified, not assumed. Tenant isolation on shared accelerators needs per-device verification of memory clearing and partitioning. Wrong if current data-center accelerators guarantee clearing between tenants and that guarantee has been independently verified.

H8. Kernel-bypass fabrics escape host network controls. RDMA and GPUDirect traffic is invisible to host network policy and telemetry, so fabric partitions and fabric-level telemetry are required for isolation. Wrong if host-level tooling sees and can block that traffic on real hardware.

H9. Data provenance catches what behavior evaluation misses. Dataset diffing and provenance records detect inserted poisoned data that evaluation on a fixed task set doesn't. Wrong if the drift lab shows evaluation catching narrow backdoors reliably. The drift paper covers the test.

7. A reference architecture, by layer

The principle at each layer is the same: the boundary and the evidence sit below anything the workload can reach.

LayerBoundaryWhat it assumesEvidence from below
Hardware and firmwareMeasured boot, firmware integrity, confidential computing where availableThe root of trust and firmware aren't already compromisedTPM measurements and attestation reports, checked by a verifier the workload can't reach
HypervisorVM or microVM per hostile workloadHypervisor escapes are rarer than kernel escapesHypervisor and host logs
KernelPer-workload kernel inside the VM; seccomp, Landlock and LSM policy as a second layerThe guest kernel can fail; the VM is the real boundaryeBPF on the host, outside the guest
ContainerImage and admission policy (approved registry, no privileged workloads)Containers are packaging, not a boundary for hostile codeAdmission and runtime logs
AcceleratorDedicated devices per tenant, or verified partitioning and memory clearingDevice memory isn't cleared unless verified (H7)Device and driver telemetry where it exists
FabricPartitions per tenant or job, set by the fabric managerHost network controls don't see RDMA traffic (H8)Fabric manager and switch telemetry
NetworkEgress allowlist; caps sized to the asset (H6)Anything not named is hostileProxy, DNS and flow logs
IdentityShort-lived, per-job credentials; keys released on attestation (H4)A compromised job holds only its own key, brieflyIdentity provider and key service logs
StoragePer-job access; checkpoints under weights custody (H5)Every checkpoint is a copy of the assetStorage system's own access logs
DataProvenance and dataset diffing (H9)Data can be hostileDataset version history
PhysicalAccess control to rooms and racks holding accelerators and storagePhysical access defeats most of the aboveBadge and camera records

The table is a design, not a finished architecture. Each row needs a specific product or mechanism chosen against an organization's hardware, and the hypotheses above say which rows I'm least sure of.

8. Cost

The VM boundary costs startup time and memory per job. For CI agents that's small. For training jobs, where the job already owns whole machines, the boundary is the machine and the question becomes what's shared between machines: fabric, storage and scheduler.

Attested key release adds a verifier, a key service in the critical path of every job start, and a failure mode: if attestation breaks, jobs don't start. That's the right failure mode for custody and the wrong one for a team with a deadline, so the operational path for attestation failures has to be designed as carefully as the happy path.

Egress caps conflict with legitimate bulk transfer. Checkpoint replication, dataset ingest and model distribution all move large amounts of data, and each needs its own named path.

Per-job storage access and per-tenant fabric partitions add scheduler complexity. The scheduler has to know about security boundaries, which schedulers built for throughput weren't designed for.

9. What is built

Nothing yet. A home lab is being set up to test H1 to H4 at small scale: coding agents run headless in VMs, microVMs and gVisor, under kernel-level policy, against malicious test repositories, with an attacker server on an isolated network and host-level eBPF telemetry. A second phase encrypts a small model's weights with a key released only to a node that passes measured-boot attestation. A software RDMA pair will show how far host tooling sees RDMA traffic in software, though that won't settle H8, because software RDMA runs through the kernel and hardware RDMA doesn't.

H5 to H8 can't be tested in a home lab. They need data-center hardware or people who operate it, and I'd welcome correction from either.

10. What would change my mind

The overall argument is wrong if environments that treat workloads as trusted, with good perimeter and identity controls, turn out to hold up against hostile AI workloads in practice. For coding agents, that would look like headless runs on untrusted repositories causing no real incidents even without VM boundaries. For training clusters, it would look like weights custody failures coming almost entirely from outside the cluster rather than from jobs, insiders or shared infrastructure.

Individual hypotheses each have their own falsifier above. I expect H6 (egress sizing) and H4 (attested key release) to draw the strongest arguments from people who run these systems, because both put security in the path of throughput.

11. Where it connects

12. References

← All Writing