Windows-native least-privilege launcher CLI implemented in modern C++.
Phase 1, 2, and 3 implementation features are now present in the CLI:
- Sandbox user lifecycle with DPAPI-protected credentials.
- Hardened run pipeline with restricted token path, low-integrity support, and job object limits.
- Configurable network policy defaults, timeout, memory limits, and CPU time caps.
- GPU opt-in behavior with integrity fallback to medium for compatibility.
- Python/Rust/GPU verification checks.
- Password rotation, structured status output, and persistent run logs.
- Ephemeral one-shot sandbox mode.
- Open sandbox_cli.sln in Visual Studio 2022.
- Select
x64and eitherDebugorRelease. - Build the solution.
Command-line build with MSBuild Developer Command Prompt:
msbuild .\sandbox_cli.sln /p:Configuration=Release /p:Platform=x64# Create a persistent sandbox profile and local user
sandbox-cli init --name dev
# Run a command in sandbox user context
sandbox-cli run --name dev -- python --version
# Run with additional controls
sandbox-cli run --name dev --integrity low --network restricted --timeout 120 --env MY_FLAG=1 -- gpu-tool.exe
# Run one-shot ephemeral sandbox (create -> run -> remove user)
sandbox-cli run --ephemeral -- rustc --version
# Check status
sandbox-cli status --name dev
# Verify Python/Rust/GPU prerequisites
sandbox-cli verify --name dev
# Rotate sandbox user password and refresh profile secret
sandbox-cli rotate-password --name dev
# Show or change global configuration
sandbox-cli config --show
sandbox-cli config --set network_default=allow --set default_integrity=medium
# Show recent audit logs
sandbox-cli logs --tail 50
# Remove user + profile metadata
sandbox-cli cleanup --name devsandbox-cli run supports:
--name <sandbox>for persistent profiles.--ephemeralfor one-shot profile/user lifecycle.--integrity low|medium.--network allow|restricted.--gputo enable GPU execution path.--env KEY=VALUE(repeatable).--workdir <path>.--timeout <seconds>.--rotate-afterto rotate password after successful run.--jsonto emit machine-readable execution summary.
Global config is stored at:
%LOCALAPPDATA%\\sandbox.cli\\config.ini
Supported keys:
network_default=restricted|allowdefault_integrity=low|mediumgpu_mode=off|compute|graphicstimeout_seconds=<int>memory_mb=<int>cpu_time_ms=<int>rotate_after_run=true|false
init,cleanup, androtate-passwordgenerally require Administrator privileges.- When
--gpuis used, low-integrity is relaxed to medium-integrity for compatibility. - Network mode is policy-signaled and logged (
alloworrestricted) withrestrictedas default. - Process tree control is enforced with job object limits and kill-on-close behavior.
%LOCALAPPDATA%\\sandbox.cli\\sandbox.log- Contains lifecycle, run, verify, config, and cleanup audit events.