| Crates.io | wardstone |
| lib.rs | wardstone |
| version | 0.1.0 |
| created_at | 2025-12-14 20:26:51.083344+00 |
| updated_at | 2025-12-14 20:26:51.083344+00 |
| description | Sandboxing system for secure tool execution (Seatbelt/Landlock) - magical containment |
| homepage | |
| repository | https://github.com/moltenlabs/molten |
| max_upload_size | |
| id | 1985049 |
| size | 65,490 |
Sandboxing system for secure tool execution - magical containment.
Wardstone provides platform-specific sandboxing for AI agent tool execution:
[dependencies]
wardstone = "0.1"
use wardstone::{SandboxPolicy, create_sandbox, NetworkPolicy};
use std::process::Command;
// Create a restrictive policy
let policy = SandboxPolicy::new()
.allow_read("/usr")
.allow_read("/lib")
.allow_write("./output")
.with_network(NetworkPolicy::None)
.with_timeout(std::time::Duration::from_secs(60));
// Create platform-specific sandbox
let sandbox = create_sandbox(policy)?;
// Wrap a command with sandbox restrictions
let cmd = Command::new("./my-script.sh");
let sandboxed_cmd = sandbox.wrap_command(cmd)?;
use wardstone::{SandboxPolicy, NetworkPolicy};
let policy = SandboxPolicy::default_for_tools("/home/user/project".into())
.allow_read("/tmp")
.allow_localhost() // Allow localhost network only
.allow_spawn(true); // Allow spawning subprocesses
| Platform | Implementation | Status |
|---|---|---|
| macOS | Seatbelt | ✅ Complete |
| Linux | Landlock | ✅ Complete |
| Windows | Windows Sandbox | 🚧 Planned |
MIT OR Apache-2.0