Sandboxing Agents is a Three-Body Problem: Containment, Provenance, and the Human Authority
Ankit Agrawal (Head of Application Security · Webflow)
[un]prompted II 2026 — The AI Security Practitioner Conference · Day 1 · Stage 2
Overview
In the rapidly evolving landscape of AI-driven applications, securing agentic systems presents a unique and complex challenge, likened by Ankit Agrawal to a three-body problem in physics. In his talk at [un]prompted II, Agrawal, Head of Application Security at Webflow, delves into the intricate interplay of three fundamental security pillars: containment, provenance, and human authority. Drawing lessons directly from the development of Webflow's "Source" app—a design and marketing tool where humans and AI collaborate—Agrawal illustrates how these pillars, while seemingly manageable in isolation, become highly unpredictable and challenging when they interact.

Key moments
- 0:40 Introduction to the Three-Body Problem
- 8:00 Containment: Validating sandbox execution
- 11:00 Provenance: Server must decide access
- 12:30 Human Authority: User approval token details
- 14:30 Human Authority: Do not silently approve
- 17:00 Prioritizing security controls based on agent type
- 20:50 Q&A: Preserving trust in agent swarms
Sandboxing Agents is a Three-Body Problem: Containment, Provenance, and the Human Authority
Speakers: Ankit Agrawal, Head of Application Security, Webflow
Conference: [un]prompted II
YouTube: https://www.youtube.com/watch?v=CtKWTuiSu48
Overview
In the rapidly evolving landscape of AI-driven applications, securing agentic systems presents a unique and complex challenge, likened by Ankit Agrawal to a three-body problem in physics. In his talk at [un]prompted II, Agrawal, Head of Application Security at Webflow, delves into the intricate interplay of three fundamental security pillars: containment, provenance, and human authority. Drawing lessons directly from the development of Webflow's "Source" app—a design and marketing tool where humans and AI collaborate—Agrawal illustrates how these pillars, while seemingly manageable in isolation, become highly unpredictable and challenging when they interact.
The core premise is that securing AI agents goes beyond traditional sandboxing. It requires a holistic approach that considers not just what an agent can access (containment), but also where its instructions originate (provenance) and how human consent is sought and enforced (human authority). As these agents gain more autonomy and interact with sensitive user data and external systems, the potential for security vulnerabilities and misuse escalates. This talk offers practical insights and architectural considerations for developers and security professionals grappling with the complexities of building secure, agentic applications.
Background
▶ Watch: Introduction to the Three-Body Problem (0:40)
The proliferation of AI agents, particularly those designed to perform tasks on behalf of users, has introduced a new frontier in application security. Unlike traditional applications with predictable execution flows, AI agents often operate with a degree of autonomy, interpreting user input, making decisions, and interacting with various system resources, networks, and third-party services. This dynamic nature creates a significant security surface area, demanding robust controls to prevent malicious or accidental misuse.
The "Source" app at Webflow exemplifies this challenge. As a collaborative platform, it integrates AI agents that can manipulate user files, access network resources, and potentially interact with other services. Securing such an application necessitates a re-evaluation of conventional security models, which often assume a clear separation between trusted and untrusted code. With agents, the lines blur: user-provided prompts can become executable instructions, third-party add-ons extend functionality, and the agent's "thinking loop" processes untrusted input to generate further actions. The historical context of sandboxing, typically focused on isolating processes or code execution environments, must now adapt to the nuances of agentic behavior, where the origin of instructions and the nature of human oversight are equally critical to maintaining security and trust.
Key Findings
▶ Watch: Provenance: Server must decide access (11:00)
Agrawal's talk highlights several critical findings and lessons learned from securing agentic systems:
- Containment is Multi-faceted and Context-Dependent: There is no "one-size-fits-all" sandboxing solution. Different components of an agentic system require varying levels of isolation. For agents operating on user machines, protecting against unauthorized file writes is paramount. For cloud-based agents, egress control is key. Specific challenges arise with reading secrets (e.g., macOS Keychain requiring a broker service) and the limitations of traditional web security controls like Content Security Policy (CSP) and iFrame sandboxing attributes against redirects and opaque frames.
- Provenance is Crucial for Trust and Accountability: Knowing the origin and integrity of instructions and add-ons is essential. This involves enforcing declared permissions for extensions, fingerprinting add-ons to detect tampering (e.g., hashing or signed keys), and attempting to tie executed commands back to trusted records, though this can be challenging with obfuscated code. Fundamentally, server-side enforcement of access control is non-negotiable.
- Human Authority Requires Thoughtful Design, Not Just a Checkbox: User consent mechanisms must be designed to be meaningful and prevent "alert fatigue." Silent approvals by agents are a critical anti-pattern. Consent must be explicitly tied to specific, time-limited actions and provide sufficient context for users to make informed decisions, as demonstrated by Google Chrome's experience with SSL warnings.
- The Interconnectedness of the "Three Bodies": Tightening controls in one area often impacts another. For example, stringent containment can frustrate users, while excessive provenance labeling can incur performance costs and dilute human authority if users are prompted too frequently. A balanced approach is required, prioritizing security efforts based on the agent's specific context and potential risks.
- Specific Technical Pitfalls: The talk exposes practical security vulnerabilities, such as a child iFrame escaping its sandbox through redirects, and the risk of an imposter dropping a malicious binary in a trusted path, bypassing sandbox checks (e.g.,
sandbox execpath validation).
Technical Deep Dive
▶ Watch: Human Authority: User approval token details (12:30)
The technical deep dive into agentic sandboxing reveals a complex interplay of operating system-level controls, web application security paradigms, and novel approaches to managing AI agent interactions. Agrawal structures his insights around the three core "bodies": Containment, Provenance, and Human Authority, offering concrete examples and mitigation strategies.
Containment: What Your Process Can Touch
Containment defines the boundaries of an agent's access to system resources. Agrawal emphasizes that the initial focus depends on the agent's environment. For agents running on a user's machine, rights (write permissions) are the primary concern due to the abundance of sensitive local information. An attacker leaving files outside a project directory could lead to privilege escalation.
- Reads and Secrets: While seemingly similar, reading general files and accessing secrets present distinct challenges. Reading files for packages and caches often requires broad access to distributed system information, where missing a single path can cause task failures and user frustration. Secrets, however, vary significantly. Plain text credentials (e.g., AWS credentials) are directly readable, but encrypted secrets (e.g., macOS Keychain) require a broker service for decryption. Simply blocking files containing encrypted secrets is insufficient, as the agent can still query the broker. The design must accommodate these nuances, allowing necessary access while restricting sensitive data.
- Network Access: Certain network paths must remain open for agent functionality, such as installing packages from the NPM registry or accessing external web pages. Security design must carefully delineate these necessary connections.
- Web Security Controls in Child Frames: Agrawal highlighted a critical finding regarding web security controls:
- iFrame sandboxing attributes and Content Security Policy (CSP), while foundational, have limitations. A CSP's
frame-srcprimarily applies to the outer document, not necessarily to redirects within the loaded iFrame. Once a frame loads its initial content, it can perform further redirects, potentially escaping the intended scope. - Similarly, if
allow-same-originis not permitted in iFrame sandboxing, the concept of opaque frames emerges. This disconnects the child and parent frames, making it difficult for the parent process to monitor the child's navigation. Webflow's "Source" app had to implement real-time navigation catching and rely on pre-registered destinations for third-party add-ons to address this. - Split Sandboxing Models: A crucial lesson is that a single sandboxing model is insufficient. The "Source" app employs two distinct levels:
- The compartment (thinking loop): This component processes untrusted input and generates instructions. It is completely sealed off, with no access to the file system or network, as its role is purely computational.
- The shell sandbox: This component executes the instructions generated by the compartment, requiring access to the network, file system, and potentially secrets. Its permissions are much broader, tailored to execution.
- Verifying Sandbox Integrity: A subtle but dangerous vulnerability was discovered where an imposter could drop a malicious file or binary within a trusted path (e.g., in an environment variable
PATHlocation), allowing it to be executed as if it were a legitimate, sandboxed process. For instance, if an attacker could replace or mimicsandbox execon macOS, the sandboxing mechanism would be bypassed. Mitigations include: - Always checking the full path (e.g.,
/usr/bin/sandbox execinstead of justsandbox exec). - Runtime validation: Before engaging a child process, the sandbox can be configured to execute a task designed to fail if the sandbox is working correctly. If the task passes, it indicates the sandbox is compromised or not active.
- Handling uninstalled sandboxing binaries: A critical design decision is whether to fail open (allow execution without a sandbox), fail closed (prevent execution), or warn the user. This depends on the app's sensitivity.
Provenance: Where Instructions Come From
Provenance ensures that instructions are trustworthy and haven't been tampered with.
- Add-on Permission Declarations: Similar to Google apps requesting access, add-ons should declare their required permissions (e.g., access to email, documents). The agent must then be strictly held to these approved permissions.
- Add-on Fingerprinting: To prevent tampering, add-ons should be fingerprinted using hashing or signed keys. This verifies the add-on's integrity and author, ensuring it originates from an approved source.
- Pre-execution Command Checks: While not authoritative, examining commands against provenance records before execution can be a "nice-to-have" control. This involves checking if commands operate on trusted labels and looking for obfuscated scripts that might attempt to bypass these checks.
- Server-Side Access Decisions: A fundamental security rule applies: the server should decide access, not the client. Anything on the client side can be tampered with.
- Cost of Provenance: Implementing robust provenance has costs. Labeling every read from an agent adds overhead and can be challenging when the main process cannot observe all intermediate hops of a child process. It can also lead to alert fatigue if users are constantly asked to approve actions based on provenance labels.
Human Authority: Who Says Yes and What That Yes is Tied To
Human authority focuses on how user consent is obtained, enforced, and respected.
- Granular, Time-Limited Consent: For the "Source" app, user approval mints a UUID token that is stored in a location inaccessible to the models. This token points to a record containing:
- Project and identity information (preventing agents from fabricating context).
- Permission limited to a single action, not a longstanding grant.
- Exact package details (name, version, fingerprint) of the add-on.
- Exact text the user read during approval.
- Who asked for the approval (user or agent).
- The token is valid for only 60 seconds and is invalidated immediately after the operation completes. This prevents token reuse for unintended purposes.
- Avoiding Silent Approvals: Agrawal strongly warns against agents silently approving user consent. If a user doesn't explicitly approve, it should be treated as a refusal. This applies to:
- Timeouts: If a user doesn't respond within a set time (e.g., two minutes), it's a refusal.
- Undeliverable prompts: If the prompt cannot be shown, it's a refusal.
- Crashes: If the window closes due to a crash, it's a refusal.
- Meaningful User Consent: Telemetry from the "Source" app's research preview showed:
- 50% approval rate for prompts.
- A median response time of less than three seconds.
- 20% refusal rate (due to non-response, undeliverable, or crashes).
This data underscores the importance of prompt design. Agrawal references Google Chrome's 2013 SSL warning redesign. Initially, warnings had a 70% click-through rate, meaning users often bypassed them. After redesigning the warning to better educate users on the actual risks, the click-through rate dropped by half. The lesson: user consent is not a mere checkbox; users need to understand the residual risk.
Demo / Proof of Concept
▶ Watch: Prioritizing security controls based on agent type (17:00)
While the talk does not feature a live demonstration or a specific proof-of-concept exploit, Ankit Agrawal's presentation is deeply rooted in the practical experiences and security challenges encountered during the development and securing of Webflow's "Source" app. The "Source" app itself serves as the real-world application under scrutiny, providing the context for all the lessons learned and security improvements discussed. The findings, such as the iFrame escape vulnerability or the sandbox binary path issue, are direct results of internal testing and code reviews performed during the app's development.
Defensive Implications
▶ Watch: Q&A: Preserving trust in agent swarms (20:50)
Securing agentic systems requires defenders to adopt a multi-layered and context-aware strategy, prioritizing controls based on the agent's operational environment and capabilities.
- Contextual Containment: Defenders must implement granular sandboxing tailored to the specific functions of each agent component. If agents run on user machines and perform file writes, rights management (e.g., restricting writes to project-specific directories) should be prioritized. For cloud-based agents handling sensitive user data, robust egress filtering is critical to prevent data exfiltration. Splitting sandboxing needs into distinct compartments (e.g., a sealed "thinking loop" versus an executing "shell sandbox") provides stronger isolation.
- Robust Provenance Tracking: Establish mechanisms to verify the origin and integrity of all instructions and third-party add-ons. This includes fingerprinting add-ons (hashing, signed keys) and enforcing explicit permission declarations. Crucially, all access control decisions must be made server-side to prevent client-side tampering. While challenging, associating agent actions with trusted provenance records can provide an additional layer of auditing and control.
- Meaningful Human Authority Design: User consent must be more than a perfunctory click. Design user prompts to be clear, concise, and educational, explaining the actual risks and implications of an agent's request. Implement time-limited, single-action tokens for approvals, tied to specific project and package details, and ensure these tokens are invalidated immediately after use. Crucially, never allow agents to silently approve actions; explicit refusal should be the default for unaddressed, undeliverable, or crashed prompts.
- Continuous Sandbox Validation: Proactively test and validate the integrity of sandboxing mechanisms. This means not just checking for the presence of a sandbox binary (e.g.,
sandbox exec) but verifying its full path and performing runtime checks to ensure it is actively enforcing policies. Have a clear strategy for handling sandbox failures (fail-open vs. fail-closed) based on the application's risk profile. - Prioritize Based on Risk: The "three-body problem" analogy highlights that pulling on one security lever affects others. Defenders should analyze their specific agentic application:
- User machine, writing code: Focus on file system rights.
- Cloud agent, reading and acting on user's behalf: Prioritize egress controls to prevent exfiltration.
- Many users/agents sharing a project: Concentrate on human authority, governance, identity, and authorization.
- Agent connecting to the open web, reading diverse data: Emphasize provenance to track instruction origins.
This strategic approach ensures that security efforts are concentrated where the risk is highest, leading to a more effective and less frustrating security posture.
Key Takeaways
- Agentic sandboxing requires a three-pronged approach: Security must simultaneously address containment (what agents touch), provenance (where instructions come from), and human authority (user consent).
- Containment needs to be tiered and specific: A single sandboxing model is insufficient; different components (e.g., thinking loop vs. execution shell) require varying levels of access and isolation, with careful attention to nuances like encrypted secrets and iFrame navigation.
- Provenance is paramount for trust: Verify the origin and integrity of all agent instructions and third-party add-ons through fingerprinting, permission declarations, and server-side access control.
- User consent must be explicit and informed: Avoid silent approvals and design consent prompts to educate users about residual risks, tying approvals to specific, time-limited actions with detailed context.
- Continuously validate sandbox integrity: Beyond initial setup, actively test and verify that sandboxing mechanisms are functioning as intended, including checking full binary paths and performing runtime checks.
- Prioritize security efforts based on agent context: The most critical security controls (rights, egress, provenance, human authority) depend on where the agent runs, what it accesses, and how it interacts with users and other systems.
About the Speaker(s)
Ankit Agrawal is the Head of Application Security at Webflow. In this role, he leads the application security program, bringing a wealth of experience to securing complex web applications. His insights in this talk are directly informed by his team's efforts in building and securing Webflow's "Source" app, an innovative design and marketing application where AI agents collaborate with human users. His work involves navigating the cutting-edge challenges of integrating AI into product ecosystems, particularly concerning sandboxing, trust boundaries, and user consent.
Reviews
→ Top-rated talks at [un]prompted II 2026 — The AI Security Practitioner Conference
All talks from [un]prompted II 2026 — The AI Security Practitioner Conference