DeepSeek Harness Plugin Hub

发布与管理完整 Harness Profiles,发现适合你的插件。

探索

插件目录环境预设文档中心动态

社区

发布插件联系我们报告问题

相关链接

Plugin Hub GitHubDeepSeek Harness 官方项目系统状态隐私说明
© 2026 DeepSeek Harness Plugin HubPowered byPaxTech

独立、非官方社区项目,与 DeepSeek 官方无隶属、授权或背书关系。

DeepSeek Harness Plugin Hub
ProfilesPlugins分类动态文档登录管理 Profiles
ProfilesPlugins分类动态文档登录
← Plugins

dsh-secret-scrub

Secret Scrub

秘密清除防护插件:在会话日志持久化和模型请求之前,使用不可逆正则表达式对秘密信息进行脱敏

插件会安装到这里;不确定时保持 web。

npx -y @deepseek-ai/dsh plugin --profile web add dsh-secret-scrub@0.1.2
README兼容性版本

兼容性与来源证明

Secret Scrub 以 dsh-secret-scrub 发布,当前版本为 0.1.2。Plugin Hub 会校验它的 manifest,并保存精确安装来源,便于复现安装结果。

DSH 兼容范围
*
运行环境
any
发布来源
npm
Registry 更新时间
2026/11/4

版本

0.1.2stable
2026/10/9
0.1.1stable
2026/9/2
0.1.0stable
2026/9/1

相关插件

正在加载相关插件…

最新版
0.1.2
DSH
*
HMR
重启进程
Tree shaking
未声明可安全裁剪
解包体积
68.7 kB
文件数
17
Surface
any
许可证
MIT
发布源
npm
GitHub
★ 2
周下载
311
安全扫描
✓ v0.1.2 扫描通过
最近提交
2026/10/9
查看源码 ↗项目主页 ↗
README Badge

点击下方 Badge 复制 Markdown,粘贴到 README 即可。

这是你的 Plugin?认领权益 · 优先安全扫描

验证 package.json 声明的 GitHub 仓库,即可管理这个公开页面。认领后,Hub 会优先安排当前版本的安全扫描,并在通过后公开展示结果。

认领这个 Plugin →
报告问题

相关插件

继续浏览 security-access 分类下经过校验的插件。

Experimental Auto Review@deepseek-ai/dsh-experimental-auto-review针对每个工具的 LLM 授权审查,适用于 DeepSeek Harness Auto 权限预设Cc Safety Netcc-safety-net编码代理 CLI 钩子——阻止破坏性命令和访问机密文件Doctor@linxin666/dsh-doctorDSH 配置档案的事务性救援模式,配备受监督的启动器、隔离的恢复容器、确定性修复、健康监控以及本地 Web 恢复控制台Pocketdsh-pocket把 DeepSeek Harness 装进你的口袋:一个包、一个设置页,手机扫码即同步访问电脑上的 DSH(局域网 + 公网,实时同屏)。

README

dsh-secret-scrub

English | 中文 | Changelog

Irreversible secret-scrubbing guard plugin, extracted from the user-sensitive-information protection strategy of the kaya-ai-terminal project and open-sourced standalone (Mainland China site: https://www.yunhouai.com; international site: https://www.yunhou.ai). It rewrites text on its way to the session log and the model: when a configured rule matches a secret-shaped fragment — an access key, a bearer token, a private key block — the fragment is replaced irreversibly with a [REDACTED:<category>] placeholder, so the durable log and the model request carry only the placeholder at the covered points.

Install

npm install dsh-secret-scrub

Runtime dependencies are @deepseek-ai/cordis (peer) and @deepseek-ai/schemastery. The @deepseek-ai/dsh-* peer packages are type-only and optional.

Use with dsh

This package declares dsh.bundle.patch, so installation is a single command — the plugin activates with the default balanced scrub level and needs no credentials:

# 1. Install the dsh CLI
npm i -g @deepseek-ai/dsh

# 2. Install this plugin into the target profile (headless shown as an example)
dsh plugin --profile headless add dsh-secret-scrub
#    To test local changes before publishing, use the tarball from `npm pack`:
#    dsh plugin --profile headless add /path/to/dsh-secret-scrub-0.1.2.tgz

# 3. Restart the profile, then run a task that contains secrets — they will be redacted before reaching the model/session log
dsh --profile headless "echo AWS AKIAIOSFODNN7EXAMPLE"

dsh plugin add applies the cordis.patch.yml shipped inside this package (mounting the plugin at balanced level). To change the level or add custom rules, override the same id in the profile patch layer ~/.dsh/profiles/headless/cordis.patch.yml:

- id: secret-scrub
  config:
    level: aggressive
    extra:
      - category: internal-token
        pattern: 'internal-[0-9]{4}'

Use as a standalone Cordis plugin

If you are not using dsh, you can also mount the plugin directly on a Cordis context:

import { Context } from '@deepseek-ai/cordis'
import * as SecretScrub from 'dsh-secret-scrub'

const ctx = new Context()
await ctx.plugin(SecretScrub, {
  level: 'aggressive',               // scrub depth: minimal | balanced (default) | aggressive
  disabled: ['env-var-secret'],      // tier 1/2 built-in categories only — tier 0 cannot be disabled
  extra: [
    { category: 'internal-token', pattern: 'internal-[0-9]{4}' },
  ],
})

The plugin mounts three prepended waterfall listeners that delegate first and then scrub whatever the rest of the chain admitted:

  • agent/pre-step rewrites each step's admitted user messages before they reach the session log and the model request. User messages are scrubbed at inputLevel — aggressive by default, regardless of level — so pasted PII and credentials are redacted with the full rule table even when tool output stays quieter.
  • tools/post-execute rewrites an accepted tool result's plain content.
  • tools/ptc-dispatch-log rewrites the durable tool/code-dispatch copy of a run_code sub-dispatch.
FieldDefaultMeaning
levelbalancedScrub depth for tool output: minimal runs tier 0 only, balanced adds tier 1, aggressive adds tier 2 — PII and the high-entropy fallback
inputLevelaggressiveScrub depth for admitted user messages at agent/pre-step, independent of level
disabled[]Built-in tier 1/2 categories to turn off; a tier-0 core rule cannot be disabled and fails the load
extra[]Deployment-added rules, active at every level: a unique lowercase-dashed category plus a pattern compiled with new RegExp(pattern, 'g')

Invalid configuration fails at startup with a clear error — an unknown or tier-0 disabled category, an extra pattern that does not compile, a category id that cannot appear in the placeholder, or a duplicate category — never a silent fall-back.

Built-in rule tiers

level selects the highest active tier. Tiers 0–1 are prefix-anchored and tier 2 matches shapes (the patterns live in src/rules.ts):

TierActive atCategories
0 — core secretsevery level; cannot be disabledprivate-key, private-key-truncated (unclosed/orphaned PEM armor), api-key (generic apikey assignments), aws-access-key, github-token, google-api-key, deepseek-key, openai-key, anthropic-key, gitlab-pat, rollbar-token, stripe-key, slack-token, slack-signing-secret, slack-webhook-url, npm-token, pypi-token, sendgrid-key, twilio-key, digitalocean-token, shopify-token, telegram-bot-token, tavily-key, age-secret-key, docker-pat, notion-token, supabase-token, linear-api-key, generic-sk-key (sk-/sk_ fallback), url-credentials (connection-URL authority), url-access-token (OAuth callback token), generic-bearer (bearer tokens and JWTs)
1 — assignment and cloud-provider keysbalanced and upenv-var-secret (uppercase assignments whose name carries KEY/SECRET/TOKEN/PASSWORD as a whole _-delimited segment), azure-storage-key, alibaba-access-key, key-assignment (the same assignment shape in any letter case, value-filtered)
2 — PII and the high-entropy fallbackaggressive onlyemail, phone-cn, phone-intl, id-cn, credit-card (Luhn-checked), ssn-us, high-entropy

Use the engine directly

The pure scrubbing engine is exported from dsh-secret-scrub/rules and has no Cordis dependency:

import { BUILTIN_RULES, scrubText } from 'dsh-secret-scrub/rules'

const { text, redactions } = scrubText('key: AKIAIOSFODNN7EXAMPLE', BUILTIN_RULES)
// text       → 'key: [REDACTED:aws-access-key]'
// redactions → { 'aws-access-key': 1 }

Known limitations

Redaction is one-way and regex-based. Unprefixed keys, secrets split across text blocks, and encoded forms (base64-wrapped, URL-escaped) evade the conservative rule shapes by design. The tier-2 rules match shapes, not proven secrets, so they trade false positives for coverage — an email address in a task instruction is redacted as if it were a secret, and hash-like text (git SHAs, SHA-256 digests) matches the high-entropy fallback at aggressive. Do not rely on this guard as the only control against credential leaks.

Development

npm install
npm run typecheck
npm test
npm run build

License

MIT — Copyright (c) 2026 jkt-check