shaoshi20/dshscan 预览 preview

shaoshi20/dshscan

Plugin插件 Native原生 ⭐ 9 MIT Approval & Security审批与安全

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 全量插件。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 1 warning1 项注意
  • 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

CI Release License dshbase 实测可装

English | 中文

DSH 插件安全扫描器:对插件源码做静态与语义双通道检查,内置 DSH 特有攻击面规则,集成 npm audit,支持批量扫描,输出带严重等级与证据的 HTML 报告。

Demo

DShScan Demo Report

插件市场

已收录于 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 →

← 上一个 Prev dsh-vision 下一个 Next dsh-shadow-mind →