shaoshi20/dshscan
DShScan - 灵感来源于NVIDIA SkillSpector的DSH插件安全扫描器
Project Overview项目介绍
DShScan is a native security plugin built exclusively for the DeepSeek Harness (DSH) ecosystem, designed to scan the source code of DSH plugins for supply chain and security risks. It combines static rule-based offline scanning with optional LLM-powered semantic scanning, and ships with pre-built rules tailored for DSH-specific attack surfaces, such as plugin tree injection and profile tampering. It can scan multiple input types, including DSH plugin names from the dshbase directory, GitHub repository URLs, local directories, zip packages, and Markdown files. Users can install it directly into DSH with the command dsh plugin add @shaoshi/dshscan.
After scanning a target, DShScan outputs a structured JSON report that includes a calculated risk score, severity rating, an installation recommendation, and a full list of risk findings with evidence and fix suggestions. It also supports generating standalone human-readable HTML reports, and can run bulk scans across the entire dshbase plugin directory to audit all available DSH plugins. Users can spin up a local web dashboard with the --serve command to view historical scan data, risk trends, and severity distribution charts. This tool is primarily built for DSH plugin developers, dshbase maintainers, and security-conscious DSH end users.
DShScan is written in TypeScript and built on Node.js, and it is released under the open-source MIT license, so it is free to use and modify. Static scanning works fully offline without any network connection, though semantic scanning requires a valid API key for an OpenAI-compatible LLM endpoint. It includes a built-in benchmark dataset of malicious and benign samples, supports custom rules and scan policies, and can output scan logs in JSONL format. A daily GitHub Actions workflow automatically runs bulk scans on the full dshbase plugin directory to detect new risks.
DShScan 是专为 DeepSeek Harness (DSH) 开发的原生安全扫描插件,用于对 DSH 生态内的插件源码进行静态规则与可选 LLM 语义的双通道安全扫描。它内置了 DSH 特有的攻击面检测规则,集成了 npm 依赖审计能力,支持多种输入源,包括插件名、GitHub 仓库地址、本地目录、压缩包与 Markdown 文件。用户可通过 dsh plugin add @shaoshi/dshscan 直接在 DSH 中安装使用。
它的典型工作流是根据输入目标拉取源码,完成扫描后输出带严重等级、风险评分和风险发现详情的 JSON 报告,也支持输出可视化 HTML 报告,还支持批量扫描 dshbase 全量插件目录,并且提供了本地 Web 可视化面板,可查看历史扫描数据与风险分布趋势。它主要面向 DSH 插件开发者、dshbase 插件市场维护者和关注 DSH 生态安全的终端用户。
DShScan 基于 Node.js 开发,采用 MIT 许可证开源,完全免费使用。静态扫描可离线完成,无需联网,语义扫描需要配置 OpenAI 兼容接口的 API 密钥。它内置了恶意/良性样本的基准测试集,支持自定义规则和扫描策略,也支持将扫描结果输出为审计日志。每日通过 GitHub Actions 自动批量巡检 dshbase 全量插件。
请帮我安装这个 DSH 插件。安装前先完成【兼容性检查 + 安全性检查】,检查通过再动手。
插件:dshscan(shaoshi20/dshscan)
仓库:https://github.com/shaoshi20/dshscan
本站详情页:https://www.yhbd.top/plugins/shaoshi20-dshscan/
本站登记:类型 plugin · 归类 原生 DSH 插件 · 许可证 MIT · ⭐ 9 · 最近提交 2026-08-21 · 主语言 TypeScript
按下面顺序执行,每步先把结论告诉我,再进入下一步:
【1 兼容性检查】
① 我这边:DSH 版本、Node 版本、操作系统、当前 profile(web / desktop)。
② 读它的 README、package.json、插件 manifest,列出它要求的 DSH 版本 / Node 版本 / 操作系统 / 外部依赖 / 需要另外先装的运行时。
③ 逐条比对,结论只写「满足 / 不满足 / 未知」三种;不满足的给出可行替代方案。
④ 检查是否和我已装的插件冲突:命令名重复、skill / tool 重名、端口占用、重复注册的 MCP server。
【2 安全性检查】
① 仓库可信度:和上面「本站登记」是否一致;star / fork 数、创建时间、最近提交,是否归档或长期停更。
② 安装脚本:逐行看 package.json 的 preinstall / install / postinstall,以及 install.sh、setup.ps1 之类脚本。出现 curl|bash、下载后直接执行、混淆代码、访问与插件功能无关的域名,立刻停下来告诉我,不要继续装。
③ 依赖:列出新增依赖,标出无人维护、或与知名包拼写近似的可疑包(typosquatting)。
④ 权限与副作用:它会读写哪些目录、访问哪些域名、需要哪些 DSH 权限(filesystem / network / shell / clipboard 等),以及怎么卸载和回滚。
⑤ 如果它要求 sudo / 管理员权限,或权限明显超出功能所需,先停下来问我。
【3 安装】
上面两步没有「不满足」和「高危项」时才执行;用官方推荐方式安装,不要自行提权。
【4 汇报】
用表格输出:检查项 / 结论 / 依据 / 是否需要我决策。拿不准的一律写「未知」并说明要我怎么确认——不要猜,也不要替我决定。
Send this message to DSH in your current session: it verifies compatibility and security first (answering met / not met / unknown item by item) and only installs once everything checks out — it will stop and ask you if it finds a high-risk item. The box scrolls; the copy is the full prompt. CLI install commands may not be accurate across systems, so DSH is the safer route.把上面这条消息直接发给当前会话里的 DSH:它会先核对兼容性与安全性(逐条给「满足 / 不满足 / 未知」),确认没问题再安装,有高危项会停下来问你。框内可滚动,复制到的是完整提示词;安装命令不一定准确,发给 DSH 更稳。
- Only 9 stars - very few users, little community feedback星标只有 9,几乎没人在用,遇到问题缺少社区反馈
DSH walks through these 9 checksDSH 会逐条核对这 9 项
Compatibility兼容性
- DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
- External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
- Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册
Security安全性
- Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
- Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
- curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
- Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
- Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
- Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式
Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。
Or use CLI install (for developers)或使用命令行安装(适合开发者)
CLI Install命令行安装
dsh plugin add @shaoshi/dshscan
把 shaoshi20/dshscan 加入你的 DSH 配置(web profile)即可启用。
READMEREADME
DShScan
English | 中文
DSH 插件安全扫描器:对插件源码做静态与语义双通道检查,内置 DSH 特有攻击面规则,集成 npm audit,支持批量扫描,输出带严重等级与证据的 HTML 报告。
Demo

插件市场
已收录于 dshbase 插件目录:
https://dshbase.com/zh/plugins/shaoshi-dshscan/
在线 Demo:
https://shaoshi20.github.io/dshscan/
作为 DSH 插件安装:
dsh plugin add @shaoshi/dshscan
功能
- 输入:插件名 / GitHub 仓库地址 / 本地目录 / zip / Markdown 文件
- 输出:JSON 报告,包含
risk_score、severity、safe_to_install、recommendation、findings - 双通道扫描:
- 静态规则扫描(完全离线)
- 可选 LLM 语义扫描(需 API Key)
- dshbase 集成:输入插件名时自动读取本地索引元数据(stars / trust / verified / npm / cmd)
- npm 源码扫描:npm 插件可自动
npm pack下载并扫描包内容 - 依赖审计:检查未锁定版本、远程依赖源、依赖包名仿冒;可选
--audit调用 npm audit - DSH manifest 校验:检查
dsh.bundle、cordis.patch.yml、LICENSE、README - DSH 攻击面规则:R010 插件树注入、R011 浏览器侧恶意代码、R012 profile 篡改、R013 manifest 混淆、R014 远程动态加载、R015 内置工具影子劫持
- Benchmark 评估集:内置恶意/良性样例,
dshscan --benchmark输出查全率、误报率、F1 与逐规则指标 - 自定义规则:支持
--rules <file>加载 JSON 规则 - 策略文件:支持
--policy <file>配置 ignoreRules / severityOverrides / includeScopes / excludeScopes - 审计日志:支持
--audit-log <file>以 JSONL 记录每个被标记项 - Web Dashboard:支持
--serve启动本地可视化面板,内置风险分数趋势、发现数量趋势、严重级分布图,并自动把扫描历史写入.dshscan-history.json - HTML 报告:支持
--html输出独立网页报告 - 误报处理:每条 finding 都带证据 + 修复建议
- 批量扫描:支持对 dshbase 插件目录批量扫描并输出汇总 JSON / HTML
- 定时巡检:GitHub Actions 每日自动拉取 dshbase 目录并批量扫描
安装与构建
cd path/to/dshscan
npm install
npm run build
构建后生成 dist/main.js,可通过 dshscan.cmd 或 node dist/main.js 调用。
使用
# 扫描 dshbase 插件(按名称自动查索引,并尝试 clone 源码)
dshscan <plugin-name>
dshscan another-plugin
# 扫描 GitHub 仓库
dshscan github:owner/repo
dshscan https://github.com/owner/repo
# 扫描本地目录 / zip / md
dshscan /path/to/plugin
dshscan plugin.zip
dshscan README.md
# 仅离线扫描(不 clone 远程仓库,只给索引元数据 + 静态限制说明)
dshscan <plugin-name> --offline
# 启用 LLM 语义扫描(需要设置 DSCAN_LLM_API_KEY 或 OPENAI_API_KEY)
dshscan <plugin-name> --semantic
# 自定义 LLM 接入
dshscan <plugin-name> --semantic --llm-base-url https://api.openai.com/v1 --llm-model gpt-4o-mini
# 输出到文件
dshscan <plugin-name> --output report.json --pretty
# 输出人类可读摘要
dshscan <plugin-name> --summary
# 输出 HTML 报告
dshscan <plugin-name> --html --output report.html
# 批量扫描输出 HTML
dshscan --batch --all --html --output batch.html
# 启用 npm audit 依赖漏洞扫描
dshscan <plugin-name> --audit
# 加载自定义规则
dshscan <plugin-name> --rules custom-rules.json
# 加载策略并输出审计日志
dshscan <plugin-name> --policy policy.json --audit-log audit.jsonl
# 启动本地 Web 可视化面板(含趋势图,历史写入 .dshscan-history.json)
dshscan --serve --port 8787
# 指定历史文件
dshscan --serve --port 8787 --history /path/to/history.json
# 运行 Benchmark 评估集(恶意/良性样例,输出摘要)
dshscan --benchmark --summary
# 输出完整 Benchmark JSON 报告
dshscan --benchmark --pretty
# 批量扫描 dshbase 插件(默认离线,按 stars 取前 N)
dshscan --batch --limit 50 --index /path/to/dshbase-directory.json --output batch.json --pretty
# 批量扫描全部插件(离线)
dshscan --batch --all --offline --output all.json
Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →
Minglink/dsh-infinite-gen-4
kenryu42/cc-safety-net
hyhmrright/brooks-lint
toby-bridges/api-relay-audit
hashgraph-online/hol-guard
SeaOf0/dsh-redteam-model
howmp/dsh-pentest
saya-ch/dsh-mobile