D

dsh-composition-doctor

github.com/lemonxiny55/dsh-composition-doctor

v0.4.0 其他 可执行外部程序写入文件发起网络请求

0.4.0 已发布到 npm。安装独立 CLI,再选择你的实际 profile 目录:

作者原文(英文)

Explain DSH plugin failures through observable composition paths. Read-only, offline by default, with snapshots and upgrade preflight.

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

分类
other
发布
2026-10-05
版本
v0.4.0

检测报告

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

能力清单

  • 可执行外部程序spawns-processes高关注2 处命中
    • …e/preflight/artifact-resolver.js:4import { execFile } from 'node:child_process';
    • dist/core/dsh-dump-provider.js:2import { execFile } from 'node:child_process';
    • 看它调用哪些程序。调用本机已有的工具是常见做法。
  • 写入文件writes-files需留意22 处命中
    • dist/core/dsh-dump-provider.js:36await writeFile(join(directory, file.relativePath), `${JSON.stringify(redact(JSON.parse(file.text)), null, 2)}\n`, 'utf8…
    • dist/core/dsh-dump-provider.js:39await writeFile(join(directory, file.relativePath), redactYamlPreservingTags(file.text), 'utf8');
    • dist/core/dsh-dump-provider.js:63await mkdir(profile, { recursive: true });
    • dist/cli/main.js:122await mkdir(directory, { recursive: true });
    • 看写入位置。写自己的配置目录是正常的,写系统目录不是。
  • 发起网络请求network需留意2 处命中
    • …t/core/preflight/npm-artifact.js:96const response = await fetch(url, { headers: { accept: 'application/json' } });
    • …t/core/preflight/npm-artifact.js:124const response = await fetch(tarballUrl, { headers: { accept: 'application/octet-stream' } });
    • 看请求发往哪些域名。发往作者自己的后端是常见做法。
  • 运行时改写自身配置modifies-own-manifest需留意1 处命中
    • dist/core/preflight.js:88await writeFile(join(directory, 'package.json'), `${JSON.stringify({ name: 'dsh-doctor-isolated-profile', private: true,…
    • 运行时改写自身配置会让下次启动的行为和你看过的源码不一致。
  • 接触凭据或密钥credentials一般28 处命中
    • dist/core/failure-explainer.js:17!/(?:^(?:sk-|gh[pousr]_|eyJ)|token|password|credential|secret|authorization)/i.test(value) ? value : undefined;
    • dist/core/failure-explainer.js:121remediation = 'Review the earlier row and the later patch together. Include required non-secret fields in the complete r…
    • dist/core/failure-profile.js:61// A manifest is untrusted: a patch declaration is not permission to read secrets.
    • dist/core/failure-profile.js:63/(?:^|[\\/])(?:\.env[^\\/]*|[^\\/]*(?:credential|token|secret|password)[^\\/]*|sessions?|chats?|workspace)(?:[\\/]|$)/i.…
    • 看它读取哪些凭据、发往哪里。用于登录自己的服务是正常的。
  • 读取文件reads-files一般18 处命中
    • …e/preflight/artifact-resolver.js:41const bytes = await readFile(path);
    • …e/preflight/artifact-resolver.js:56const manifest = JSON.parse(await readFile(join(path, 'package.json'), 'utf8'));
    • …e/preflight/artifact-resolver.js:70const names = await readdir(cacheDir);
    • …e/preflight/artifact-resolver.js:76const bytes = await readFile(path);
    • 读文件是绝大多数插件的正常工作方式,本身不构成顾虑。
  • 读取环境变量reads-env一般9 处命中
    • …e/preflight/artifact-resolver.js:28const executable = shim ? (process.env.ComSpec ?? 'cmd.exe') : path;
    • …e/preflight/artifact-resolver.js:93const pathValue = process.env.PATH ?? '';
    • …e/preflight/artifact-resolver.js:100const executable = shim ? (process.env.ComSpec ?? 'cmd.exe') : candidate;
    • dist/core/dsh-dump-provider.js:18const values = (process.env.PATH ?? '').split(process.platform === 'win32' ? ';' : ':').filter(Boolean);
    • 环境变量里常混有密钥。看它是否把整个 env 都读走。
逐条扫描明细
能力标识关注度命中次数
可执行外部程序spawns-processes高关注2
写入文件writes-files需留意22
发起网络请求network需留意2
运行时改写自身配置modifies-own-manifest需留意1
接触凭据或密钥credentials一般28
读取文件reads-files一般18
读取环境变量reads-env一般9

这份报告的口径

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

依赖安全公告

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

等级依赖包编号摘要
中semverCVE-2022-25883semver vulnerable to Regular Expression Denial of Service
修复版本:5.7.2, 6.3.1, 7.5.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。

← 返回全部插件