sage-sandbox-security

Enforce multi-layered sandboxing for Sage command execution with validation and OS isolation.

12|1|Updated Jul 15, 2025
One-click install
npx skills add https://github.com/majiayu000/sage --skill sage-sandbox-security
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sage-sandbox-security
Source: https://github.com/majiayu000/sage/tree/main/.sage/skills/sage-sandbox-security
Command: npx skills add https://github.com/majiayu000/sage --skill sage-sandbox-security

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Sage requires safe and auditable command execution. This Skill provides a structured guide to implement and reason about a multi-layered sandbox to protect the host from untrusted tasks.

Core Features & Use Cases

  • Command validation to prevent injection and unsafe commands.
  • Path policy to guard sensitive files and enforce access controls.
  • OS-level sandboxing (macOS sandbox-exec and Linux seccomp) for strong isolation.
  • Violation tracking and auditing with severity levels for ongoing security posture.

Quick Start

Configure the sandbox with a balanced default, then progressively tighten it in Strict mode for high-safety tasks. Example: let sandbox = SandboxBuilder::new().enabled(true).mode(SandboxMode::Strict).working_dir(PathBuf::from("/tmp/sage/work")).build()?; Use the sandbox to execute trusted tasks inside an isolated environment.

Frequently Asked Questions about sage-sandbox-security

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement a sandbox for executing untrusted commands safely?

Sandboxing untrusted commands requires a multi-layered architecture combining command validation, path policy enforcement, and OS-level isolation. This prevents injection and blocks unauthorized access to sensitive files during execution.

How does OS-level sandbox isolation work with seccomp and sandbox-exec?

OS-level sandbox isolation uses Linux seccomp and macOS sandbox-exec to restrict system calls and enforce strong process boundaries. This confines untrusted tasks within the operating system's native security policies.

Do I need Rust to configure a strict sandbox policy for code execution?

Configuring a strict sandbox policy requires Rust, as the architecture defines a Rust-based SandboxBuilder. This builder allows you to set modes like Strict and specify working directories for isolated execution.

What is the best way to track sandbox policy violations and security audits?

The best way to track sandbox policy violations is using a dedicated violation store with severity levels. This provides ongoing security posture tracking and auditing for tasks running untrusted commands.

What are the limitations of using path policies for sandbox hardening?

Path policies for sandbox hardening are limited to guarding sensitive files and enforcing access controls. They must be combined with command validation and OS isolation to fully protect the host from untrusted tasks.