Scans a workspace for plaintext API keys, flags files inside git repositories, and reports findings masked so no full secret is ever printed.
Install
# from a prebuilt release tarball
dsh plugin --profile web add "https://github.com/474885697-alt/dsh-kit/releases/download/v0.1.0/dsh-secret-audit-0.1.0.tgz"
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:474885697-alt/dsh-kit#path:/plugins/dsh-secret-audit
Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).
README
This plugin publishes its README in Chinese only.
扫本地工作区的明文 API Key,输出永远打码。
版本 0.1.0 | 包名 dsh-secret-audit | 仅宿主侧(无客户端代码)| MIT
它解决什么问题
Key 常常散落在配置文件、脚本、笔记里,自己都忘了哪份带明文。
识别 DeepSeek / OpenAI / GitHub / AWS / Bearer / 赋值语句,并额外识别 ai-configs.json 这类「Key 共享」配置,汇总每个 Key 的 shareMode。
结果只保留前 6 后 4,聊天记录和日志里都不会出现完整 Key。
安装
plugin_manager install_bundle target="C:/Users/03/Documents/deepseek-harness/default-workspace/plugins/dsh-secret-audit"
装完即可用,工具会出现在工具列表里;用 plugin_health 可以体检清单。要卸载就用插件页的开关。
工具
| 工具 | 用途 | 参数(* 表示必填,? 表示可选) |
|---|---|---|
secret_scan |
扫描工作区里的明文 API Key 与 Key 共享配置(结果始终打码) | roots? string |
用法示例
示例:扫默认范围
secret_scan()
# → { scanned: 15, findings: [{ file, line, kind: "deepseek", masked: "sk-a1c***37cd" }], sharedConfigs: [...] }
示例:只扫某个目录
secret_scan(roots="C:/proj/data,C:/proj/config")
HTTP 路由(仅本机 loopback)
| 方法 | 路径 | 说明 |
|---|---|---|
| GET | /api/dsh-secret-audit/scan |
?roots=a,b,扫描明文密钥(结果始终打码) |
配置
- 无需配置;默认根目录 = 当前工作目录 +
~/.dsh。
数据存在哪
- 不落盘,只在返回里给路径/行号/打码值。
安全边界
- 跳过
node_modules、.git、dist;只读 ≤2 MB 的文本文件。 - 输出始终打码,不提供「显示明文」的开关。
- 在 git 仓库内的命中会标记
gitExposed(提醒你它可能已经被提交)。
已知行为
- 16 进制长串会被当成
assigned类命中,可能包含非密钥的哈希值,需要人工判断。
验收
- 扫
data目录 15 个文件命中 13 处,全部打码;两个 Key 的shareMode均为closed。
宿主兼容性
- Web / 桌面宿主:HTTP 路由与工具都可用。
- headless / CLI(没有 webServer 服务):路由自动跳过,工具照常注册。
Links
More in this category
kenryu42/cc-safety-net★ 1900
Pre-execution guard that blocks destructive Git and filesystem commands and access to secrets such as SSH keys and .env files before a tool call runs.
ADWMC/helm-d#helmd★ 984
Security-analysis plugin for DeepSeek Harness: 33 tools spanning six security domains, evidence/reporting and toolbox, plus the case lifecycle, routing and tool ledger; a session-bound case workflow with an evidence chain, E-id validation and reproducible findings; 362 on-demand references; three hot-swappable persona profiles; and a four-tab workbench (armor / case / intercept / about) with case-state recovery after context compaction.
toby-bridges/api-relay-audit★ 904
Runs local security audits of AI API relays and LLM proxies from DeepSeek Harness, producing Markdown reports for prompt injection, model substitution signals, tool-call rewriting, error leakage, stream integrity, and profile-gated Web3 risks.
SeaOf0/dsh-redteam-model★ 807
Authorized-security DSH collection: nine work modes (redteam coordinator, pentest, code audit, binary analysis, attack-defense, AV evasion, incident response, cloud security, CTF solving) and fifteen runtime plugins, managed from a settings page with one-click deploy, install, update and uninstall.
howmp/dsh-pentest★ 616
Authorized pentest mode for DeepSeek Harness — exploration chain, assets and findings with a Web view.
PerryLink/dsh-auto-review★ 244
Second-model auto-review on the approval answerer chain: a read-only reviewer subagent returns structured allow/deny verdicts with reasons, fail-closed by default.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.