winliyou/dsh-plugins--packages-sandbox-extra-roots ↗★ 0
@dsh-plugins/sandbox-extra-roots
DSH host plugin: extra writable roots for the workspace-write sandbox (Seatbelt/bwrap/Landlock profiles and the fs fence)
安装
此插件尚未提供可验证的 bundle,或兼容性检查未通过。请先阅读仓库说明。 阅读完整 README ↗
说明文档
阅读完整 README ↗@dsh-plugins/sandbox-extra-roots — DSH 沙盒额外允许目录插件
给 dsh 沙盒的 workspace-write 模式增加"额外允许写入的目录"列表(工具缓存目录等),
官方白名单始终保留(workspace 根 + /tmp + 平台临时目录),只追加不替换:
- bash:Seatbelt(macOS)重建 SBPL profile;bwrap / Landlock(Linux)在官方
profile 基础上插入
--bind/--rw;Windows ACL runner 无法表达额外根(告警一次) - fs fence:
checkedTarget对额外目录放行,其余委托官方实现 - 幂等、可热切换(挂载点引用计数);首次 confine 时自检官方 profile 是否漂移
安装
bash packages/sandbox-extra-roots/install.sh # file:// 模式
bash packages/sandbox-extra-roots/install.sh --npm # npm 模式
卸载:bash packages/sandbox-extra-roots/uninstall.sh。
配置
三种方式(后者覆盖前者):
- 内置默认(空列表)
cordis.patch.yml中 sandbox-extra-roots 行的 config(安装脚本生成的默认块)- DSH 设置页 → 插件配置 → 沙盒额外允许目录(保存到
~/.dsh/plugins/sandbox-extra-roots/config.json,立即热生效)
extraWritableRoots:绝对路径数组(设置页里每行一个)。相对路径/空值会被拒绝并告警。
安全提示:这些目录可获得"写"权限(读本就不受限),请只保留确需写入的工具缓存; 含明文凭证的目录(如
~/.docker、~/.dotnet、~/.gradle)谨慎列入。