
Security News
Deno Goes the Way of the Dinosaur
Cloudflare is acquiring Deno’s team, which will provide another year of bug fixes and security updates before ending support for the runtime.
dsh-sandbox-allowlist
Advanced tools
DSH sandbox extension: configurable trusted writable roots outside the workspace, for both sandboxed CLI commands and the write/edit tools. 为 DSH 默认沙箱增加可配置的「沙箱授权目录」,允许工作区外的受信修改。
DSH(DeepSeek Harness)沙箱扩展插件:为官方默认沙箱增加可配置的可信可写目录, 让沙箱内的 CLI 命令与 write/edit 文件工具都能写工作区之外的「沙箱授权目录」—— 不需要每次审批、不需要关闭沙箱。
dsh plugin --profile <name> add dsh-sandbox-allowlist** 子树、* 一级子目录、? 单字符)sandbox-allowlist 设置 namespace,含安全警示说明)DSH 沙箱允许写哪里 = 允许清单(allow-list)。本插件向清单追加沙箱授权目录:
(OI)(CI)(W,D,DC))→ 受限 CLI 直接可写、
未来子目录自动继承;write/edit 工具由自研 fs 栅栏放行同一份清单。bwrap 追加 --bind <root> <root>;landlock/seatbelt 暂不支持
(会告警并忽略,建议使用 bwrap)。# 从 npm registry / GitHub Releases 安装(发布后)
dsh plugin --profile web add dsh-sandbox-allowlist
# 本地开发调试(tarball)
pnpm pack --pack-destination /tmp/pkg
dsh plugin --profile web add /tmp/pkg/dsh-sandbox-allowlist-*.tgz
dsh plugin add 会自动把本包追加进 profile 的 dsh.profile.bundles 层,
其 cordis.patch.yml 作为补丁层挂载:禁用官方 sandbox-policy/fs-sandbox
行(Linux 另禁 sandbox 行),插入本包的替换行。改完后 HMR 自动热应用,
无需重启。
沙箱授权目录清单通过 sandbox-allowlist 设置 namespace 管理(设置页可编辑,写入
$DSH_HOME/settings.yaml,实时生效):
sandbox-allowlist:
allowedDirs:
- 'D:\Shared\Tools' # 字面目录:整棵子树可写
- 'D:\Shared\**' # 子树(含根自身与未来子目录)
- 'D:\Data\logs\*' # 现存的一级子目录
- 'D:\Work\202?' # ? 匹配单个非分隔符字符
- '/opt/tools/**' # POSIX 写法同样支持
⚠️ 安全警示:沙箱授权目录将被沙箱内的 AI 代理直接写入(无需审批)。请只添加 完全信任的目录;目录必须已存在且归当前用户所有;撤销信任删除条目即可 (Windows 上旧目录的 ACE 用
node scripts/revoke.mjs清理)。
通配符在每次调用前懒展开(TTL 缓存,expandTtlMs 可调);不存在的路径跳过
并告警(strict: true 可改为抛错);锚定盘符/根目录且带 ** 的模式被拒绝
(防整盘遍历)。
lib/policy.mjs 替换 sandbox-policy:沙箱授权目录展开 + Windows ACE 物化 +
sandbox-allowlist 设置 namespace 注册 + 模型提示上下文
lib/fs.mjs 替换 fs-sandbox:write/edit 栅栏放行 extraRoots
lib/provider.mjs 替换 sandbox(仅 Linux):bwrap --bind 追加
lib/patterns.mjs 通配符匹配与目录展开(共享)
cordis.patch.yml bundle 补丁层(安装即挂载)
scripts/revoke.mjs Windows ACE 撤销脚本
src/client/ 设置页「沙箱授权目录」分节源码(需 dsh 开发工具链构建)
test/ 自检测试 / 补丁组合预检 / 干挂载测试
npm test # 自检测试(通配符展开、类继承、Config/schema 校验)
npm run test:patch # 补丁组合预检(离线组合 web profile 补丁层)
npm run test:dry-mount # 干挂载(临时 cordis 上下文端到端验证)
真机验证要点:受限 pwsh / write 工具写沙箱授权目录应成功且无审批;写工作区外非可信
目录应仍被拦截(FS_SANDBOX_DENIED);icacls <dir> 应能看到工作区 SID
S-1-4-... 的 (OI)(CI)(W,D,DC) ACE。
设置页的沙箱授权目录配置分两层:
服务端数据层(已实现并验证):插件通过 ctx.settings 注册 sandbox-allowlist
namespace(schema 描述中携带安全警示文案,随 schema.toJSON() 供设置页渲染)。
设置文档(settings.yaml)→ 策略 → ACE → 受限写 全链路已真机验证。
客户端分节(源码脚手架,需 dsh 开发工具链构建):src/client/index.tsx
在设置页 settings.section 槽位注册「沙箱授权目录」分节(警示横幅 + 每行一个
模式的文本列表编辑器)。构建步骤:
# 1) 在 dsh 开发仓库的 pnpm workspace 中(client 依赖需可解析):
pnpm install
pnpm run build:client # tsc + tsdown → lib/client.js(__ModuleLoader__ 格式)
构建产物 lib/client.js 就位后,在 package.json 的 dsh 字段补充
client 声明(产物缺失时不可声明,否则 web 应用加载会失败):
"dsh": {
"bundle": { "patch": "./cordis.patch.yml" },
"client": {
"inject": [
"@deepseek-ai/dsh-client-runtime",
"@deepseek-ai/dsh-client-connection",
"@deepseek-ai/dsh-client-ui-slots",
"@deepseek-ai/dsh-client-ui-settings"
],
"platform": "web"
}
}
客户端插件须用 dsh 官方构建链(tsdown)产出
__ModuleLoader__格式。 源码中的TODO标记(settings scope 绑定、写 RPC 签名)需对照 dsh 开发 仓库中 client 包的.d.ts复核后构建验证。
bwrap 完整支持;landlock/seatbelt 暂不支持workspace-write 模式下放行沙箱授权目录SandboxPolicyService / SandboxedFileSystem /
LocalSandboxProvider)签名变化,本插件可能需要小调MIT
FAQs
DSH sandbox extension: configurable trusted writable roots outside the workspace, for both sandboxed CLI commands and the write/edit tools. 为 DSH 默认沙箱增加可配置的「沙箱授权目录」,允许工作区外的受信修改。
The npm package dsh-sandbox-allowlist receives a total of 226 weekly downloads. As such, dsh-sandbox-allowlist popularity was classified as not popular.
We found that dsh-sandbox-allowlist demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.

Security News
Cloudflare is acquiring Deno’s team, which will provide another year of bug fixes and security updates before ending support for the runtime.

Security News
Anthropic’s free OSS Scanner uses Mythos and other Claude models to find open source vulnerabilities and send maintainers reports with proposed fixes.

Security News
On Front Lines’ Early Adopters: CISO podcast, Andrew Becherer shares lessons from Datadog, weighs the long-term costs of AI-built tools, and explains how founders can actually gain a CISO’s trust.