dsh-code-server-app
github.com/jinsiyu/dsh-code-server-app
v0.3.72
界面与主题
可执行外部程序以 shell 执行命令R010 向其他插件注入
VS Code (from a code-server release) inside DSH: a right-sidebar tab driven by the plugin's own launcher over the in-process VS Code server (lib/launcher.mjs), plus an editor bridge (assets/extensions/dshcs-editor-bridge) that gives the agent what only th
该插件尚未翻译,显示作者原文。
检测报告
关注度高。命中了不少能力模式,其中可能有需要留意的。逐条看下面的清单。
3高关注5需留意4一般12未命中
高关注需留意一般
能力清单
- 可执行外部程序
spawns-processes高关注4 处命中lib/index.js:19import { spawn, execFile, execFileSync } from 'node:child_process';scripts/vendor-code-server.mjs:23import { spawnSync } from 'node:child_process';scripts/vendor-repacks.mjs:24import { spawnSync } from 'node:child_process';scripts/vendor-vscode-server.mjs:21import { spawnSync } from 'node:child_process';- 看它调用哪些程序。调用本机已有的工具是常见做法。
- 以 shell 执行命令
shell-exec高关注2 处命中lib/index.js:583const out = execFileSync('where.exe', [configured], { encoding: 'utf8', stdio: ['ignore', 'pipe', 'ignore'] });lib/index.js:587const out = execFileSync('which', [configured], { encoding: 'utf8', stdio: ['ignore', 'pipe', 'ignore'] });- 看命令字符串是拼出来的还是写死的。拼接用户输入才是真正的风险。
- R010 向其他插件注入
plugin-tree-injection高关注1 处命中- dsh-code-server-app
- 看 patch 里 insert 的包是不是本项目自己的。插入第三方代码要格外留意。
- 写入文件
writes-files需留意85 处命中…itor-bridge/lib/bridge-client.js:124fs.mkdirSync(path.dirname(stateFile(extensionsDir)), { recursive: true });…itor-bridge/lib/bridge-client.js:125fs.writeFileSync(stateFile(extensionsDir), JSON.stringify(state), 'utf8');…ons/dshcs-open-file/extension.js:46fs.unlinkSync(signal);lib/index.js:345if (Object.keys(map).length === 0) fs.rmSync(file, { force: true });- 看写入位置。写自己的配置目录是正常的,写系统目录不是。
- 发起网络请求
network需留意10 处命中…itor-bridge/lib/bridge-client.js:17// 请求走 `http.request({ socketPath })`。不走 HTTP 的三个原因(都实测过):desktop 没有 HTTP 面…itor-bridge/lib/bridge-client.js:148* 用 `http.request({socketPath})` 是 Node 里唯一干净的写法 —— 与 host 侧…itor-bridge/lib/bridge-client.js:158const req = http.request({…itor-bridge/lib/bridge-client.js:190* `requestImpl` / `now` 可注入,便于单测(默认走 `http.request({socketPath})`)。- 看请求发往哪些域名。发往作者自己的后端是常见做法。
- 可终止进程
kills-processes需留意6 处命中lib/index.js:237process.kill(pid, 0);lib/index.js:1561process.kill(-pid, 'SIGTERM');lib/index.js:1564process.kill(pid, 'SIGTERM');lib/index.js:1571process.kill(-pid, 'SIGKILL');- 看它终止的是自己启动的进程,还是按名字匹配到的任意进程。
- 启动伪终端
spawns-pty需留意6 处命中package.json:83"@jinsiyu/dshcs-node-pty": "1.2.0-beta.15",lib/vendored.json:128"alias": "node-pty",lib/vendored.json:129"package": "@jinsiyu/dshcs-node-pty",README.en.md:13A static profile plugin (npm package with host + client bundle) that ships the **VS Code server tree** from a [code-serv…- 伪终端等于给了一个完整 shell。确认这是插件的核心功能。
- 运行时改写自身配置
modifies-own-manifest需留意4 处命中scripts/vendor-repacks.mjs:245writeFileSync(join(tmp, 'package.json'), JSON.stringify({ name: 'cross', private: true, version: '0.0.0' }, null, 2) + '…scripts/vendor-repacks.mjs:444writeFileSync(join(dir, 'package.json'), JSON.stringify({scripts/vendor-repacks.mjs:902writeFileSync(join(dir, 'package.json'), JSON.stringify(m, null, 2) + '\n', 'utf8');scripts/vendor-vscode-server.mjs:244writeFileSync(join(vendorTree, 'package.json'), JSON.stringify(layout, null, 2) + '\n', 'utf8');- 运行时改写自身配置会让下次启动的行为和你看过的源码不一致。
- 读取文件
reads-files一般108 处命中…itor-bridge/lib/bridge-client.js:97const raw = JSON.parse(fs.readFileSync(bridgeFile(extensionsDir), 'utf8'));…itor-bridge/lib/bridge-client.js:110const raw = JSON.parse(fs.readFileSync(stateFile(extensionsDir), 'utf8'));…dshcs-editor-bridge/extension.js:387const bytes = await vscode.workspace.fs.readFile(uri);…ons/dshcs-open-file/extension.js:23raw = fs.readFileSync(signal, 'utf8');- 读文件是绝大多数插件的正常工作方式,本身不构成顾虑。
- 读取环境变量
reads-env一般44 处命中…itor-bridge/lib/bridge-client.js:74const fromEnv = process.env.DSHCS_EXTENSIONS_DIR;…ons/dshcs-open-file/extension.js:9const envP = process.env.DSHCS_OPEN_FILE_SIGNAL;lib/index.js:213return process.env.DSH_HOME || path.join(os.homedir(), '.dsh');lib/index.js:1805const env = { ...process.env };- 环境变量里常混有密钥。看它是否把整个 env 都读走。
- 接触凭据或密钥
credentials一般33 处命中lib/index.js:57createApiKeyResolver,lib/index.js:1706if (cfg.auth === 'password') {lib/index.js:2111resolveApiKey: createApiKeyResolver(ctx),lib/index.js:2113assertUsableApiKey: base.assertUsableApiKey,- 看它读取哪些凭据、发往哪里。用于登录自己的服务是正常的。
- 动态加载模块
dynamic-import一般3 处命中lib/index.js:89z = (await import('@deepseek-ai/schemastery')).default;lib/dsh-resolve.mjs:137/** DSH 入口处的 require(用于 CJS 形态的包);都不可用返回 null。 */lib/dsh-resolve.mjs:157const mod = await import(specifier);lib/launcher.mjs:121const mod = await import(pathToFileURL(serverMain).href);- 动态导入本身无害,但会让依赖关系难以静态审阅。
逐条扫描明细
| 能力 | 标识 | 关注度 | 命中次数 |
|---|---|---|---|
| 可执行外部程序 | spawns-processes | 高关注 | 4 |
| 以 shell 执行命令 | shell-exec | 高关注 | 2 |
| R010 向其他插件注入 | plugin-tree-injection | 高关注 | 1 |
| 写入文件 | writes-files | 需留意 | 85 |
| 发起网络请求 | network | 需留意 | 10 |
| 可终止进程 | kills-processes | 需留意 | 6 |
| 启动伪终端 | spawns-pty | 需留意 | 6 |
| 运行时改写自身配置 | modifies-own-manifest | 需留意 | 4 |
| 读取文件 | reads-files | 一般 | 108 |
| 读取环境变量 | reads-env | 一般 | 44 |
| 接触凭据或密钥 | credentials | 一般 | 33 |
| 动态加载模块 | dynamic-import | 一般 | 3 |
这份报告的口径
扫描读的是包里的源码,全程不执行第三方代码。 本次读了 38 个文件,扫描于 2026-10-15。 命中次数只说明源码里出现过这类调用,不说明行为好坏——一个插件读写文件 500 次和 1 次 都会被记为「读取文件」。这是能力清单,不是信任评分,也不是安全结论: 没扫出来的能力可能只是写法没被规则覆盖。
依赖安全公告
这个插件声明的依赖中,有 18 条已公开的安全公告 (最高等级:高):
| 等级 | 依赖包 | 编号 | 摘要 |
|---|---|---|---|
| 高 | tar | CVE-2026-26960 | Arbitrary File Read/Write via Hardlink Target Escape Through Symlink Chain in node-tar Extraction 修复版本:7.5.8 详情 → |
| 中 | tar | CVE-2026-59873 | node-tar: Decompression/parse DoS via unlimited input 修复版本:7.5.19 详情 → |
| 中 | tar | CVE-2026-24842 | node-tar Vulnerable to Arbitrary File Creation/Overwrite via Hardlink Path Traversal 修复版本:7.5.7 详情 → |
| 中 | tar | CVE-2026-59874 | node-tar: Negative tar entry size causes infinite loop in archive replace 修复版本:7.5.18 详情 → |
| 中 | tar | CVE-2026-73566 | node-tar: Uncontrolled recursion in mapHas/filesFilter allows uncatchable stack-overflow DoS via crafted long-path tar with member selection 修复版本:7.5.21 详情 → |
| 中 | tar | CVE-2026-23950 | Race Condition in node-tar Path Reservations via Unicode Ligature Collisions on macOS APFS 修复版本:7.5.4 详情 → |
| 中 | uuid | CVE-2026-41907 | uuid: Missing buffer bounds check in v3/v5/v6 when buf is provided 修复版本:11.1.1, 12.0.1, 13.0.1 详情 → |
| 中 | ws | CVE-2026-45736 | ws: Uninitialized memory disclosure 修复版本:8.20.1 详情 → |
| 中 | ws | CVE-2026-48779 | ws: Memory exhaustion DoS from tiny fragments and data chunks 修复版本:5.2.5, 6.2.4, 7.5.11 详情 → |
| 低 | tar | CVE-2026-59875 | node-tar: Uncaught Exception DoS via NUL byte in PAX path/linkpath records 修复版本:7.5.17 详情 → |
| 低 | tar | CVE-2026-59871 | node-tar: Process crash via PAX numeric path type confusion 修复版本:7.5.18 详情 → |
| 低 | yauzl | CVE-2026-31988 | yauzl contains an off-by-one error 修复版本:3.2.1 详情 → |
查询的是依赖声明范围的下界(如 ^4.2.0 查 4.2.0),
不是实际安装到的版本。真正装的时候如果解析到了修复版本,就不受影响——
所以这是「可能受影响」,不是「这个插件有漏洞」。数据来自
OSV.dev。