Securing AI Agent Tool Execution with TypeScript AST Sandboxes
The article shows how to protect AI‑generated shell/SQL commands by parsing them with real AST parsers (tree‑sitter for Bash, Babel for JS‑embedded SQL) and enforcing structural allowlists plus command/path whitelists, instead of fragile regex filters.




























