drscrewdriver/dsh-seatbelt-sandbox

drscrewdriver★ 0TypeScriptLast synced: 2026-08-15

Open on GitHub

dsh-seatbelt 方面沙箱增强尝试使用非exec工具直接对接系统seatbelt相关api

README excerpt

dsh-seatbelt-sandbox macOS Seatbelt(libsandbox)沙箱适配器,为 DeepSeek Harness(dsh)提供 cordis 插件形态 的 seatbelt rung 替换:部署时在 cordis.yml 里把 sandbox 插件从 @deepseek-ai/dsh-sandbox-local 换成 dsh-seatbelt-sandbox ,即可让 dsh 的 macOS 沙箱从 Apple 弃用的 sandbox-exec CLI 切换到直接调用私有 libsandbox API 的自带 loader—— 无需修改 dsh 源码、无需提 PR 。 当前状态(筹备阶段) 项 状态 单元测试(SBPL 方言 / argv 组装 / 缓存 / 探测 / fail-closed) ✅ 12/12 通过(macOS arm64 实测) tsc 严格模式编译 ✅ 通过 macOS 二进制构建( npm run build:native ) ✅ 已完成(macOS arm64; bin/darwin-arm64/seatbelt-run 34KB 有效 Mach-O) macOS 真实内核 e2e(deny-write / workspace-write / 坏 profile 125) ✅ 5/5 通过(macOS arm64 真实内核断言) dsh 装配集成(cordis.yml 替换后真实运行 + [sandbox: file access denied] 归因) ⏳ 未验证 npm 发布 ⏳ 未发布( dsh-seatbelt-sandbox 尚未 publish) darwin-x64 二进制 ⏳ 未构建(arm64 优先,x64 需 Intel macOS 环境) 代码与测试基于 dsh 源码逐行核实(landlock-run 先例形态、 confine() 契约、SBPL 方言), macOS arm64 上已通过全部 17 项测试(12 单元 + 5 e2e 真实内核断言) 。在完成下方「发布前验收清单」前,请勿用于生产部署。 快速开始(筹备阶段) 为什么需要它 Apple 自 macOS 10.10 起弃用 sandbox-exec CLI,未来系统版本可能移除;但底层 libsandbox.1.dylib 的私有 API( sandbox init / sandbox free error )仍是 macOS 安全架构核心(App Sandbox、sandboxd、Chromium/Firefox 都在生产环境直接调用)。任何需要 macOS 沙箱的语言生态都应基于该 API 构建 loader 模式: 核心不变量: 沙箱必须作用于最终运行目标命令的进程,且必须先于目标启动应用 。 纯 JS 无法自做…

View full README on GitHub →
Tools / Devcdshdsh-bundledsh-plugindsh-plugin-marketdsh-pluginstyescript

Category