Your Agent Wrote the Code. Treat It Like an Untrusted Tenant.
Model-generated code should cross a real security boundary before it executes. Design production agent sandboxes with layered isolation, default-deny capabilities, bounded resources, controlled egress, side-effect gateways, reproducible manifests, and audit-ready execution records.
On this page
The dangerous part of a code-writing agent is not that the model can produce Python, JavaScript, SQL, or shell commands.
The dangerous part is that your system may execute that output with the same ambient authority as the application that asked for it.
That collapses two very different trust domains into one process:
- the application you wrote, reviewed, deployed, and operate;
- code synthesized at runtime from prompts, retrieved documents, tool output, uploaded files, and other inputs you may not control.
From a systems perspective, model-generated code is untrusted workload input. It should cross a real execution boundary before it runs.
That boundary has to be stronger than “the prompt said not to access secrets.” Prompt instructions are useful behavioral guidance. They are not a kernel, a network policy, an authorization layer, or a resource controller.
My production rule is simple:
If an agent can generate executable code, treat each execution like a short-lived untrusted tenant.
The goal is not to prove the code is safe before execution. For arbitrary code, that is not a practical security model. The goal is to constrain what the workload can read, write, call, consume, and mutate even when the generated program is wrong, compromised, or deliberately hostile.
The trust boundary starts before exec
A useful agent might generate code for legitimate reasons:
- analyze a CSV or Parquet file;
- transform structured data;
- calculate a forecast;
- render a chart;
- compile or test a patch;
- query a local dataset;
- run a one-off migration analysis;
- evaluate a mathematical expression;
- inspect a repository;
- execute a deterministic workflow that would be awkward to express as dozens of tool calls.
The problem is that generated code is influenced by context.
That context can contain:
- a malicious instruction hidden in a document;
- a poisoned web page;
- an unexpected tool result;
- a compromised dependency;
- user-controlled source code;
- a prompt-injection payload embedded in data;
- a model mistake that happens to form a dangerous command.
OWASP's current prompt-injection guidance is explicit that there is no fool-proof prevention inside the LLM itself and recommends least-privilege access, segregation of untrusted content, human approval for high-risk operations, and adversarial testing.
That leads to an important architectural conclusion:
Prompt-injection defenses reduce the probability of bad code being generated. Sandboxing reduces the consequences when bad code runs anyway.
You need both.
Do not ask “is this code safe?” Ask “what can this execution possibly do?”
Static analysis, AST inspection, allowlists, linters, model reviewers, and human review can all be useful signals.
None of them should be the only security boundary.
A generated program can be dangerous without containing an obviously dangerous string. It can import a module indirectly, trigger package lifecycle code, follow a symlink, exhaust memory, recurse forever, read an unexpected mount, connect to an internal service, or abuse a capability you forgot was available.
A stronger question is:
If this program were fully hostile, what assets and effects are still reachable?
That turns the problem from content classification into capability design.
For every execution, define the allowed capabilities explicitly:
- filesystem: which inputs are readable, which path is writable, and whether the root filesystem is read-only;
- network: none by default, or a narrow allowlist through a controlled broker;
- credentials: ideally none inside the sandbox;
- processes: bounded process/PID count and no privilege escalation;
- compute: CPU, memory, wall-clock, disk, file-descriptor, and output ceilings;
- syscalls/kernel surface: restricted according to the isolation technology;
- dependencies: prebuilt or pinned rather than arbitrary internet installation;
- external side effects: denied inside the execution environment and delegated to a separately authorized gateway.
That policy should be machine-readable, versioned, and attached to every run.
A sandbox is a stack of controls, not a product name
“Runs in Docker” is not a complete threat model.
Containers are valuable isolation and packaging primitives, but standard containers share the host kernel. NIST SP 800-190 specifically treats container isolation and host security as security concerns. Docker itself documents additional controls such as seccomp, resource constraints, capabilities, and no-new-privileges because isolation depends on configuration, not on the word *container*.
For hostile or multi-tenant code, I usually think in layers.
Layer 1: workload isolation
Choose an isolation boundary based on the threat model:
- a carefully hardened container for lower-risk controlled workloads;
- gVisor when you want an application-kernel boundary that intercepts and implements a large portion of the Linux system API in userspace;
- a microVM such as Firecracker when a virtual-machine boundary better fits the risk, compatibility, and performance requirements;
- a managed sandbox service when you want someone else to operate much of this infrastructure, while still validating its actual isolation and network/credential model.
There is no universal “most secure” answer. gVisor's own security documentation warns against assuming that virtualization hardware alone automatically makes a system safer. Firecracker similarly documents that overall security depends on a correctly configured host.
What matters is that the chosen boundary matches your attacker model and is combined with the remaining layers below.
Layer 2: capability restriction
Inside the execution environment:
- run as non-root;
- disallow privilege escalation;
- drop unnecessary Linux capabilities;
- keep the root filesystem read-only where practical;
- expose only explicit read-only input mounts;
- provide a small ephemeral writable workspace;
- do not mount Docker/container runtime sockets;
- do not mount developer home directories, SSH keys, cloud config, kubeconfig, or production secrets;
- apply an appropriate syscall policy such as seccomp when using Linux containers.
Docker's default seccomp profile is an allowlist-oriented policy and blocks a number of potentially dangerous system calls. It is useful defense in depth, but it is not a substitute for a broader sandbox architecture.
Layer 3: resource containment
Untrusted code can attack availability without escaping the sandbox.
A single generated program can:
- allocate memory until the host starts killing workloads;
- spawn processes recursively;
- fill disk;
- print gigabytes of output;
- open excessive descriptors;
- consume CPU indefinitely;
- decompress a tiny input into an enormous payload.
Docker's documentation notes that containers have no resource constraints by default unless you configure them. For agent execution, limits should be explicit rather than inherited accidentally from the host.
At minimum, define ceilings for:
- CPU;
- memory and swap behavior;
- process/PID count;
- writable disk;
- wall-clock execution time;
- stdout/stderr bytes;
- file size;
- number of open files;
- input size and decompression expansion where relevant.
A timeout is an availability control. It is not a security boundary by itself.
Layer 4: network isolation
My default for generated code is no network.
If a workload only needs to transform files or calculate a result, there is no reason to give it outbound internet access.
When network access is necessary, expose a narrow capability through a controlled broker rather than giving the sandbox a general-purpose route to the world.
This matters for both exfiltration and internal attack surface. A sandbox with unrestricted network access may be able to probe:
- internal APIs;
- databases;
- service discovery;
- cluster control planes;
- cloud metadata services;
- developer tooling;
- other tenant workloads.
On AWS EC2, for example, the Instance Metadata Service is reachable at a link-local address when enabled, and AWS provides configuration for disabling it or requiring IMDSv2. A sandbox design should not depend on “the generated code probably won't call metadata.” Network policy should make unintended destinations unreachable.
Layer 5: side-effect authorization
This is the layer most agent architectures miss.
Suppose generated Python analyzes a dataset and concludes that 200 customer records need updating.
The sandbox should be able to produce the proposal.
It should not necessarily possess the credentials or network path needed to perform the 200 updates itself.
Move consequential effects behind an action gateway:
sandbox output -> structured proposed action -> schema validation -> policy / authorization -> human approval when required -> scoped executor -> receipt + reconciliationThis keeps compute permission separate from business authority.
I use the same idea in decision records for consequential agent actions: an agent deciding that an action is useful is not the same as the system proving that the action is authorized.
Architecture: code execution should terminate at a capability firewall
Here is the shape I prefer.

The critical property is that the sandbox is not also the authority gateway.
Generated code gets computation. Business mutations get policy.
Make the sandbox policy explicit in code
A production system should be able to answer “what sandbox policy did this run use?” without reconstructing Kubernetes YAML from six months ago.
I would keep a small versioned profile object.
type NetworkPolicy = | { mode: "none" } | { mode: "allowlist"; hosts: string[] };interface SandboxProfile { version: string; runtime: "python" | "node"; imageDigest: string; dependencyLockHash: string; cpuMillis: number; memoryMb: number; maxProcesses: number; timeoutMs: number; maxOutputBytes: number; writableTmpMb: number; runAsNonRoot: true; allowPrivilegeEscalation: false; rootFilesystem: "read-only"; network: NetworkPolicy; readOnlyMounts: string[];}interface ExecutionManifest { executionId: string; taskId: string; releaseId: string; codeSha256: string; inputHashes: Record<string, string>; profileVersion: string; imageDigest: string; dependencyLockHash: string; createdAt: string;}interface SandboxResult { executionId: string; exitCode: number | null; timedOut: boolean; stdout: string; stderr: string; outputTruncated: boolean; deniedEgress: number; deniedSyscalls?: number; peakMemoryMb?: number; cpuMillis?: number;}Then build a manifest before execution.
import { createHash, randomUUID } from "node:crypto";const sha256 = (value: string | Buffer) => createHash("sha256").update(value).digest("hex");function buildManifest(args: { taskId: string; releaseId: string; code: string; inputs: Record<string, Buffer>; profile: SandboxProfile;}): ExecutionManifest { return { executionId: randomUUID(), taskId: args.taskId, releaseId: args.releaseId, codeSha256: sha256(args.code), inputHashes: Object.fromEntries( Object.entries(args.inputs).map(([name, data]) => [name, sha256(data)]), ), profileVersion: args.profile.version, imageDigest: args.profile.imageDigest, dependencyLockHash: args.profile.dependencyLockHash, createdAt: new Date().toISOString(), };}The application should send the code, manifest, and profile to an isolated executor service. It should not call eval, exec, child_process, or a shell in the application process.
interface IsolatedExecutor { run(request: { manifest: ExecutionManifest; profile: SandboxProfile; code: string; inputs: Record<string, Buffer>; }): Promise<SandboxResult>;}async function runGeneratedCode( executor: IsolatedExecutor, request: Parameters<IsolatedExecutor["run"]>[0],): Promise<SandboxResult> { if (request.profile.network.mode === "allowlist") { if (request.profile.network.hosts.length === 0) { throw new Error("allowlist mode requires at least one explicit host"); } } if (!request.profile.runAsNonRoot) { throw new Error("generated code must run as non-root"); } if (request.profile.allowPrivilegeEscalation) { throw new Error("privilege escalation must remain disabled"); } return executor.run(request);}That interface is intentionally boring. The security boundary lives in the executor implementation and its infrastructure, not in TypeScript type safety.
The types make the contract visible and auditable.
Python: verify the execution contract, not the generated program
The same principle applies in Python.
from __future__ import annotationsfrom dataclasses import dataclassfrom hashlib import sha256from typing import Literal@dataclass(frozen=True)class SandboxProfile: version: str image_digest: str dependency_lock_hash: str network_mode: Literal["none", "allowlist"] allowed_hosts: tuple[str, ...] memory_mb: int max_processes: int timeout_seconds: int max_output_bytes: int run_as_non_root: bool = True privilege_escalation: bool = False@dataclass(frozen=True)class ExecutionManifest: execution_id: str code_sha256: str profile_version: str image_digest: str dependency_lock_hash: strdef hash_text(value: str) -> str: return sha256(value.encode("utf-8")).hexdigest()def validate_profile(profile: SandboxProfile) -> None: if not profile.run_as_non_root: raise ValueError("generated code must run as non-root") if profile.privilege_escalation: raise ValueError("privilege escalation must be disabled") if profile.network_mode == "none" and profile.allowed_hosts: raise ValueError("network=none cannot include allowed hosts") if profile.memory_mb <= 0 or profile.max_processes <= 0: raise ValueError("resource limits must be positive") if profile.timeout_seconds <= 0: raise ValueError("execution timeout must be positive")def build_manifest( execution_id: str, code: str, profile: SandboxProfile,) -> ExecutionManifest: validate_profile(profile) return ExecutionManifest( execution_id=execution_id, code_sha256=hash_text(code), profile_version=profile.version, image_digest=profile.image_digest, dependency_lock_hash=profile.dependency_lock_hash, )Notice what is missing: no Python exec() of the model output.
This code validates and records the contract. A separate sandbox service owns execution.
That separation makes it much harder for an innocent refactor to move untrusted execution back into the API process.
Filesystem design: give the workload a disposable room
The filesystem should look less like a server and more like a temporary workbench.
A useful default:
/ runtime/ read-only, from pinned image inputs/ read-only task inputs workspace/ writable, small quota, destroyed after run outputs/ writable, bounded, collected after runDo not mount:
/var/run/docker.sock/root/.ssh/home/<developer>/.aws/home/<developer>/.config/gcloud~/.kube/configproduction source treeshost /proc or /sys beyond what the isolation runtime safely virtualizesshared writable volumes from other tenantsA symlink or path traversal check in application code is helpful, but the stronger guarantee is that sensitive host paths simply do not exist inside the sandbox namespace.
Ephemeral storage also limits cross-run contamination. If one task writes a poisoned helper script or modifies a package cache, the next task should not inherit it by accident.
When persistence is genuinely required, persist explicit artifacts through a controlled storage interface. Do not persist the entire runtime environment because it is convenient.
Networking: default-deny beats “please don't exfiltrate”
Network access is one of the highest-value capabilities you can remove.
A data-analysis sandbox may need zero egress. A coding sandbox may need a package mirror. A research workflow may need access to a few public APIs.
Model these as different profiles rather than gradually opening one universal environment.
profile: analysis-offlinenetwork: noneprofile: build-from-mirrornetwork: allowlisthosts: - packages.internal.exampleprofile: api-readonlynetwork: allowlisthosts: - reports-api.internal.exampleEven an allowlist should usually sit behind an egress proxy that can:
- resolve allowed hostnames safely;
- block private/link-local ranges unless explicitly needed;
- prevent DNS rebinding tricks;
- attach credentials outside the sandbox when unavoidable;
- cap request/response size;
- log request metadata;
- enforce HTTP methods and routes;
- redact sensitive output;
- rate-limit abuse.
A hostname allowlist without careful resolution and routing controls is weaker than it looks.
Never put long-lived production credentials in generated-code sandboxes
If code can read a credential, assume it can eventually use or print it.
That applies to:
- cloud access keys;
- database URLs;
- OAuth refresh tokens;
- deployment tokens;
- package-registry credentials;
- SSH keys;
- signing keys;
- service-account JSON;
- Kubernetes credentials.
For many code-execution tasks, the correct credential set is empty.
If a task truly needs authenticated access, prefer a broker or a short-lived, narrowly scoped workload identity that cannot perform unrelated actions. Keep the authority outside the generated program whenever possible.
This is the same design principle as agent abstention and authorization gates: capability should expand only when the evidence and policy justify it.
Dependency installation is code execution too
A sandbox that blocks shell access but allows unrestricted npm install or pip install from the internet still has a large execution and supply-chain surface.
The package manager is not just a file downloader.
npm documents lifecycle scripts such as preinstall, install, postinstall, and prepare that can execute during dependency workflows. Python packages can also include build steps and native components depending on package format and environment.
For predictable agent sandboxes, I prefer:
- prebuilt runtime images;
- a curated set of common libraries;
- pinned or locked dependency sets;
- internal package mirrors where dynamic installation is required;
- checksum/signature/provenance verification where supported;
- network disabled after dependency resolution;
- separate sandbox profiles for “can install dependencies” and “can execute task.”
Do not let the model turn “I need one library” into arbitrary internet code execution with your production network posture.
The execution manifest is your replay boundary
When an incident happens, saving only the generated source code is not enough.
The result may also depend on:
- runtime version;
- container or microVM image;
- dependency set;
- input files;
- environment variables;
- sandbox policy;
- network policy;
- external responses;
- model/release version that generated the code.
Record the execution environment as immutable identifiers where possible.
{ "execution_id": "exec_01J...", "code_sha256": "sha256:...", "image_digest": "sha256:...", "dependency_lock_hash": "sha256:...", "profile_version": "sandbox-python-v7", "input_hashes": { "sales.csv": "sha256:..." }, "network_policy": "none", "release_id": "2026-10-07.3"}Now you can answer:
- Did two runs execute exactly the same code?
- Did the runtime image change?
- Did the input change?
- Did the sandbox policy change?
- Can this execution be reproduced in a non-production environment?
That manifest also feeds the incident workflow in counterfactual replay.
Sandboxing is not semantic correctness
A perfectly isolated program can still return a wrong result.
That is why I separate two questions:
- Can this execution damage or reach things it should not? — sandbox/security problem.
- Did this execution produce a correct and acceptable result? — evaluation/verification problem.
Do not confuse containment with correctness.
Generated code can:
- compute the wrong formula;
- silently drop rows;
- use the wrong timezone;
- mis-handle money;
- produce a misleading visualization;
- infer the wrong schema;
- apply an invalid transformation.
Output verification still matters.
For structured tasks, validate schemas and invariants. For critical calculations, use deterministic checks. For agent workflows, evaluate both outputs and trajectories as appropriate; I cover that distinction in trajectory evaluation.
Original defense-in-depth model
I think of the design as six independent gates.

If one layer fails, another should still reduce the blast radius.
That is what defense in depth means here.
Observability: measure attempted boundary crossings
A sandbox that never emits security telemetry is difficult to tune and difficult to trust.
I would monitor at least:
Isolation and policy
- sandbox profile/version distribution;
- executions by isolation runtime;
- denied syscall count where exposed;
- privilege/capability violations;
- attempts to access blocked mounts;
- integrity failures in execution manifests.
Network
- denied egress attempts;
- destinations requested;
- attempts to reach private/link-local address space;
- metadata-service attempts;
- broker allow/deny ratio;
- bytes sent and received per execution.
Resources
- timeout kill rate;
- out-of-memory kill rate;
- process-limit violations;
- disk quota violations;
- peak memory;
- CPU consumption;
- output truncation rate;
- decompression/input expansion violations.
Supply chain
- dynamic package-install attempts;
- blocked package hosts;
- lockfile/provenance mismatches;
- sandbox runs using unapproved images or dependency sets.
Side effects
- proposed external actions;
- authorization denials;
- human approvals;
- orphan external effects that have no decision record;
- unreconciled ambiguous effects.
Reliability
- sandbox startup failures;
- execution success by profile;
- startup latency and execution latency by runtime;
- percentage of runs that can be reproduced from their manifest.
Do not invent universal latency or memory thresholds. Measure real workloads, then set limits above legitimate operating ranges and below unacceptable blast-radius levels.
The limits are part of your production SLO design, not magic constants. I discuss the broader reliability control loop in agent SLOs and error budgets.
Failure-inject the sandbox before an attacker does
A sandbox should be tested as a security control, not merely exercised with happy-path code.
| Injected behavior | Expected control |
|---|---|
| Read a host-only secret path | Path is absent/inaccessible; event is logged if observable |
| Read another tenant's workspace | Isolation boundary prevents access |
| Write outside the task workspace | Read-only mount / namespace policy denies write |
| Follow a crafted symlink outside allowed tree | Mount/namespace boundary prevents reaching host data |
| Spawn processes recursively | PID/process ceiling terminates or denies workload |
| Allocate memory until exhaustion | Memory ceiling kills workload without destabilizing host |
| Busy-loop forever | CPU/wall-clock policy terminates workload |
| Print unbounded output | Output is capped/truncated and execution cannot exhaust control plane |
| Connect to arbitrary internet host | Default-deny network blocks request |
| Call a private RFC1918 service | Network policy/broker denies unless explicitly allowed |
| Reach cloud metadata endpoint | Network/host configuration makes it unreachable from sandbox |
| Open Docker/container runtime socket | Socket is not mounted/reachable |
| Install an arbitrary package | Disabled or routed through approved dependency policy/mirror |
| Execute package lifecycle hooks unexpectedly | Dependency policy blocks or isolates the install stage |
| Call production database directly | No route/credentials; action must go through gateway |
| Return a secret in stdout | Output scanner/redactor blocks or flags response |
| Crash during teardown | Supervisor still destroys/reclaims sandbox resources |
For higher-risk environments, add adversarial testing for the actual isolation technology and host configuration—not just application-level tests.
Trade-offs: stronger isolation costs something
A mature design acknowledges the cost.
Startup latency
Fresh environments can add startup overhead. Snapshotting, prebuilt images, warm pools, and lightweight isolation can help, but optimization must not accidentally reintroduce cross-tenant state.
Compatibility
More restrictive syscall and filesystem policies break software that expects a full Linux environment. gVisor documents compatibility considerations because it implements a userspace kernel rather than simply exposing every host kernel behavior.
Operational complexity
A separate executor, egress broker, image pipeline, policy registry, and audit path are real infrastructure.
The payoff is that they turn implicit ambient authority into explicit, reviewable controls.
Cost
MicroVMs, managed sandboxes, extra proxies, telemetry, and per-task environments consume resources. The right design depends on workload value and risk tier.
Developer friction
Security boundaries will block legitimate work occasionally. The response should be a reviewed capability expansion—not an emergency switch that grants the sandbox the same credentials and network as the application.
Choose isolation by risk tier
Not every task needs the same boundary.
A practical matrix might look like this:
| Workload | Example | Suggested posture |
|---|---|---|
| Deterministic expression | arithmetic over trusted values | restricted evaluator; no general-purpose runtime |
| Controlled data transform | trusted CSV, fixed libraries | hardened ephemeral container; no network; no secrets |
| User-influenced generated code | arbitrary Python/Node over uploaded data | stronger sandbox such as gVisor or equivalent; no network by default; strict limits |
| Multi-tenant hostile-code threat model | public code execution | microVM or similarly strong tenant isolation plus host hardening |
| Generated code requesting external changes | “update these records” | sandbox computes proposal; separate policy-controlled executor performs effects |
The exact technology matters less than being explicit about the threat model and guarantees.
Keep sandbox profiles immutable and versioned
A hidden source of security drift is configuration mutation.
If sandbox-python-v7 silently starts allowing outbound internet, historical executions using “v7” no longer mean the same thing.
Treat sandbox profiles like production policy:
- immutable versions;
- code-reviewed changes;
- automated conformance tests;
- image digest pinning;
- dependency-lock hashing;
- security regression tests;
- staged rollout;
- rollback path;
- telemetry split by profile version.
If you need to loosen a policy, create v8 and know exactly which executions used it.
This also makes incident attribution much cleaner.
A production checklist
Before enabling agent-generated code execution, I want clear answers to these questions:
- Where does the code run? Not “in our backend”—name the isolation boundary.
- What host resources are visible? List mounts, devices, sockets, kernel interfaces, and metadata paths.
- What credentials exist inside? The best answer is often none.
- Can it reach the network? If yes, exactly which destinations and protocols?
- What are the CPU, memory, process, disk, time, and output ceilings? Defaults are not a policy.
- Can it install dependencies? From where, under what lock/provenance rules, and with which lifecycle scripts?
- Can it mutate external systems directly? If yes, why is that authority inside the sandbox?
- Can two users or tasks observe each other's state? Test it, do not assume.
- Can I reproduce this run? Code hash + image digest + dependencies + input hashes + profile version.
- Can I prove which effect happened? Link execution IDs to decision records and external receipts.
- What happens when teardown fails? Supervisors must reclaim the environment.
- How do I detect boundary probing? Denied egress, syscall, mount, metadata, and resource events belong in telemetry.
If those answers are fuzzy, the sandbox is probably a convenience layer rather than a security boundary.
The deeper design principle
Agent architectures get safer when they stop granting broad ambient authority and start exchanging narrow capabilities.
Generated code does not need “the backend environment.”
It needs:
- these input bytes;
- this runtime;
- this amount of compute;
- perhaps this one read-only API;
- this small writable directory;
- permission to return this bounded output.
Everything else should be absent unless deliberately added.
That is the real advantage of sandboxing: not that it magically turns hostile code into safe code, but that it makes the allowed blast radius explicit.
The model can still make mistakes.
The generated program can still be malicious.
The dependency can still be compromised.
The output can still be wrong.
But those failures no longer inherit every privilege your production application happens to have.
For autonomous systems, that separation is foundational.
Let the agent generate code. Do not let generated code inherit your trust.
References
- NIST SP 800-190 — Application Container Security Guide
- Docker Docs — Seccomp security profiles
- Docker Docs — Resource constraints
- Docker Docs — `no-new-privileges` and container security options
- gVisor — Introduction to gVisor security
- gVisor — Security model
- gVisor — Production guide
- Firecracker — Design and threat containment
- OWASP GenAI Security Project — Prompt Injection
- OWASP Cheat Sheet — Secure Coding with AI
- AWS EC2 — Instance Metadata Service configuration
- npm Docs — Lifecycle scripts
- Cloudflare Agents — Sandbox
KEEP READING
Related engineering notes
A Failover Route Is Not a Recovery Path: Proving Independence in AI Infrastructure
Two LLM providers can share the same failure domain. Build an evidence-backed recovery graph that checks cloud, networking, identity, control-plane and capacity dependencies before admitting fallback routes, then test correlated outages without weakening safety.
Read articleAn Eval Platform Sunset Can Erase Your Release Evidence: Build an Evidence-Escrow Migration Gate
When a hosted LLM evaluation platform retires, switching runners is not enough. Preserve the historical evidence, reconstruct grader semantics, validate scoring parity, and enforce a fail-closed release gate that survives the service shutdown.
Read articleWhen the Package Runs Before Your App: Quarantining AI Framework Releases
The 2026 agent-framework PyPI compromise exposed a blind spot in AI build pipelines: Python startup hooks execute before application imports. Design an artifact-quarantine gate, inspect wheels without installing them, separate credentials, and recover from suspected exposure.
Read article