How Figma manages sandboxes at scale
Nimbus is Figma's internal platform for running tens of thousands of sandboxes for AI-generated code across multiple cloud providers. Teams declare a namespace config (image, resources, health checks, warm pool bounds, allowed hosts), and a control plane picks providers, enforces egress policy and manages lifecycle through GetOrCreate, Get and Delete APIs. Security comes from read-only egress to untrusted hosts, enforced by provider controls or a proxy sidecar, plus encrypted credentials that are swapped for real ones only at the intended destination. Demand-sized warm pools with Postgres skip-locked claiming, health-weighted provider routing and Redis-scheduled health checks cut provisioning latency by 90% and raised availability from 99% to 99.95%. A control-loop simulator exposed a feedback bug where slow-but-successful providers kept receiving work.
Related posts
- Server-side sandboxing: Virtual machines
Figma mediumAdept
VM-based sandboxing rests on two boundaries: the hypervisor, which is usually strong but exposes a large attack surface, and the VM's own permissions, which must be restricted through network limits, minimal service access and short-lived credentials so a compromised job can't do harm without escaping. VMs run unmodified workloads, including third-party software, but cost more in cold starts, orchestration complexity and money than containers or seccomp. Figma runs image fetching and link-preview processing (including ImageMagick) in AWS Lambda on Firecracker, outside its production VPC and with no special privileges. The gotchas they hit were the Lambda localhost runtime API, which an SSRF could abuse, accidental IAM or VPC privileges, initial 10-second latencies, and the account-wide Lambda concurrency quota.
- What is an AI code sandbox?
Modal easyNovice
AI code sandboxes are ephemeral, isolated environments for executing LLM-generated code so hallucinated packages, crashes or prompt-injected exploits can't affect the host or other tenants. They run on VMs or containers, ideally with a hardened runtime like gVisor that intercepts syscalls through a user-space kernel instead of sharing the host kernel as runc does. Around that sit filesystem sync APIs, controlled networking, orchestration and state snapshotting. Use cases include background coding agents, code review, chatbot code interpreters, RL reward scoring and AI app builders. Buyers should weigh sub-second cold starts, isolation strength, egress control, high-concurrency scaling, dynamic runtime images and snapshotting.
- Inside Figma: getting out of the (secure) shell
Figma mediumAdept
Figma replaced its SSH bastion hosts with a zero-trust shell access system built on AWS SSO (backed by Okta with WebAuthn and device trust) and AWS Systems Manager Session Manager, so instances need no exposed SSH ports and access uses short-lived, minimally privileged IAM role credentials. Practical guidance covers scoping IAM policies for EC2 and ECS targets, restricting SSM documents, using RunCommand instead of SSH in deploy scripts, shipping session logs to a locked-down S3 account, and locking down SSM even when unused, since the preinstalled agent and broad default policies are an attack surface. Rollout went from SSH tunneled over SSM, through a grace period and a block on inbound bastion traffic with break-glass access, to a CLI script wrapping aws-vault and the AWS CLI that replaced SSH entirely and gave full session transcripts.
- The Untrusted Autonomous Workload: How AI Coding Agents Reshape What Isolation Has to Do
Docker mediumAdeptAI coding agents are untrusted, autonomous workloads that containers were never designed to isolate, so Docker Sandboxes runs each agent in a microVM (custom VMM on Hypervisor.framework, WHP or KVM) with its own kernel and private Docker Engine. Outbound traffic goes through a TLS-intercepting host proxy that enforces domain policies and injects credentials from the host keychain, so secrets never enter the VM. Two limits remain: domain-level allowlists still permit exfiltration via sites like github.com, and the shared workspace lets an agent plant Git hooks, package.json scripts or CI configs that later run on the host. A real Astro build showed no measurable microVM overhead, though a jemalloc dependency failed on 16K-page Apple Silicon VMs. Agent output should be reviewed like an untrusted pull request, for example by diffing .git/hooks and using --branch worktrees.
- Server-side sandboxing: An introduction
Figma easyNovice
Server-side workloads like image processing, parsing and thumbnailing often depend on memory-unsafe C++ libraries with histories of exploitable bugs (e.g. ImageTragick), so Figma isolates them with sandboxing rather than relying solely on preventing vulnerabilities. Three primitives are compared at a high level: VMs (Firecracker via AWS Lambda), containers (nsjail using namespaces, cgroups and seccomp), and direct seccomp syscall allowlists built with libseccomp for pure-computation workloads. Seccomp offers strong security and minimal overhead but high upfront development cost, while containers are easier to ship but have more security pitfalls. A questionnaire covering environment, isolation granularity, latency, cost, development effort and operational ownership helps teams choose an approach.