dsh-redact
Manifest validMask secrets, local paths, private IPs, emails and phone numbers in session text before you share or commit it.
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,等于把它们公开了。
这个插件在发出之前做一次打码,你还能看到打了什么、能逐条核对。
使用
- 左侧边栏点盾牌图标
- 粘贴内容,或者「打开文件」选一个
.md/.txt/.log - 右边看结果,红色的是被打掉的部分
- 「明细」能看到每个命中:原文片段 → 替换成了什么
- 「复制」或「下载」拿走结果
规则可以逐条开关,规则条数会显示在顶栏。
安装
dsh plugin --profile <profile> add github:<owner>/dsh-redact
装完重启 DeepSeek Harness。
测试
npm test
规则是纯函数,测试覆盖了每一类命中和「不该误伤」的情况。
边界
- 跑在本机,内容不出机器,不调用任何模型
- 单次最多 40 万字符(超出部分不处理,界面会提示)
- 规则是启发式的:它能减少泄漏,但不能保证 100% 拦住。发之前自己扫一眼仍然是必要的
License
MIT
Comments
Loading…
Similar plugins
by uckkk
文本脱敏:邮箱/手机号/身份证/银行卡/IP/密钥掩码,分享前保护隐私
★ 0
MIT
JavaScript
Aug 19, 2026
dsh plugin --profile web add dsh-text-maskLocal-first privacy shield for DeepSeek Harness: keep plaintext local, send only placeholders to the model, restore real values in the transcript.
★ 0
MIT
dsh plugin --profile web add dsh-privacy-shieldby 030611
Redacts supported secret patterns from the `session-telemetry/record` export copy before configured telemetry backends receive it.
★ 2
↓ 201/wk
MIT
TypeScript
Aug 14, 2026
dsh plugin --profile web add dsh-telemetry-redactorby zljr
Share the current session over the LAN as a read-only, token-guarded HTML snapshot with session stats and Markdown rendering.
★ 3
↓ 117/wk
MIT
TypeScript
Aug 16, 2026
dsh plugin --profile web add @zljr/dsh-shareby yuloop
Hands secrets and PII to the agent without them entering its context, with checksum-validated extraction and masked content classification.
★ 0
MIT
JavaScript
Oct 28, 2026
dsh plugin --profile web add dsh-secret-vaultShare a selected chat segment as Markdown, HTML, TXT, or PNG; Session-header dialog with range or multi-select, redaction, tool calls, and subagent conversations, plus the /share command.
★ 0
dsh plugin --profile web add dsh-session-chat-share