Expand description
Sandboxing module for VT Code
Re-exported from vtcode-safety for backward compatibility.
Modules§
- network_
proxy - Local HTTP CONNECT / SOCKS5 proxy used to enforce hostname allowlists.
Structs§
- Additional
Permissions - Additional per-command filesystem permissions.
- Command
Spec - Specification for a command to be executed.
- Domain
Policy - Ordered domain rules; deny wins, then allow, then default deny.
- Domain
Rule - One hostname rule. Domains are case-insensitive;
*.example.comalso matches the bareexample.com, matching the existing allowlist semantics. - ExecEnv
- The prepared execution environment after sandbox transformation.
- Linux
Sandbox Launcher - How the Linux sandbox helper binary is invoked.
- Network
Allowlist Entry - Network allowlist entry for domain-based egress control.
- Network
Proxy - Running proxy. Dropping it stops both accept loops.
- Proxy
Endpoints - Loopback addresses the sandbox must allow outbound to.
- Resource
Limits - Resource limits for sandboxed execution.
- Sandbox
Debug Result - Result of a sandbox debug test.
- Sandbox
Manager - Manager for sandbox transformation.
- Seccomp
Profile - Seccomp profile configuration for Linux sandboxing.
- Sensitive
Path - Sensitive path entry for blocking access to credential locations.
- Validated
Sandbox Request - A sandbox request proven valid by
SandboxPermissions::resolve_request. - Writable
Root - A root directory that may be written to under the sandbox policy.
Enums§
- Debug
Subcommand - Debug subcommand types for CLI integration.
- Domain
Rule Action - Effect of a domain rule.
- Exec
Expiration - Mechanism to terminate an exec invocation before it finishes naturally.
- Proxy
Decision - Decision for a proxy request. Unknown destinations are denied.
- Sandbox
Permissions - Fine-grained permissions for sandbox operations.
- Sandbox
Policy - Sandbox policy determining what operations are permitted during execution.
- Sandbox
Transform Error - Error type for sandbox transformation failures.
- Sandbox
Type - Type of sandbox being used.
Constants§
- BLOCKED_
SYSCALLS - Syscalls that should be blocked in seccomp-bpf profiles.
- DEFAULT_
SENSITIVE_ PATHS - Default sensitive paths that should be blocked from sandboxed processes.
- FILTERED_
ENV_ VARS - Environment variables that should be filtered from sandboxed processes.
- FILTERED_
SYSCALLS - Syscalls that require argument filtering (not fully blocked).
- PRESERVED_
ENV_ VARS - Environment variables that should always be preserved.
- SECCOMP_
PROFILE_ VERSION - Version of the seccomp blocklist schema compiled into this binary.
- VTCODE_
SANDBOX_ ACTIVE - Sandbox environment markers set for child processes.
- VTCODE_
SANDBOX_ NETWORK_ DISABLED - VTCODE_
SANDBOX_ TYPE - VTCODE_
SANDBOX_ WRITABLE_ ROOTS
Functions§
- apply_
sandbox_ restrictions - Apply every kernel-level restriction of the sandbox policy to the current process: resource limits, then Landlock filesystem rules, then seccomp.
- build_
sanitized_ env - Build a sanitized environment for sandboxed child processes.
- debug_
sandbox - Debug sandbox configuration by running a test command.
- default_
sensitive_ paths - Get the default sensitive paths as SensitivePath entries.
- filter_
sensitive_ env - Filter sensitive environment variables from an existing map.
- landlock_
supported - Probe whether the running kernel enforces Landlock (ABI >= 1, Linux 5.13+).
- proxy_
enforcement_ available - Whether this platform can restrict a child to the proxy exactly.
- sandbox_
capabilities_ summary - Get a human-readable summary of sandbox capabilities for the current platform.
- setup_
parent_ death_ signal - Set up parent death signal on Linux.
- should_
filter_ env_ var - Check if an environment variable should be filtered.
- start_
proxy - Start HTTP and SOCKS5 listeners on ephemeral loopback ports.
- test_
network_ blocked - Test if network access is blocked under the given sandbox policy.
- test_
path_ writable - Test if a specific path is writable under the given sandbox policy.