Overview
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)
- Development automation agents
- CI/CD workflow agents
- Infrastructure-as-code tools
Complete Policy
coding-agent.yaml
Rules Explained
1. Block Dangerous Shell Commands
Rule ID:coding-agent-block-dangerous-shell-commands
What 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)
rm -rf / can destroy an entire system.
Example blocked call:
2. Restrict Sensitive File Writes
Rule ID:coding-agent-restrict-sensitive-file-writes
What 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
3. Block Path Traversal File Writes
Rule ID:coding-agent-block-path-traversal-writes
What 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:
Usage Example
Basic Setup
veto.config.yaml
With TypeScript SDK
Customization
Allow Specific System Paths
If you need to write to/etc for legitimate infrastructure automation:
Add Command Approval
Require human approval for potentially dangerous commands instead of blocking:Add Package Manager Protection
Prevent agents from installing system packages without approval:What’s NOT Protected
This pack focuses on preventing immediate catastrophic damage. It does NOT protect against:- Malicious code injection - An agent can still write malicious JavaScript/Python files
- Data exfiltration - File reads are not restricted
- Resource exhaustion - No limits on CPU/memory usage
- Git operations - Force pushes, branch deletion, etc. are not blocked
- Combining with other packs (e.g.,
@veto/data-accessfor database protection) - Adding custom rules for your specific tool names
- Using operating system-level sandboxing (containers, VMs)
- Implementing rate limiting for tool calls
Testing Your Configuration
Use the Veto CLI to test what would be blocked:Related Resources
Policy Pack Overview
Learn about all available policy packs
Rule Syntax Reference
Complete YAML rule format documentation
Deployment Pack
Additional protection for CI/CD workflows
Human-in-the-Loop
Set up approval flows for sensitive operations

