Blogs›Vercel›AI Security Vulnerability Benchmarking
AI Security Vulnerability Benchmarking
Vercel Sandbox is used by Notion to run untrusted code for their Custom Agents, providing hard isolation via Firecracker microVMs, credential security through a firewall proxy, dynamic network policies, and filesystem snapshotting for fast cold starts. This enables Notion to offer a developer platform for third-party data syncing, custom automations, and AI agent tools. Performance optimizations have been applied to snapshot restore times, reducing p75 latency from over 40 seconds to under one s. This post details security considerations for building AI agents, focusing on prompt injection, data exfiltration, and designing for failure. It emphasizes scoping tools to user authority, treating model output as untrusted, sanitizing markdown, and avoiding secrets in prompts. It also references `harden-react-markdown` and `markdown-to-markdown-sanitizer` for output sanitization.