Syntax
Description
Execute commands with comprehensive security validation. Commands are analyzed for risks before execution, and risky commands may be sandboxed automatically. Critical commands likerm -rf / are always blocked.
Options
Prompt for approval on risky commands instead of blocking automatically. Allows you to review security concerns and approve or deny execution interactively.
Track execution in the specified session ID. All commands and their results will be recorded in the session for audit purposes.
How It Works
- Analysis: All commands are analyzed for security risks using 200+ patterns
- Critical Protection: Commands like
rm -rf /,mkfs,dd if=are always blocked - Guard Level Filtering: Findings are filtered based on your configured guard level (off, low, medium, high, paranoid)
- Repeat Protection: Prevents rapid loops of destructive commands
- Sandbox Decision: Risky commands may be sandboxed based on configuration
- Execution: Safe commands run on host, risky ones in sandbox with caching
Exit Codes
- 0: Command executed successfully
- 1: Execution error or command not found
- 2: Security violation detected
- 3: Command blocked (critical risk, lockdown, or guard level)
- Other: Exit code from the executed command
Examples
Basic execution
Interactive approval for risky commands
Track in a session
Soft delete with automatic backup
Bypass for non-critical commands
Environment Variables
VECTRAGUARD_SESSION_ID: Auto-track commands in this sessionVECTRAGUARD_BYPASS: Allow bypass for non-critical commands (requires 10+ char value)VECTRAGUARD_ALLOW_NET=1: Allow external HTTP(S) endpointsVECTRAGUARD_ALLOW_SUDO=1: Allow sudo usage