eugene1g/agent-safehouse

Sandbox your local AI agents so they can read/write only what they need

What it solves

它為在 macOS 上運行的 LLM 編碼代理程式提供了一個安全層,防止它們存取不需要的敏感檔案或系統整合。它解決了代理程式可能無意或有意地存取其指定工作區之外的私有數據的風險。

How it works

Safehouse 使用 sandbox-exec 來實作「先拒絕」的安全模型。它採用可組合的策略設定檔,首先封鎖所有存取,然後明確地僅允許必要的路徑和權限。它還處理 macOS 特有的路徑解析(例如 /etc 中的符號連結),並能自動偵測 Git worktrees 以確保代理程式擁有所需的元數據存取權,而不會危害系統安全。

Who it’s for

在 macOS 上使用基於 LLM 的編碼代理程式,且希望透過將代理程式環境限制在最小權限模型中來降低安全風險的開發人員。

Highlights

  • Deny-first approach: Starts with a total block and allows only specific, required access.
  • Composable profiles: Includes pre-built profiles for popular coding agents and app-hosted workflows.
  • macOS integration: Specifically designed for macOS using sandbox-exec and handles system path resolution.
  • Flexible overrides: Supports machine-specific local overrides and the ability to add read-only directories via command-line flags.