DSH HUB
HomePlugin StorePlugin PacksCommunityRankingsResourcesPublish Guide
Plugin source
Back to catalog

yyjsdsg /

yyjsdsg/dsh-redact

Verified

Redact secrets, local paths, private IPs and personal data before you share or commit session text.

★ 0 Stars0 Forks0 IssuesN/A Community rating0 Confirmed installs
View on GitHub
READMESource: main@bd927c91

dsh-redact

把会话、总结、日志发给别人或提交进 git 之前,先把里面的敏感信息打码。

Mask secrets, local paths, private IPs and personal data before you share session text.


它会做什么

左边粘贴原文,右边实时出打码结果,命中的片段标红。

默认打码这些:

类型 例子 变成
API 密钥 sk-abcdefg... sk-***
GitHub 令牌 ghp_xxxx... <github-token>
AWS 密钥 AKIA... AKIA***
Bearer 令牌 Bearer eyJh... Bearer <token>
密码赋值 password=hunter2 password=***
本机路径 C:\Users\张三\... C:\Users\<user>\...
本机路径(Linux) /home/alice/... /home/<user>/...
内网 IP 192.168.1.10 <内网IP>
邮箱 a@b.com <邮箱>
手机号 13800138000 <手机号>
身份证 18 位 <身份证>

银行卡号默认关(16-19 位纯数字容易误伤订单号),需要时在「规则」里打开。

公网 IP、普通数字、正常中英文都不动。

为什么需要它

会话里经常带着这些:本机绝对路径、测试用的密钥、内网地址。你把这些内容总结进 .md、提交进 git、或者贴进 issue,等于把它们公开了。

这个插件在发出之前做一次打码,你还能看到打了什么、能逐条核对。

使用

  1. 左侧边栏点盾牌图标
  2. 粘贴内容,或者「打开文件」选一个 .md / .txt / .log
  3. 右边看结果,红色的是被打掉的部分
  4. 「明细」能看到每个命中:原文片段 → 替换成了什么
  5. 「复制」或「下载」拿走结果

规则可以逐条开关,规则条数会显示在顶栏。

安装

dsh plugin --profile <profile> add github:<owner>/dsh-redact

装完重启 DeepSeek Harness。

测试

npm test

规则是纯函数,测试覆盖了每一类命中和「不该误伤」的情况。

边界

  • 跑在本机,内容不出机器,不调用任何模型
  • 单次最多 40 万字符(超出部分不处理,界面会提示)
  • 规则是启发式的:它能减少泄漏,但不能保证 100% 拦住。发之前自己扫一眼仍然是必要的

License

MIT

—/ 5

No ratings yet

Verified DSH bundle

Commit bd927c91a52f

Community comments

No comments yet. Be the first to write one.

DSH HUB

A community index for DSH plugins. Not an official GitHub or DeepSeek AI product.

CommunityResourcesAPIAbout