dsh-electro-lab
github.com/curtainsmall/dsh-electro-lab
v0.13.0
其他
可执行外部程序发起网络请求写入文件
面向 DeepSeek Harness 的电气与电子计算插件。
作者原文(英文)
DSH plugin: electrical & electronics problem solving
中文简介由 DeepSeek 模型翻译,仅供参考。
检测报告
关注度高。命中了不少能力模式,其中可能有需要留意的。逐条看下面的清单。
1高关注2需留意3一般18未命中
高关注需留意一般
能力清单
- 可执行外部程序
spawns-processes高关注1 处命中lib/index.js:7import { spawn } from "node:child_process";- 看它调用哪些程序。调用本机已有的工具是常见做法。
- 发起网络请求
network需留意33 处命中lib/client-registry.js:4447const res = await fetch(`${GENERATE_ENDPOINT}?recordId=${encodeURIComponent(request.recordId)}&format=${encodeURICompone…lib/client-registry.js:4454const pr = await fetch(`${GENERATE_PROGRESS_ENDPOINT}?jobId=${encodeURIComponent(body.jobId)}`);lib/client-registry.js:4505if (id !== null) fetch(`${GENERATE_CANCEL_ENDPOINT}?jobId=${encodeURIComponent(id)}`, { method: "POST" }).catch(() => {}…lib/client-registry.js:4620fetch(GENERATE_DIR_ENDPOINT).then((r) => r.json()).then((body) => {- 看请求发往哪些域名。发往作者自己的后端是常见做法。
- 写入文件
writes-files需留意21 处命中lib/index.js:286for (const name of older.slice(0, Math.max(0, older.length + 1 - KEEP_RUNS))) rmSync(join(root, name), { force: true });lib/index.js:294rmSync(join(root, run.name), { force: true });lib/index.js:318mkdirSync(root, { recursive: true });lib/index.js:458mkdirSync(this.home, { recursive: true });- 看写入位置。写自己的配置目录是正常的,写系统目录不是。
- 读取文件
reads-files一般24 处命中lib/index.js:274return statSync(file).size;lib/index.js:281return readdirSync(root, { withFileTypes: true }).filter((entry) => entry.isFile() && RUN_NAME.test(entry.name)).map((en…lib/index.js:445if (!existsSync(file)) return [];lib/index.js:447for (const line of readFileSync(file, "utf8").split("\n")) {- 读文件是绝大多数插件的正常工作方式,本身不构成顾虑。
- 读取环境变量
reads-env一般6 处命中lib/client-registry.js:3844typeof process !== "undefined" && process.env?.FA_VERSION;lib/client.js:3844typeof process !== "undefined" && process.env?.FA_VERSION;lib/index.js:6375const local = process.env.LOCALAPPDATA;lib/index.js:6925const home = process.env.DSH_HOME ?? join(homedir(), ".dsh");- 环境变量里常混有密钥。看它是否把整个 env 都读走。
- 动态加载模块
dynamic-import一般5 处命中lib/index.js:410require(id) {lib/index.js:1222const solver = this.registry.require(solverId);lib/index.js:1252const solver = this.registry.require(solverId);lib/types/engine/registry.d.ts:24require(id: string): SolverDef;- 动态导入本身无害,但会让依赖关系难以静态审阅。
逐条扫描明细
| 能力 | 标识 | 关注度 | 命中次数 |
|---|---|---|---|
| 可执行外部程序 | spawns-processes | 高关注 | 1 |
| 发起网络请求 | network | 需留意 | 33 |
| 写入文件 | writes-files | 需留意 | 21 |
| 读取文件 | reads-files | 一般 | 24 |
| 读取环境变量 | reads-env | 一般 | 6 |
| 动态加载模块 | dynamic-import | 一般 | 5 |
这份报告的口径
扫描读的是包里的源码,全程不执行第三方代码。 本次读了 67 个文件,扫描于 2026-10-14。 命中次数只说明源码里出现过这类调用,不说明行为好坏——一个插件读写文件 500 次和 1 次 都会被记为「读取文件」。这是能力清单,不是信任评分,也不是安全结论: 没扫出来的能力可能只是写法没被规则覆盖。
依赖安全公告
已查询这个插件声明的全部依赖,没有匹配到已公开的安全公告。(含 DSH 框架包在内的 @deepseek-ai/* 不作查询——那是运行时自己的问题,不是插件的。)