Docs
Marketing Feature Code
Marketing section for code or network policy features
Control egress traffic with fine-grained network policies that can be updated at runtime. Credentials brokering injects secrets into outbound requests without exposing them inside the sandbox, preventing data exfiltration even when running untrusted code.
const sandbox = await Sandbox.create({network: {policy: 'allow-all',},});// Install dependencies with full network accessawait sandbox.runCommand({ cmd: 'npm', args: ['install'] });// Lock down network before running untrusted codeawait sandbox.setNetworkPolicy({policy: 'user-defined',allowedDomains: ['api.openai.com', '*.vercel.app'],// Credentials injected on egress - never in sandboxtransformations: [{domain: 'api.openai.com',headers: { Authorization: 'Bearer $OPENAI_API_KEY' },}],});
pnpm dlx shadcn@latest add https://cult-ui.com/r/marketing-feature-code.json