/** * Sandbox Risk Confirmation Dialog * * Shows when the app is running outside a containerized environment. * Users must acknowledge the risks before proceeding. */ import { useState } from 'react'; import { ShieldAlert, Copy, Check } from 'lucide-react'; import { Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, } from '@/components/ui/dialog'; import { Button } from '@/components/ui/button'; import { Checkbox } from '@/components/ui/checkbox'; import { Label } from '@/components/ui/label'; interface SandboxRiskDialogProps { open: boolean; onConfirm: (skipInFuture: boolean) => void; onDeny: () => void; } const DOCKER_COMMAND = 'npm run dev:docker'; export function SandboxRiskDialog({ open, onConfirm, onDeny }: SandboxRiskDialogProps) { const [copied, setCopied] = useState(false); const [skipInFuture, setSkipInFuture] = useState(false); const handleConfirm = () => { onConfirm(skipInFuture); // Reset checkbox state after confirmation setSkipInFuture(false); }; const handleCopy = async () => { try { await navigator.clipboard.writeText(DOCKER_COMMAND); setCopied(true); setTimeout(() => setCopied(false), 2000); } catch (err) { console.error('Failed to copy:', err); } }; return ( {}}> e.preventDefault()} onEscapeKeyDown={(e) => e.preventDefault()} showCloseButton={false} > Sandbox Environment Not Detected

Warning: This application is running outside of a containerized sandbox environment. AI agents will have direct access to your filesystem and can execute commands on your system.

Potential Risks:

  • Agents can read, modify, or delete files on your system
  • Agents can execute arbitrary commands and install software
  • Agents can access environment variables and credentials
  • Unintended side effects from agent actions may affect your system

For safer operation, consider running Automaker in Docker:

{DOCKER_COMMAND}
setSkipInFuture(checked === true)} data-testid="sandbox-skip-checkbox" />
); }