DeepSeek Harness Plugin Hub

Publish and manage complete Harness Profiles. Discover Plugins for your next setup.

Explore

PluginsPresetsDocsNews

Community

Publish a pluginContactReport an issue

Resources

Plugin Hub on GitHubDeepSeek HarnessSystem statusPrivacy notice
© 2026 DeepSeek Harness Plugin HubPowered byPaxTech

Independent and unofficial. Not affiliated with, authorized by, or endorsed by DeepSeek.

Guard Sensitive Paths — DSH Plugin for DeepSeek Harness
DeepSeek Harness Plugin Hub
ProfilesPluginsCategoriesNewsDocsSign inManage Profiles
ProfilesPluginsCategoriesNewsDocsSign in
← Plugins
G

dsh-guard-sensitive-paths

Guard Sensitive Paths

Approval guard for DeepSeek Harness: write/edit/editor/bash calls touching sensitive paths (.env, .git, SSH keys, .pem) and reads of SSH keys or certificates become an approval ask.

The plugin will be installed here. Keep web if you are unsure.

npx -y @deepseek-ai/dsh plugin --profile web add github:TARS-snail/dsh-guard-sensitive-paths#49871f2a3edde90e6c00eadb107493ecc218ccbf
READMECompatibilityVersions

Compatibility and provenance

Guard Sensitive Paths is published as dsh-guard-sensitive-paths and currently resolves to version 1.2.0. The Hub verifies its manifest and preserves the exact installation source for reproducible installs.

DSH compatibility
*
Runtime surfaces
any
Release source
github
Registry updated
9/18/2026

Versions

1.2.0stable
9/18/2026
1.1.0stable
9/2/2026

Related plugins

Loading related plugins…

Latest
1.2.0
DSH
*
HMR
Process restart
Tree shaking
Safe tree shaking not declared
Unpacked size
Unavailable
Files
Unavailable
Surface
any
License
MIT
Source
github
GitHub
★ 0
Weekly downloads
0
Last push
9/18/2026
View source ↗
README badge

Click the badge to copy Markdown for your README.

Do you maintain this Plugin?Claim benefit · Priority security scan

Verify the GitHub repository declared in package.json to manage this listing. After you claim it, Hub will prioritize a security scan of the current version and publish the result when it passes.

Claim this Plugin →
Report an issue

Related plugins

More verified plugins in security-access.

Pocketdsh-pocketPut DeepSeek Harness in your pocket: one package, one settings page, and scan a QR code on your phone to access DSH on your computer in sync (LAN + public network, real-time screen mirroring).DSCODE@toddzheng024/dscode-bundleA complete DeepSeek coding agent with persistent shell, Ultra collaboration and automatic permission review.Auto Reviewdsh-auto-reviewSecond-model AI auto-review for DeepSeek Harness approval requests: a read-only reviewer subagent decides allow/deny on the approval answerer chain, with fail-closed fallback and full session-log audit.Codex Subscriptiondsh-codex-subscriptionUse ChatGPT and Codex subscriptions in DeepSeek Harness with OAuth, quota, safe resets, web search, images, and Fast mode

README

dsh-guard-sensitive-paths

一个 DeepSeek Harness(DSH)插件(bundle):宿主侧前置注册 tools/pre-execute 策略,把指向敏感路径的 write / edit / str_replace_editor / bash 调用,以及 read 对密钥类文件(SSH 私钥、.pem 证书)的读取,拦截为审批询问(ask)——命中时调用不会直接执行,而是请求用户批准;没有审批通道的自动化按失败关闭。

本插件是纯审批策略:不修改任何会话行为,只把命中敏感目标的调用变成一次审批交换。grep / glob 对同一敏感集合的搜索排除由搜索层(@deepseek-ai/dsh-tool-fs-search)始终开启地完成,与该插件的配置无关。

保护范围

类别匹配规则示例
环境变量文件路径段以 .env 开头.env、.env.local
Git 元数据路径段等于 .git.git/config
SSH 私钥文件名为 id_rsa / id_ed25519(可带点号后缀)id_rsa、id_ed25519.pub
证书文件名以 .pem 结尾server.pem
SSH 目录路径段等于 .ssh.ssh/id_ed25519
  • write / edit 检查 file_path、str_replace_editor 检查 path,统一按路径段匹配(先归一化反斜杠)。
  • read 检查 file_path,但只对密钥类文件(SSH 私钥、.pem 证书)触发询问;读取 .env / .git / .ssh/config 等保持放行——把环境文件载入工具属常见合法操作,且这些路径始终被搜索层从 glob/grep 结果中排除。
  • bash 对命令文本扫描同一集合:命令里出现 .env、.git(作为独立路径名,覆盖 cp -r .git、tar czf x .git、--git-dir=.git 这类无尾斜杠写法)、id_rsa、id_ed25519、*.pem、.ssh/ 等即触发询问。普通 git 命令(git clone / push / pull / branch / fetch …)因不出现 .git 路径名而不受影响;foo.git、.gitignore、.github、.gitx 也不匹配。
  • 其余工具原样放行。

安装

本包符合 DSH bundle 规范:package.json 声明 dsh.bundle.patch,指向随包发布的 cordis.patch.yml(注册 id: sensitive-paths)。dsh plugin 检测到 dsh.bundle 后会自动把它追加进该 profile 的 dsh.profile.bundles 层列表,重启该 profile(如 dsh web)后生效。

从 GitHub 安装

dsh plugin --profile web add github:TARS-snail/dsh-guard-sensitive-paths

从本地目录安装(开发/自用)

dsh plugin --profile web add /path/to/dsh-guard-sensitive-paths

验证

dsh --profile web --dump-config
# 生效的配置里应能看到 id 为 sensitive-paths 的一行(name: dsh-guard-sensitive-paths)

配置

默认零配置即开启。在 profile 的 cordis.patch.yml(用户层)中按 id 覆盖:

- id: sensitive-paths
  name: dsh-guard-sensitive-paths
  config:
    sensitivePaths: false
字段类型默认说明
sensitivePathsbooleantrue为 false 时守卫整体关闭:不注册任何监听器,成为空操作

工作原理

  • 守卫以 PREPEND 方式注册在监听链最前,先于任何权限授予等其它 tools/pre-execute 监听执行;命中敏感目标(含读取密钥材料)即返回 ask 决策,理由为「<tool> targets the sensitive path <target> (<category>); approval is required because it matches the sensitive-path policy」。<category> 取 environment-file、git-metadata、key-material、certificate、ssh-directory,仅用于让审批自解释、便于审计,不改变是否拦截。
  • 未命中的调用经 next() 原样委托,不产生任何延迟或副作用。
  • 写/改类工具按完整敏感集(.env、.git、.ssh、SSH 私钥、.pem)匹配,read 按密钥子集(SSH 私钥、.pem)匹配,两者共享同一套 basename 规则。
  • 导出的 SENSITIVE_PATH_GLOBS 常量与搜索层的排除 globs 互为镜像,两处各自独立实现、互不依赖(守卫匹配用分段规则,搜索层匹配用 glob 排除 + 路径二次过滤)。

威胁模型边界(不覆盖什么)

本插件是工具调用面的路径审批策略,只观察 write / edit / str_replace_editor / read / bash 这些工具的参数。以下都不在其射程内:

  • 宿主级 sidecar / 运行时自身的文件与网络行为:不经过工具循环的读取、打包、加密、上传,本插件完全看不到,也不会产生任何 ask。2026-09-18 的智谱 ZCode「静默上传整仓 .git 历史」事件即属此类——其 313MB 归档中 .git 占 86.6%(.git/lfs 56.8%、.git/objects 29.6%、.git/logs 0.2%),打包上传由宿主进程在工具循环之外完成,任何工具面策略都无法拦截。
  • 网络出口:文件 sandbox 管文件访问,不管主机进程把数据发往哪里;整仓外传需要出口控制,不是路径正则能解决的。
  • 模型推理端点:按设计,任务相关的上下文仍会发送给 LLM provider,与本插件无关。

因此本插件能保证的是「工具调用面上命中的敏感目标一定会先变成一次失败关闭的审批」,不能保证「装了它就不会被偷传」。要覆盖上述面,需要文件 sandbox、进程隔离与网络出口策略。ZCode 事件同时印证了 .git 是最高价值目标,本插件据此把 .git 的 bash 检测从「必须带尾斜杠」修正为「独立路径名」,覆盖 cp -r .git、tar … .git 这类历史外传形态;.git/config 的读取仍按现状放行(其凭据/内网主机名维度的收紧属后续项)。

开发与维护

  • src/ 为源(仅类型导入 cordis / dsh-tools;运行时仅依赖 schemastery 的 z,由宿主提供)。
  • lib/ 为构建产物(tsc 输出 + 打包入口),随包发布;修改 src/ 后需重新构建并同步 lib/。
  • 测试在 tests/sensitive-paths.spec.ts(isSensitivePath 单测 + 真实组合下 pre-execute 返回 ask 的行为测试)。

许可证

MIT