DSH Plugins Marketplace

DSH Plugins

Plugins

/

Security & Audit

/

dsh-permissions

9

dsh-permissions

Manifest valid★ 4

Claude Code-style permission rules engine: hard/deny/ask/allow tiers with a hard tier above full access, workspace-scoped rules, wildcard path protection, and a visual staged editor; rules persist in

UI (client)hasBundlePatch

dsh-permissions

中文 | English

Awesome DSH Plugin Awesome DSH Plugin

面向 DeepSeek Harness(dsh)的 Claude Code 风格权限规则引擎。双面 Cordis 插件:宿主侧在 tools/pre-execute 瀑布上做拦截判定,浏览器侧提供 设置 → 权限 可视化编辑器。

亮点

  • 四级规则、严格优先级:hard > deny > ask > allow。
  • hard 高于全访问:即使会话处于全访问档(审批策略 never),hard 规则依然拦截、不可豁免;ask 规则跟随会话策略,全访问下自动放行。
  • 作用域:global 规则全局生效;按 workspace 的规则叠加合并(冲突时 deny 永远胜出)。
  • 通配符匹配(文件类工具 read/write/edit/glob/grep/read_image):
    • write(*.pem) —— 路径以 .pem 结尾
    • write(*secret*) —— 路径包含 secret
    • write(.ssh) —— 路径任意位置出现 .ssh 片段(大小写不敏感,\// 统一归一化)
    • write(C:\users\*) —— 绝对路径前缀
    • 裸 write —— 该工具全部调用
  • 持久化:规则存于 dsh-permissions 设置命名空间,跨重启保留(<harness home>/settings.yaml)。
  • 模型透明:生效规则注入系统提示([active-permission-rules] 段)。
  • 可视化编辑器:草稿式(staged)编辑——所有修改点「保存并应用」后才生效,附一键预设(保护敏感目录 / 密钥文件 / 拦截危险命令)。

界面截图

顶部:作用域与规则构建器规则面板 / 试算器 / 决策日志草稿式保存
顶部概览规则面板草稿态

规则语法

规则含义
pwsh该工具的全部调用
pwsh(npm run)首参以 npm run 开头
write(*.pem)文件路径以 .pem 结尾
write(*secret*)文件路径包含 secret
write(.ssh)路径任意位置出现 .ssh 片段
pwsh(*)全部调用(显式写法)

非文件工具按首参原文做前缀匹配;grep 额外匹配其 path 参数。

安装

方式 A —— 官方安装器(推荐):

dsh plugin add dsh-permissions

方式 B —— 手工补丁行: 把本仓库 cordis.patch.yml 中的 insert 列表追加到你的 profile 补丁(~/.dsh/cordis.patch.yml 或 ~/.dsh/profiles/<profile>/cordis.patch.yml),并确保包已安装到 profile 可解析的位置(~/.dsh/node_modules/dsh-permissions):

- insert:
    - id: permissions
      name: dsh-permissions

然后重启应用。设置 → 权限 页自动出现;引擎自带安全默认值(16 条 hard 规则保护 .ssh / .aws / .gnupg / AppData / *.pem / *.key / *.env / *.htpasswd,以及 deny: pwsh(rm -rf *))。

权限设置页

  • 引擎开关、三张一键预设卡、点选式规则构建器(动作 × 工具 × 匹配方式 × 参数 → 实时预览)、四个彩色规则面板。
  • 所有修改先进入草稿:点「保存并应用」前不影响 AI 行为;「放弃修改」恢复上次保存状态。

安全说明

  • 引擎只会收窄会话现有的沙箱/审批姿态:allow 只跳过本插件的询问,绝不绕过 DSH 沙箱或 tools.guard 守卫。
  • 拦截以工具错误呈现给模型(Error: 权限规则拒绝…;hard 为 硬规则拒绝(高于 full access,不可豁免)…),模型可见完整规则原文,可据此改道。
  • 设置页路由(GET/POST /api/dperm/rules)是命名空间所有者自建的端点——DSH api-proxy 的 settings 白名单刻意不暴露第三方命名空间。

开发与发布

见 PUBLISH.md:发布清单与本插件踩过的坑(客户端包 exports 必须含 ./package.json;bundle 模块 id 必须等于包名;useSyncExternalStore 不能传未绑定方法引用等)。

License

MIT

Compatibility

DSH 0.2.1-rc.4: failedDSH 0.2.1-alpha.4: failedDSH 0.2.1-alpha.5: failed

Versions

Latest versionPublishedSize
1.0.0——
1.0.1——
1.0.3——
1.0.4——
1.0.6——
1.0.7——
1.0.8——
1.0.9——
1.1.0——
1.1.1——
1.1.3——
1.1.7——
1.2.1——
1.2.2——
1.2.3——
2.0.2——

Comments

Loading…

Similar plugins

dsh-permission-rules

by PerryLink

Claude Code-style declarative permission rules for DeepSeek Harness: ordered allow/deny/ask rules with tool-name, argument (glob/regex), and workspace-path matching on the tools/pre-execute waterfall,

Security & AuditManifest valid

★ 135

Apache-2.0

TypeScript

Oct 27, 2026

dsh plugin --profile web add dsh-permission-rules

by log-li

Claude Code-style auto approval layer for DeepSeek Harness: deterministic rules + two-stage classifier, circuit breaker, fail-to-human. Shadow mode day one.

Security & AuditManifest valid

★ 7

↓ 419/wk

MIT

JavaScript

Oct 17, 2026

dsh plugin --profile web add @log.li/dsh-automode

by RUI-debug769

Runs a Claude Code project's .claude/ slash commands and permissions.deny rules inside DeepSeek Harness. Command bodies expand $ARGUMENTS, positional arguments and @file references into the agent's ne

Tools & CapabilitiesManifest valid

★ 0

MIT

TypeScript

Oct 19, 2026

dsh plugin --profile web add dsh-dotclaude

by StyxNether

Auto-Approval: a middle permission tier for DeepSeek Harness between workspace-write and danger-full-access, auto-approving harmless commands and trusted-area targets

Security & AuditManifest valid

★ 4

↓ 35/wk

MIT

JavaScript

Sep 6, 2026

dsh plugin --profile web add dsh-auto-approval-plugin

by AntaresCorn

Codex-style auto-review permission mode: adds an auto-review preset that auto-approves safe sandbox escalations, asks on risky or ambiguous ones, and rejects critical unconfirmed operations.

Security & AuditTools & CapabilitiesDevelopment & InfrastructureTerminal & ClientsManifest valid

★ 0

BSD-3-Clause

TypeScript

Sep 16, 2026

dsh plugin --profile web add @dsh-external/dsh-auto-reviewer

by Ayle5678

一款DSH (DeepSeek Harness) 插件:类似 Claude Code 中 Auto Mode 的一种命令通过机制,给 dsh中的full access 加一层 LLM 安全网的自动审批插件。

Manifest valid

★ 0

MIT

TypeScript

Aug 26, 2026

dsh plugin --profile web add dsh-auto-guard