The Coding Agent pack provides essential security guardrails for AI agents that execute shell commands, modify files, or interact with development environments. It prevents common destructive operations while allowing normal development workflows.Use this pack for:
AI coding assistants (like Cursor, GitHub Copilot, Codeium)
Rule ID:coding-agent-block-dangerous-shell-commandsWhat it does: Prevents execution of shell commands that can cause catastrophic system damage.Blocked patterns:
rm -rf - Recursive force deletion (can wipe entire filesystems)
mkfs - Format filesystem (destroys all data on a disk)
shutdown - System shutdown (interrupts all work)
reboot - System restart (interrupts all work)
Why it’s important: AI models can sometimes generate destructive commands when troubleshooting or “cleaning up.” A single rm -rf / can destroy an entire system.Example blocked call:
// This will be blocked:await executeCommand({ command: "rm -rf /tmp/*" });// Error: Tool call denied: dangerous shell command detected
Rule ID:coding-agent-restrict-sensitive-file-writesWhat it does: Prevents writing to critical system directories and sensitive configuration paths.Blocked locations:
/etc - System configuration files (network, users, services)
/root - Root user’s home directory
Any path containing .ssh - SSH keys and configuration
Why it’s important: Modifying system files can break the OS, create security vulnerabilities, or lock you out of the system. SSH keys should never be auto-generated or modified by an AI.Example blocked calls:
// These will be blocked:await writeFile({ path: "/etc/hosts", content: "..." });await editFile({ path: "/root/.bashrc", changes: [...] });await appendFile({ path: "/home/user/.ssh/authorized_keys", content: "..." });
Rule ID:coding-agent-block-path-traversal-writesWhat it does: Blocks file writes using relative path traversal (../).Why it’s important: Path traversal attacks allow writing files outside the intended directory. An agent working in /home/user/project should not be able to write to /home/user/../../etc/passwd via ../ sequences.Example blocked call:
// This will be blocked:await writeFile({ path: "/home/user/project/../../../etc/shadow", content: "malicious data"});