D

dsh-desktopify

github.com/morlay/dsh-plugin

v0.2.5 开发与运行时 可执行外部程序以 shell 执行命令写入文件
认证 L1已扫描 ✓健康 S/95周下载 51

把任意 dsh 工作区打包 / 运行为桌面应用的工具:`dev` 链接工作区直接跑,`bundle` 产出静态、无签名的应用目录。

作者原文(英文)

Desktop packaging tool for dsh workspaces: dev (workspace-linked) and bundle (static, unsigned) modes around the @morlay/dsh-desktop-shell Electron app, whose @morlay/dsh-desktop-host child boots the profile over byte pipes.

中文简介由 DeepSeek 模型翻译,仅供参考。

desktopdshelectronelectron-builderpackaging
分类
dev
发布
2026-10-02
版本
v0.2.5

检测报告

关注度高。命中了不少能力模式,其中可能有需要留意的。逐条看下面的清单。
2高关注7需留意5一般10未命中
高关注需留意一般

能力清单

  • 可执行外部程序spawns-processes高关注6 处命中
    • dist/cli/index.mjs:9import { execFile, spawn } from "node:child_process";
    • dist/main-qU3ZhwM5.mjs:1903var child_process = __require("child_process");
    • dist/node-C4wBr-NV.mjs:6import childProcess, { execFile } from "node:child_process";
    • dist/node-C4wBr-NV.mjs:6802const childProcess$2 = __require("child_process");
    • 看它调用哪些程序。调用本机已有的工具是常见做法。
  • 以 shell 执行命令shell-exec高关注5 处命中
    • dist/main-qU3ZhwM5.mjs:2182readFromStdout(child_process.execFileSync(command, args.concat(`--service=0.28.2`), {
    • dist/node-C4wBr-NV.mjs:6841const editor = getEditorFromMacProcesses(childProcess$2.execSync("ps x -o comm=", { stdio: [
    • dist/node-C4wBr-NV.mjs:6848const editor = getEditorFromWindowsProcesses(childProcess$2.execSync("powershell -NoProfile -Command \"[Console]::Output…
    • dist/node-C4wBr-NV.mjs:6855const editor = getEditorFromLinuxProcesses(childProcess$2.execSync("ps x --no-heading -o comm --sort=comm", { stdio: [
    • 看命令字符串是拼出来的还是写死的。拼接用户输入才是真正的风险。
  • 写入文件writes-files需留意61 处命中
    • dist/api-IxFHTa2I.mjs:2037this.initialized || (fs.mkdirSync(this.cacheDirectory, { recursive: !0 }), this.initialized = !0, setImmediate(() => {
    • dist/api-IxFHTa2I.mjs:2053this.initialize(), fs.promises.writeFile(path.join(this.cacheDirectory, o), JSON.stringify(r)).catch(ae$1);
    • dist/api-IxFHTa2I.mjs:2065Number.isSafeInteger(p) && e - p > Ye$1 && i.push(fs.promises.unlink(path.join(this.cacheDirectory, c.name)).catch(ae$1)…
    • dist/api-IxFHTa2I.mjs:3793return t.writeFileSync(r, ""), !t.existsSync(Ze(r));
    • 看写入位置。写自己的配置目录是正常的,写系统目录不是。
  • 发起网络请求network需留意5 处命中
    • dist/build-CUIQMiX-.mjs:1030async fetch(_newPath, relativeTo, _trace) {
    • dist/build-CUIQMiX-.mjs:1047const { injectableSource, exportTokens } = await this.core.load(source, rootRelativePath, trace, this.fetch.bind(this));
    • dist/build-CUIQMiX-.mjs:5337return loader.fetch.call(loader, unquoteFile, relativeTo, depTrace);
    • dist/cli/index.mjs:418const response = await fetch(url);
    • 看请求发往哪些域名。发往作者自己的后端是常见做法。
  • 运行时改写自身配置modifies-own-manifest需留意3 处命中
    • dist/cli/index.mjs:52await writeFile(join(appDir, "package.json"), `${JSON.stringify({
    • dist/cli/index.mjs:1135await writeFile(join(profileDir, "package.json"), `${JSON.stringify(profileManifest(manifest, localBundles), void 0, 2)}…
    • dist/cli/index.mjs:1535await writeFile(join(projectDir, "package.json"), `${JSON.stringify({
    • 运行时改写自身配置会让下次启动的行为和你看过的源码不一致。
  • 可终止进程kills-processes需留意1 处命中
    • dist/node-C4wBr-NV.mjs:7019if (currentChildProcess && isTerminalEditor(editor)) currentChildProcess.kill("SIGKILL");
    • 看它终止的是自己启动的进程,还是按名字匹配到的任意进程。
  • 动态执行代码dynamic-code需留意1 处命中
    • dist/postcss-BiAIUPto.mjs:2598return new Function(`return ${template}`)()(comparator);
    • 看 eval / new Function 的入参来自哪里。常量字符串和用户输入是两回事。
  • 启动伪终端spawns-pty需留意1 处命中
    • dist/node-C4wBr-NV.mjs:6848const editor = getEditorFromWindowsProcesses(childProcess$2.execSync("powershell -NoProfile -Command \"[Console]::Output…
    • 伪终端等于给了一个完整 shell。确认这是插件的核心功能。
  • 含混淆或编码代码obfuscated-code需留意1 处命中
    • dist/node-C4wBr-NV.mjs:5235var ENCODE_CHARS_REGEXP = /(?:[^\x21\x25\x26-\x3B\x3D\x3F-\x5B\x5D\x5F\x61-\x7A\x7E]|%(?:[^0-9A-Fa-f]|[0-9A-Fa-f][^0-9A-…
    • 混淆本身不是恶意,但公开源码里出现大段混淆值得问一句为什么。
  • 读取环境变量reads-env一般95 处命中
    • dist/api-IxFHTa2I.mjs:2080var J$1 = process.env.TSX_DISABLE_CACHE ? /* @__PURE__ */ new Map() : new Er();
    • dist/api-IxFHTa2I.mjs:2705const r = process.env.NODE_OPTIONS;
    • dist/api-IxFHTa2I.mjs:2728sourcesContent: !!process.env.NODE_V8_COVERAGE || In$1,
    • dist/api-IxFHTa2I.mjs:2860if (l.process && l.process.env && l.process.stdout) {
    • 环境变量里常混有密钥。看它是否把整个 env 都读走。
  • 读取文件reads-files一般84 处命中
    • dist/api-IxFHTa2I.mjs:2017const e = fs.readFileSync(s, "utf8");
    • dist/api-IxFHTa2I.mjs:2968return n === void 0 && (n = fs.readFileSync(t, "utf8"), e?.set(r, n)), n;
    • dist/api-IxFHTa2I.mjs:2975n = fs.statSync(t);
    • dist/api-IxFHTa2I.mjs:3793return t.writeFileSync(r, ""), !t.existsSync(Ze(r));
    • 读文件是绝大多数插件的正常工作方式,本身不构成顾虑。
  • 动态加载模块dynamic-import一般34 处命中
    • dist/api-IxFHTa2I.mjs:1277const { parse: s, init: e } = await import("./lexer-CanA6ArK-C6uJWV8v.mjs");
    • dist/api-IxFHTa2I.mjs:2000if (!e.includes("import(")) return;
    • dist/api-IxFHTa2I.mjs:4285if (!t) throw new Error("The current file path (__filename or import.meta.url) must be provided in the second argument o…
    • dist/api-IxFHTa2I.mjs:4309const te = u((e, t) => (G || (G = Re({ namespace: Date.now().toString() })), G.require(e, t)), "tsxRequire");
    • 动态导入本身无害,但会让依赖关系难以静态审阅。
  • 接触凭据或密钥credentials一般5 处命中
    • dist/dist-Df_ofAoA.mjs:5795if (node_process.env.LOG_TOKENS) console.log("|", cst.prettyToken(source));
    • dist/node-C4wBr-NV.mjs:1851if (process.env.COPILOT_MODEL || process.env.COPILOT_ALLOW_ALL || process.env.COPILOT_GITHUB_TOKEN) return {
    • dist/node-C4wBr-NV.mjs:6410if (options.credentials === true) return {
    • dist/node-C4wBr-NV.mjs:11940if (parsedUrl.username || parsedUrl.password) opts.auth = `${parsedUrl.username}:${parsedUrl.password}`;
    • 看它读取哪些凭据、发往哪里。用于登录自己的服务是正常的。
  • 使用 vm 模块做隔离uses-vm-module一般1 处命中
    • dist/jiti-r9THbiq0.mjs:5108const wi = __require("node:fs/promises"), Ci = __require("node:perf_hooks"), Si = __require("node:vm");
    • 用 node:vm 是在建立隔离,不是在突破它。本身不是顾虑,但值得知道这个插件会执行动态代码。
逐条扫描明细
能力标识关注度命中次数
可执行外部程序spawns-processes高关注6
以 shell 执行命令shell-exec高关注5
写入文件writes-files需留意61
发起网络请求network需留意5
运行时改写自身配置modifies-own-manifest需留意3
可终止进程kills-processes需留意1
动态执行代码dynamic-code需留意1
启动伪终端spawns-pty需留意1
含混淆或编码代码obfuscated-code需留意1
读取环境变量reads-env一般95
读取文件reads-files一般84
动态加载模块dynamic-import一般34
接触凭据或密钥credentials一般5
使用 vm 模块做隔离uses-vm-module一般1

这份报告的口径

扫描读的是包里的源码,全程不执行第三方代码。 本次读了 18 个文件,扫描于 2026-10-15。 命中次数只说明源码里出现过这类调用,不说明行为好坏——一个插件读写文件 500 次和 1 次 都会被记为「读取文件」。这是能力清单,不是信任评分,也不是安全结论: 没扫出来的能力可能只是写法没被规则覆盖。

依赖安全公告

这个插件声明的依赖中,有 25 条已公开的安全公告 (最高等级:严重):

等级依赖包编号摘要
严重electronCVE-2026-102676Electron: <webview> can enable Node.js integration in Web Workers despite embedder restrictions
修复版本:41.10.6, 42.9.2, 43.4.1 详情 →
严重extract-zipCVE-2026-19693extract-zip allows arbitrary file writes through symlink archive entries 详情 →
严重extract-zipCVE-2026-56876extract-zip unvalidated symlink path traversal 详情 →
严重pnpmCVE-2026-82393pnpm: A tarball dependency's manifest `name` escapes node_modules → arbitrary file write/overwrite on install
修复版本:10.34.5, 11.11.0 详情 →
高electronCVE-2026-102677Electron: Sandboxed preload code cache can be poisoned by a compromised renderer
修复版本:42.10.0, 43.5.0, 44.0.0-beta.6 详情 →
高tarCVE-2026-26960Arbitrary File Read/Write via Hardlink Target Escape Through Symlink Chain in node-tar Extraction
修复版本:7.5.8 详情 →
中electronCVE-2026-102674Electron: Windows opened from a sandboxed top-level document do not inherit its sandbox restrictions
修复版本:41.10.6, 42.9.2, 43.4.1 详情 →
中electronCVE-2026-102675Electron: File and HTTP protocol handlers allow cross-origin reads without corsEnabled
修复版本:41.10.6, 42.9.2, 43.4.1 详情 →
中pnpmCVE-2026-82392pnpm: Virtual store linker path traversal via unvalidated depPath name in lockfileToDepGraph
修复版本:10.34.5, 11.11.0 详情 →
中pnpmCVE-2026-59195pnpm: Path traversal in configDependencies env lockfile allows symlink creation outside node_modules/.pnpm-config
修复版本:10.34.4, 11.8.0 详情 →
中pnpmCVE-2026-101043pnpm: Environment secrets exfiltrated via env-placeholder expansion in proxy settings read from an untrusted pnpm-workspace.yaml
修复版本:10.34.5, 11.11.0 详情 →
中tarCVE-2026-59873node-tar: Decompression/parse DoS via unlimited input
修复版本:7.5.19 详情 →

查询的是依赖声明范围的下界(如 ^4.2.0 查 4.2.0), 不是实际安装到的版本。真正装的时候如果解析到了修复版本,就不受影响—— 所以这是「可能受影响」,不是「这个插件有漏洞」。数据来自 OSV.dev。

← 返回全部插件