Exploring Sandboxing for AI-Generated Google Apps Script
Abstract
Executing autonomous AI agent payloads in Google Workspace via the Apps Script API’s scripts.run method introduces severe security risks. This article presents a novel sandboxing proposal designed specifically for the scripts.run method, using ggsrun as the orchestrator to execute code safely and efficiently. By performing in-memory token replacement and uploading a separate, alphabetically-prioritized guard file, this approach achieves robust API-level containment. Guided by ggsrun’s automated backup and default rollback lifecycle (exe1), the remote environment is immediately restored, providing a clean, dependency-free security model for AI-driven Workspace automation.