D

dsh-plugin-supervisor

github.com/SparkElf/dsh-plugins-plus

v0.1.9 会话与记忆 可执行外部程序写入文件发起网络请求

该软件包把两个进程角色放在同一个 npm 发布中:Host Cordis 插件公开当前运行中的顶层 Session 集合并接收恢复提示词,独立 Node Supervisor 则根据显式 manifest 启动、停止、构建和重启一个 Plus Web runtime。受控重启会在关闭前捕获运行中的 Session,并在替代 runtime 开始监听后为每个 Session 排入一条恢复消息。

作者原文(英文)

Out-of-process Plus runtime Supervisor with controlled Session recovery

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

分类
session
发布
2026-09-29
版本
v0.1.9

检测报告

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

能力清单

  • 可执行外部程序spawns-processes高关注1 处命中
    • runtime/supervisor.mjs:3import { spawn } from 'node:child_process'
    • 看它调用哪些程序。调用本机已有的工具是常见做法。
  • 写入文件writes-files需留意12 处命中
    • runtime/manifest.mjs:23writeFileSync(nextPath, content)
    • runtime/manifest.mjs:24renameSync(nextPath, manifestPath)
    • runtime/profile-guard.mjs:17mkdirSync(dirname(path), { recursive: true })
    • runtime/profile-guard.mjs:19writeFileSync(next, JSON.stringify(value, null, 2) + LF, { mode: 0o600 })
    • 看写入位置。写自己的配置目录是正常的,写系统目录不是。
  • 发起网络请求network需留意4 处命中
    • progress/app.js:138const response = await fetch('/api/status', { cache: 'no-store' })
    • progress/app.js:149const response = await fetch('/api/command', {
    • runtime/supervisor.mjs:203const response = await fetch('http://127.0.0.1:' + String(this.manifest.port) + RECOVERY_PATH, {
    • runtime/supervisor.mjs:341const response = await fetch('http://127.0.0.1:' + String(this.manifest.port) + RECOVERY_PATH, {
    • 看请求发往哪些域名。发往作者自己的后端是常见做法。
  • 可终止进程kills-processes需留意2 处命中
    • runtime/supervisor.mjs:177for (const pid of pids) process.kill(pid, 'SIGTERM')
    • runtime/supervisor.mjs:292process.kill(-child.pid, 'SIGTERM')
    • 看它终止的是自己启动的进程,还是按名字匹配到的任意进程。
  • 读取文件reads-files一般17 处命中
    • runtime/locale.mjs:18text = await readFile(join(dshHome, 'settings.yaml'), 'utf8')
    • runtime/manifest.mjs:12return JSON.parse(await readFile(manifestPath, 'utf8'))
    • runtime/profile-guard.mjs:27if (!existsSync(absolute)) continue
    • runtime/profile-guard.mjs:29for (const entry of readdirSync(current, { withFileTypes: true }).sort((a, b) => a.name.localeCompare(b.name))) {
    • 读文件是绝大多数插件的正常工作方式,本身不构成顾虑。
  • 读取环境变量reads-env一般1 处命中
    • runtime/supervisor.mjs:106...process.env,
    • 环境变量里常混有密钥。看它是否把整个 env 都读走。
  • 动态加载模块dynamic-import一般1 处命中
    • lib/bin.js:4await import(new URL("../runtime/bin.mjs", import.meta.url).href);
    • 动态导入本身无害,但会让依赖关系难以静态审阅。
逐条扫描明细
能力标识关注度命中次数
可执行外部程序spawns-processes高关注1
写入文件writes-files需留意12
发起网络请求network需留意4
可终止进程kills-processes需留意2
读取文件reads-files一般17
读取环境变量reads-env一般1
动态加载模块dynamic-import一般1

这份报告的口径

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

依赖安全公告

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

等级依赖包编号摘要
中yamlCVE-2023-2251Uncaught Exception in yaml
修复版本:2.2.2 详情 →
低yamlCVE-2026-33532yaml is vulnerable to Stack Overflow via deeply nested YAML collections
修复版本:1.10.3, 2.8.3 详情 →

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

← 返回全部插件