dsh-text-guard

DSH PLUGIN安全与权限

仓库 7771sd/dsh-text-guard

安全与权限 未标注验证等级 安全审查:未标注 可信度:未标注 可安装插件

dsh-text-guard 是一款 DeepSeek Harness 插件,在内容写入会话日志前中和指定码点序列,避免工具结果或用户消息触发 API 400 拒绝导致整个会话失效。

一句话选型结论

按资料字段整理

dsh-text-guard 是安全与权限类的 DSH 可安装插件,未做沙盒验证,暂无安全审查结论,列出 5 项功能,没有现成安装命令,需要按仓库 README 接入。验证通过不等于安全:插件会读写文件、执行命令或联网,装前先到仓库确认它做了什么;涉及密钥或系统权限的,建议先在隔离环境试装。

分类安全与权限 收录类型可安装插件 验证等级未标注验证等级 安全审查未标注
验证等级 UNKNOWN 未标注验证等级
GitHub 星标 0 复刻 0 · 未关闭 issue 0
最近更新 2026-10-05 创建于 2026-10-05
README 4.8 KB 正文体量,越大说明说明书写得越细

安装

可安装插件
在 DSH 里执行,装完用 dsh plugin list 确认已挂上;标了 L4 / L5 的命令已在沙盒里真实跑通
  1. 1
    确认版本与运行环境

    仓库没有标注兼容版本与 Node.js 要求,先确认你的 DSH 版本能装,再继续。

  2. 2
    执行安装命令

    在 DSH 里执行上面的命令;多包仓库要注意区分具体子包名,别装错包。

  3. 3
    确认已挂载

    用 dsh plugin list 查看列表里是否出现这个插件,出现即挂载成功。

  4. 4
    试跑并检查权限

    加载后跑一个最小用例,确认它能正常工作;同时看它申请了哪些文件、命令或网络权限。

兼容 DSH 版本未标注版本不匹配时安装会报错
Node.js 要求未标注来自仓库 package.json 的 engines 字段
前置依赖无需要同时安装的同级依赖
npm 包名未发布到 npm可用 npm view 查看包信息

能做什么

5 项功能
字段来自项目仓库与公开索引,中文说明由本站标注

dsh-text-guard:为 DeepSeek Harness 拦截会话日志里的码点序列

  • 写入日志前中和敏感码点序列
  • 覆盖工具结果与 run_code 派发日志
  • 拦截进入步骤的用户消息
  • 支持 regional-pairs 与 exact 模式
  • 无匹配内容原样透传不改引用

上游标签

deepseek-harnessdsh-plugin

验证等级与安全审查

未标注验证等级
自动化流程结论,不是人工审核
验证等级未标注验证等级上游未给出验证结论,安装前请自行确认
安全审查未标注静态分析结论,未标注不代表已通过审查
仓库健康度未标注按仓库活跃度与最近更新时间给出
可信度未标注综合仓库活跃度与验证结果

选择建议

装之前先看这几条
按条目字段给出的判断,不替你决定用不用

值得选的地方

  • 列出了 5 项功能,能直接看出它解决什么问题。

先想清楚的地方

  • 安全审查还没结论,装之前先看仓库改了什么、要什么权限。
  • 没有现成安装命令,要按仓库 README 手动接入。
  • 验证通过不等于安全:插件会读写文件、执行命令或联网,装前先到仓库确认它做了什么。

更适合

  • 需要在安全与权限场景里给 DSH 补能力的人。
  • 能接受在本地装依赖、愿意自己确认权限的人。

不太适合

  • 只使用 DSH 官方内置能力、不接受第三方插件的人。

同类对比

6 个同类
同分类里挑最接近的几条,字段以各自详情页为准
插件验证等级安全审查星标兼容版本安装命令
dsh-text-guard当前 未做沙盒验证 未标注 0 未标注 无
dsh-infinite-gen-4 未做沙盒验证 未标注 1,611 未标注 无
cc-safety-net 未做沙盒验证 未标注 1,591 未标注 无
dsh-wallpaper-engine L5 · 运行验证通过 低风险 1,018 0.2.0-rc.2 等 10 个 有
api-relay-audit L5 · 运行验证通过 低风险 875 0.2.0-rc.2 等 10 个 有
hol-guard L4 · 沙盒安装通过 不在扫描口径 828 未标注 有

仓库档案

安全与权限
字段来自项目仓库与公开索引,中文说明由本站标注
作者 / 维护方7771sd仓库 dsh-text-guard · 默认分支 main
分类安全与权限admin-security
收录类型可安装插件声明了 dsh.bundle、可用 dsh plugin add 安装的条目
开发语言JavaScript仓库主语言
许可证MIT商用或二次分发前请确认条款原文
星标 / 复刻 / issue0 / 0 / 0收录时的数值,非实时
创建 / 更新2026-10-05 · 2026-10-05最后推送 2026-10-05
本站收录2026-10-06首次进入本站目录的时间

README 全文

4.8 KB
作者原文,中文版优先;只做安全转义,不改内容

dsh-text-guard

A DeepSeek Harness plugin that neutralizes configured code-point sequences in tool results and in the messages entering a step, before the session log records them.

中文说明

The problem it solves

The official DeepSeek API rejects a whole request with 400 INVALID_REQUEST (Content Exists Risk) when it carries certain text. For the sequence observed in practice — the regional-indicator pair U+1F1F9 followed by U+1F1FC, which composes one flag emoji — character-level bisection showed the pair rejects the request while either character alone, the reversed pair, and other combinations are accepted.

Because every turn resends the stored history, a sequence that reaches the session log rejects every following turn of that session. The session becomes unusable: retrying does not help, restarting the app does not help, and the only way out is a new session. The usual way such a sequence arrives is not the user typing it, but fetched pages, file contents, or command output passing through a tool result.

What it does

It rewrites the configured sequences where content enters the log:

Hook Content covered
tools/post-execute an accepted tool result — web fetches, file reads, command output, subagent and workflow results
tools/ptc-dispatch-log the durable log copy of one run_code sub-dispatch outcome
agent/pre-step the messages entering the step, including text a user pasted

Content without a match passes through untouched and keeps its original object identity, so an unaffected dispatch costs one regular-expression probe. The rewrite happens before the append, which is what keeps Session replay, fork, and every later request consistent — and it never puts the sequence back, because the replacement is pure ASCII.

Install

With the Harness CLI:

dsh plugin --profile  add github:7771sd/dsh-text-guard

Or through the Plugin Manager's install field, using the same spec. The plugin has no dependencies and no build step.

Configuration

The shipped bundle patch mounts it with the wide mode. Every field can be overridden in your profile's cordis.patch.yml:

- id: text-guard
config:
mode: exact
sequences: [[0x1F1F9, 0x1F1FC]]
replacement: '[flag U+{codepoints}]'
toolResults: true
userMessages: true
log: true
Field Default Meaning
mode regional-pairs regional-pairs matches any two consecutive regional indicators (U+1F1E6–U+1F1FF); exact matches the configured sequences only.
sequences [[0x1F1F9, 0x1F1FC]] Code-point sequences mode: exact neutralizes; each entry is matched consecutively.
replacement [flag U+{codepoints}] Replacement template; every {codepoints} becomes the matched code points, for example U+1F1F9 U+1F1FC.
toolResults true Neutralize accepted tool results and run_code dispatch logs.
userMessages true Neutralize the messages entering a step.
log true Log one summary line per affected dispatch, naming the count and never the matched text.

Configuration changes are not hot: re-mount the bundle (disable and enable it) after editing the patch.

Why it hooks the log entry points

dsh-agent-loop deep-freezes request messages and documents that agent/request listeners cannot change request messages; the Harness rule is that everything the model sees must be reconstructable from the session log. A rewrite after the append would break that reconstruction, so the neutralizer runs where content enters the log instead of at the wire.

Verified

  • node test/text-guard.test.mjs — nine offline checks: content and value-form rewriting, block decisions passing through, a clean result returning the identical reference, message rewriting that preserves identity and startsRequestSeries, no mutation of inputs, both surfaces disabling cleanly, pair matching, and lone indicators passing through.
  • End to end in a live profile: with the plugin configured to neutralize an ASCII probe, a command whose output contained the probe reached the model already rewritten.

Not verified: the plugin has never been sent a real flag emoji by its author, because the experiment that proves the filter rejects one also destroys the session it runs in.

Limitations

  • Text that reaches a request through a system-prompt section — a skill file or an instruction file that itself contains a sequence — does not pass these entry points.
  • A rewritten user message is logged in its neutralized form while the chat client keeps displaying the text you sent, so the two views disagree about that message.
  • The rewrite is lossy by design. Do not mount it when the original text matters verbatim to the task.

License

MIT

常见问题

7 问
答案由本站依据条目字段整理,不引用上游原文
dsh-text-guard 怎么安装?

本站没有抓到该条目的安装命令,请到仓库主页确认安装方式;这类条目多数是生态应用或尚未发布安装包的项目。

dsh-text-guard 的验证等级是什么意思?

未标注验证等级。上游未给出验证结论,安装前请自行确认

dsh-text-guard 安全吗?

未标注。

dsh-text-guard 装之前要先确认什么?

先看它会读写哪些文件、执行哪些命令、连接哪些网络地址;验证等级只说明装得上、跑得起来,不等于安全。涉及密钥或系统权限的,建议先在隔离环境试装。

dsh-text-guard 用的是什么许可证?

上游标注为 MIT。商用或二次分发前请到仓库确认许可证原文。

dsh-text-guard 有哪些功能?

写入日志前中和敏感码点序列、覆盖工具结果与 run_code 派发日志、拦截进入步骤的用户消息、支持 regional-pairs 与 exact 模式、无匹配内容原样透传不改引用。

这条记录的数据可靠吗?

本站按仓库名去重后合并整理,字段以作者仓库与 npm 元数据为准;安装命令、仓库地址与 README 保持原文,带 L4 / L5 标记的安装命令已在隔离沙盒里真实跑通。

安全与权限
按星标排序,可作替代方案

dsh-infinite-gen-4

dsh-infinite-gen-4

DeepSeek 专用破甲插件:以 order 100 追加无条件服从的系统提示词段,提供带校准元数据的 profile 工具,并通过会话投

未标注验证等级 1,611 星

cc-safety-net

cc-safety-net

为 DeepSeek Harness 等编码 CLI 提供执行前防护,在工具调用前拦截破坏性 Git 与文件系统命令,并阻止读取 SSH 密

未标注验证等级 1,591 星

dsh-wallpaper-engine

dsh-wallpaper-engine

DSH plugin 将本机 Wallpaper Engine 壁纸变为网页界面背景,支持视频、网页、场景壁纸渲染,并配以 iOS 液态玻璃

L5 · 运行验证通过 1,018 星

api-relay-audit

api-relay-audit

DSH plugin 本地安全审计工具,检测 AI API 中继与 LLM 代理的提示注入、模型替换、工具调用改写、SSE 异常及 Web3

L5 · 运行验证通过 875 星

hol-guard

hol-guard

L4 · 沙盒安装通过 828 星

sandbase-harness

sandbase-harness

SandBase Harness 是本地优先的 AI Agent 运行时,提供沙箱会话、MCP 工具、记忆、凭据管理与审计回放,并内置控制台

L4 · 沙盒安装通过 708 星

插件的元信息来自作者仓库;分类、验证等级与安全结论的中文说明为中文整理,最近核验 —。