跳到正文
dsh-market 浏览插件 GitHub EN

sjh9714/dsh-movein-permissions

为 DSH 补上按工具粒度的权限规则:在 tools/pre-execute 强制执行 deny/ask 清单,规则语法与 Claude Code 相同,不迁移也能单独用。

Star 数 ★ 7 分类 安全与权限 收录于 2026-08-15 npm dsh-movein-permissions

安装

在 DeepSeek Harness 里通过 dsh-market 安装

dsh plugin --profile web add dshmarket

或使用命令行

dsh plugin --profile web add dsh-movein-permissions

装任何插件都等于在你的机器上跑第三方代码,权限和你本人一样大——能读你的文件、用你的凭据、访问网络。请先审阅源码,并尽量锁定 commit(github:owner/repo#sha)。

README

该插件的 README 只有英文版本。

Fine grained, per tool permission rules for DeepSeek Harness (DSH).

DSH ships three coarse permission presets (read-only, workspace-write, danger-full-access) and its README names the missing piece itself, there is no per tool allowlist. This plugin adds one at the tools/pre-execute gate, using Claude Code's battle tested rule syntax. You do not need to be migrating from Claude Code to use it.

为 DSH 补上按工具粒度的权限规则。DSH 自带的三档权限预设没有细粒度控制,这个插件在 tools/pre-execute 强制执行 deny/ask 规则,规则语法与 Claude Code 相同。不迁移也能单独用。

Install

dsh plugin --profile web add dsh-movein-permissions

Then add a row to ~/.dsh/cordis.patch.yml (or your profile's patch):

- insert:
    - id: cc-permissions
      name: 'dsh-movein-permissions'
      config:
        deny:
          - 'Bash(rm -rf:*)'
          - 'Read(*secrets*)'
          - 'mcp__github__delete_repo'
        ask:
          - 'Write'
          - 'Bash(git push:*)'

Restart dsh web. Denied calls return a typed refusal to the model, ask rules force a confirmation.

Rule syntax

Claude Code permission rule shape, Tool or Tool(specifier).

Rule Meaning
Bash(npm run test:*) any shell command starting with npm run test (matched on terminal_* tools)
Read(*secrets*) any read whose path contains secrets
Write every write
mcp__server__tool one exact MCP tool, names are identical in DSH and Claude Code

Mapped tools. Bash (terminal_open/terminal_send and friends), Read, Write, Edit, and every mcp__* tool. * patterns match as a superset, over-denying is the safe direction for a gate.

Deny wins over ask. Rules that reference tools with no DSH equivalent never match anything, harmless but pointless, the dsh-movein migration report lists them for you.

Coming from Claude Code?

npx dsh-movein --apply generates this row from your existing settings.json automatically, along with the rest of your setup.

License

MIT

内容来自项目 README(GitHub)↗