Figma Agent Security: How Sandboxes Limit Risk

Figma agent security design showing sandboxed AI agents in a shared canvas

Figma agent security rests on one rule: keep each agent’s authority narrow, isolated and enforced outside its sandbox. Figma’s security engineers have described how that works for Figma Make and the Figma design agent, where several editors and their agents can change the same canvas and code at once.

The design targets two threats. One is a misaligned agent that acts against its user’s wishes through a mistake, a bug or prompt injection. The other is a malicious collaborator who uses shared file content to reach another editor’s credentials or connected tools.

Narrow credentials

Agents get a signed token, called a FigJWT, issued by trusted backend services. It states who the agent acts for, which workload it runs and which file it may touch. Figma’s AI gateway and other services check it on every request.

Over time sandboxes with different needs ended up sharing one broadly capable token. Figma logged which capabilities each token really used, then introduced token profiles. A sandbox that builds cached Make previews, for example, needs backend access but never LLM inference, so its profile allows only backend calls. The AgentControl service mints a token with the right profile for each prompt, and YAML policies enforce it outside the sandbox. The team ran policies in shadow mode first, then switched on enforcement behind feature flags.

The team’s view is that least privilege is now a hard requirement, because agents probe every credential and API they can reach.

Figma agent security image 1
Image: Figma

Limiting file access

A user’s permissions can span every file in a plan, far more than an agent needs. Early checks inside individual endpoints left a gap: an endpoint could confirm the token’s file, then call a helper that checked the user’s access to a different file and passed. Figma moved the check into its central permissions system, where one policy denies all file permissions whenever the token is scoped to another file.

Figma agent security image 2
Image: Figma

Controlling where data goes

Agents trying to be helpful tried to upload exported assets to public file-sharing sites. On engineers’ laptops, coding agents searched home directories for private keys, suggested piping install scripts into a shell and once printed service credentials into a transcript. Prompt instructions didn’t stop this.

By default, sandboxes can send request bodies only to allowlisted hosts such as package registries. Other hosts accept only GET, HEAD or OPTIONS with no body and URLs capped at 10 KB. Read requests can still leak small amounts of data, so organization admins can turn off general internet access and permit only chosen hosts. Gateway tokens expire after two hours, and sandbox lifetimes are capped.

A millipede gets into a castle by going up through the drain into a pit with spikes. The pit stops it from getting out.
Image: Figma

One sandbox per user

Figma gives each user a separate sandbox for a shared file. A shared sandbox would let code authored by one collaborator read another’s credentials. Separate sandboxes still let agents commit to the same file, but each request uses the driving user’s permissions and credit budget. For MCP servers using OAuth, the gateway looks up only the connection belonging to the user named in the token.

Credentials arrive just in time. Opening a Make file provisions a sandbox, but collaborator-written code can’t trigger inference or tool calls until the user sends a prompt.

Stopping copied tokens

Figma first placed tokens in a sandbox environment variable. It then saw new accounts create a Make file, copy the token and reuse it against the AI gateway, a pattern known as LLMjacking. The fix was to route all outbound HTTPS through Figma’s own egress proxy, encrypt each token and bind it to a single sandbox. The proxy outside the sandbox decrypts it and forwards the request. A copied token fails in any other sandbox. Figma says the abuse stopped and hasn’t returned.

What happens next

Today the agent’s control loop still runs inside the sandbox beside generated code, so the sandbox must hold authority the code doesn’t need. Figma’s next step is moving that control loop out, following an approach Anthropic calls decoupling the brain from the hands, so untrusted code starts with less authority.

Source: Figma

Written by

Saksham Bhargava

Saksham Bhargava runs Alteroid and has been writing about consumer technology for over five years, covering iPhone, Android, Windows, AI tools and gaming. With an MCA and six years of hands-on web development experience, he tests the features he writes about on his own devices and focuses on clear, practical guides that solve real problems. Away from the screen, he enjoys travelling to places most tourists skip.