TingRuDeng/dsh-smart-approval

DeepSeek Harness 的故障关闭三模式审批插件

Project Overview项目介绍

dsh-smart-approval is a fail-closed approval security plugin built exclusively for DeepSeek Harness (DSH). It adds an independent automatic review selector alongside DSH's native access permission controls, separating permission configuration from the approval workflow. The plugin offers three review modes: manual, smart, and unattended, each with tailored rules for handling low-risk, high-risk, and clearly malicious requests. To install the plugin, you need Node.js 24 or later, a DSH version between 0.1.2-alpha.1 and 0.2.0, and pnpm available in your system PATH. You can install it via a globally installed DSH CLI or use npx for a one-off execution.

By default, all new DSH sessions use smart approval mode, which is the recommended setting. Changes to review mode or access permission do not require restarting DSH, and any adjustments take effect on the next approval request without disrupting your current session. You can switch modes via the web interface selector or use the /approval-mode command directly in your active session. The /approval-log command lets you view a log of automatic approval decisions for your current session, with configurable size to disable auditing if needed. This plugin is designed for developers who need layered security controls for their DSH workflows.

Both this plugin and DSH are currently in developer preview, so there are still known security limitations. For example, the plugin cannot fully eliminate path-replacement race conditions on workspace write operations, and it does not turn the single DSH workspace root into a multi-root sandbox. You should always pin exact versions of the plugin and DSH to ensure a reproducible environment. The plugin is released under the open-source MIT license, which allows free use, modification, and distribution. For local development, you need to match your DSH checkout version to the supported baseline to resolve dependencies correctly.

dsh-smart-approval是专为DeepSeek Harness(DSH)开发的原生故障关闭型安全审批插件,它在DSH原生提供的只读、工作区写入、完全访问三种权限控制基础上,额外增加了独立的自动审批选择器,将访问权限配置与自动审批流程分离,新增智能、手动、无人值守三种审批模式,可针对不同风险等级的操作匹配对应审批规则。

默认情况下,所有新会话都会启用智能审批模式,修改审批模式或访问权限都无需重启DSH,变更会在下一次审批请求中生效。用户可以在网页端通过独立选择器切换模式,也可以在会话中使用/approval-mode命令切换,还能通过/approval-log命令查看本次会话的自动审批决策日志。该插件面向需要对DSH操作做分层安全管控的开发人员,适配不同风险级别的开发安全场景。

安装该插件需要Node.js 24及以上版本、DSH版本需在0.1.2-alpha.1到0.2.0之间,还需要pnpm添加到系统环境变量PATH中。目前插件和DSH都处于开发者预览版,无法完全消除路径替换竞争等安全问题,使用时需要锁定精确版本以保证运行环境可重现。该插件采用MIT开源许可协议,可免费使用、修改和分发。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 1 warning1 项注意
  • Only 2 stars - very few users, little community feedback星标只有 2,几乎没人在用,遇到问题缺少社区反馈
DSH walks through these 9 checksDSH 会逐条核对这 9 项

Compatibility兼容性

  • DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
  • External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
  • Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册

Security安全性

  • Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
  • Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
  • curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
  • Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
  • Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
  • Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式

Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。

Or use CLI install (for developers)或使用命令行安装(适合开发者)

CLI Install命令行安装

dsh plugin --profile web add dsh-smart-approval@0.1.0-rc.11

把 TingRuDeng/dsh-smart-approval 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

dsh-smart-approval

English | 中文 | Changelog

dsh-smart-approval is a fail-closed approval plugin for DeepSeek Harness. It separates access permission from automatic review: DSH continues to own Read Only, Workspace Write, and Full access, while this plugin adds an independent review selector beside Workspace Write.

New sessions use smart approval by default. Changing review mode does not change the sandbox, and changing access permission does not change review mode. Both changes apply to the next approval request without restarting DSH.

[!WARNING] This project and DSH are both in developer preview. Review the security boundaries below and pin exact versions in reproducible environments.

Two independent selectors

The Web composer should show two controls:

[ Workspace Write ▾ ] [ Smart approval ▾ ]
  • Access: Read Only, Workspace Write, and Full access, owned by DSH.
  • Automatic review: Manual approval, Smart approval, and Unattended, owned by this plugin.
Review mode Safe request High-risk or uncertain Clearly malicious
Manual approval Ask a human Ask a human Ask a human
Smart approval (recommended default) Allow once Ask a human Reject
Unattended Allow once Reject Reject

Automatic review only handles requests that already enter DSH's approval/request waterfall. It never expands the current access permission or switches a session to Full access.

Install

Requirements

  • Node.js 24 or later.
  • DeepSeek Harness >=0.1.2-alpha.1 <0.2.0 (current source verification baseline: 0.1.2-alpha.2, commit 0a53fb55bea101816fa226bb964ae2bed71c343b).
  • pnpm on PATH; DSH forwards plugin-management operations to pnpm.

After installing the DSH CLI globally:

npm install --global @deepseek-ai/dsh@0.1.2-alpha.2
dsh plugin --profile web add dsh-smart-approval@0.1.0-rc.11
dsh --profile web --dump-config
dsh web

For one-off execution:

npx @deepseek-ai/dsh@0.1.2-alpha.2 plugin --profile web add dsh-smart-approval@0.1.0-rc.11
npx @deepseek-ai/dsh@0.1.2-alpha.2 --profile web --dump-config
npx @deepseek-ai/dsh@0.1.2-alpha.2 web

Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →

← 上一个 Prev dsh-hotspots 下一个 Next dsh-mcp-workspace-scope →