🛡️ Wardstone
Sandboxing system for secure tool execution - magical containment.
Overview
Wardstone provides platform-specific sandboxing for AI agent tool execution:
- macOS: Seatbelt (sandbox-exec) with auto-generated .sbpl policies
- Linux: Landlock LSM for filesystem isolation
- Windows: Windows Sandbox (planned)
Features
- 🔒 Filesystem isolation (read/write/execute permissions)
- 🌐 Network access control
- ⏱️ Execution timeouts
- 🎯 Path-based permissions
- 🔧 Easy policy builder API
Installation
[]
= "0.1"
Usage
use ;
use Command;
// Create a restrictive policy
let policy = new
.allow_read
.allow_read
.allow_write
.with_network
.with_timeout;
// Create platform-specific sandbox
let sandbox = create_sandbox?;
// Wrap a command with sandbox restrictions
let cmd = new;
let sandboxed_cmd = sandbox.wrap_command?;
Policy Builder
use ;
let policy = default_for_tools
.allow_read
.allow_localhost // Allow localhost network only
.allow_spawn; // Allow spawning subprocesses
Platform Support
| Platform | Implementation | Status |
|---|---|---|
| macOS | Seatbelt | ✅ Complete |
| Linux | Landlock | ✅ Complete |
| Windows | Windows Sandbox | 🚧 Planned |
Part of the Goblin Family
- warhorn - Protocol types
- trinkets - Tool registry
- wardstone - Sandboxing (you are here)
- skulk - MCP connections
- hutch - Checkpoints
- ambush - Task planning
- cabal - Orchestration
License
MIT OR Apache-2.0