特工安全屋 – 为本地代理提供的macOS原生沙盒
Agent Safehouse – macOS-native sandboxing for local agents

原始链接: https://agent-safehouse.dev/

## Safehouse:基于Bash的代理沙箱 Safehouse提供了一种安全的在macOS上运行AI代理的方式,仅使用Bash,无需构建步骤或依赖项。它是一个可下载的shell脚本,为代理执行创建了一个受限制的环境。 要使用它,请下载`safehouse.sh`,使其可执行,然后从您的项目目录中*在*Safehouse内运行您的代理(例如`claude`)。 Safehouse会自动授予对当前工作目录(您的项目)和已安装工具的访问权限,但**严格限制对您系统其余部分的访问**。 尝试访问敏感文件,如SSH密钥或其他项目目录之外的仓库,将被内核阻止,从而证明了沙箱的有效性。 这确保了代理安全运行,防止未经授权访问个人数据。

## Agent Safehouse:macOS 沙盒用于本地 AI 代理 Agent Safehouse (agent-safehouse.dev) 是一款 macOS 原生工具,旨在利用 `sandbox-exec` 安全地运行本地 AI 代理。它旨在实现“全自动”代理操作,同时确保安心,解决了代理访问敏感数据或导致意外系统更改的担忧。 该项目本质上是 `sandbox-exec` 的策略生成器,它最大限度地减少了依赖关系,并专注于识别代理正确运行所需的最小权限——包括自动更新、钥匙串访问和图像粘贴。用户甚至可以通过基于 Web 的策略构建器或 LLM 指令生成策略,并将其集成到他们的点文件中。 虽然现有的代理沙盒解决方案(如 Claude Code 中的解决方案)存在局限性——潜在的逃逸漏洞或过于宽泛的权限——但 Agent Safehouse 旨在提供更强大和可定制的方法。开发者欢迎反馈和贡献,特别是关于细粒度控制和与 `lldb` 等工具的集成。 多个相关项目正在涌现,凸显了对安全代理执行环境日益增长的需求。 核心思想是在代理访问潜在危险资源 *之前* 提供强大的安全边界,从而补充在应用程序层控制工具访问的努力。
相关文章

原文

Download a single shell script, make it executable, and run your agent inside it. No build step, no dependencies — just Bash and macOS.

Safehouse automatically grants read/write access to the selected workdir (git root by default) and read access to your installed toolchains. Most of your home directory — SSH keys, other repos, personal files — is denied by the kernel.

See it fail — proof the sandbox works

Try reading something sensitive inside safehouse. The kernel blocks it before the process ever sees the data.

联系我们 contact @ memedata.com