dsh-better-sidebar
github.com/omdsh-dev/DSH-better-sidebar
v0.26.0
界面与主题
可执行外部程序以 shell 执行命令启动伪终端
Better Sidebar for DSH — file tree, editor, changes, tasks and side chat in one column, separate for every conversation. Also exposes a service other plugins use to register sidebar tabs and file viewers.
该插件尚未翻译,显示作者原文。
检测报告
关注度高。命中了不少能力模式,其中可能有需要留意的。逐条看下面的清单。
2高关注4需留意4一般14未命中
高关注需留意一般
能力清单
- 可执行外部程序
spawns-processes高关注8 处命中lib/index.js:6import { execFileSync, spawn } from "node:child_process";lib/types/archive-tools.d.ts:33import { spawn } from 'node:child_process';src/archive-tools.ts:33import { spawn } from 'node:child_process'src/git.ts:16import { spawn } from 'node:child_process'- 看它调用哪些程序。调用本机已有的工具是常见做法。
- 以 shell 执行命令
shell-exec高关注2 处命中lib/index.js:3524const translated = execFileSync("/usr/bin/wslpath", [mode, value], { encoding: "utf8" }).trim();src/open-external.ts:74const translated = execFileSync('/usr/bin/wslpath', [mode, value], { encoding: 'utf8' }).trim()- 看命令字符串是拼出来的还是写死的。拼接用户输入才是真正的风险。
- 启动伪终端
spawns-pty需留意51 处命中README_EN.md:88> The plugin depends on no package that needs a build script (the terminal and `node-pty` went back to DSH wholesale), s…README_EN.md:119| `Ignored build scripts` | pnpm 11 blocked a **transitive** dependency's build script. Run `pnpm approve-builds` (no `-…README_EN.md:124| Terminal unusable / shell fails to start | The terminal comes from **DSH's own `ui-sidebar-terminal`** (this plugin no…README_EN.md:177| **💻 Terminal (provided by DSH)**<br/><sub>The right-Sidebar terminal is provided by DSH's own `ui-sidebar-terminal`: s…- 伪终端等于给了一个完整 shell。确认这是插件的核心功能。
- 写入文件
writes-files需留意34 处命中lib/index.js:1953await mkdir(dirname(safeTarget), { recursive: true });lib/index.js:1972await rename(tmp, safeTarget);lib/index.js:2016await mkdir(dirname(absolute), { recursive: true });lib/index.js:2017await writeFile(tmp, encodeText(restoreEol(content, eol), encoding), { flag: "wx" });- 看写入位置。写自己的配置目录是正常的,写系统目录不是。
- 发起网络请求
network需留意10 处命中src/client/api.ts:240response = await fetch(hostRouteUrl(`sidebar/api/${method}`).href, {src/client/api.ts:293response = await fetch(hostRouteUrl(`sidebar/upload?${params.toString()}`).href, {src/client/api.ts:333response = await fetch(hostRouteUrl(`sidebar/write?${params.toString()}`).href, {src/client/chunk-loader.ts:223const res = await fetch(CHUNK_URL(name), {- 看请求发往哪些域名。发往作者自己的后端是常见做法。
- R011 客户端可疑脚本
client-side-risk需留意3 处命中- use-dir-watch.ts: postMessage 无 origin 校验; use-host-feeds.ts: postMessage 无 origin 校验
- 浏览器侧代码能改你看到的界面。确认改动范围符合插件用途。
- 接触凭据或密钥
credentials一般70 处命中lib/index.js:6356* touches a credential: the harness resolves provider endpoints and keys.lib/index.js:7731const descriptor = sctx.settings.describe({ redactSecrets: true }).find((candidate) => candidate.ns === ns);lib/index.js:7741return (sctx.settings.describe({ redactSecrets: true }).find((candidate) => candidate.ns === AIONUI_PANEL_ENTRY)?.value)…README_EN.md:52- **🌿 Changes** (no Git panel in the stock sidebar): two lenses in one tab — **Git** (diff / history / stage·commit·reve…- 看它读取哪些凭据、发往哪里。用于登录自己的服务是正常的。
- 动态加载模块
dynamic-import一般49 处命中…pes/client/add-plugin-modal.d.ts:9}): import("react").JSX.Element;…pes/client/add-plugin-modal.d.ts:15}): import("react").JSX.Element;…s/client/changes/ChangesTab.d.ts:5export declare function ChangesTab({ ctx, store, scope, tab, visible, onOpenFile, onOpenDiff }: TabComponentProps): impo…lib/types/client/chunk-loader.d.ts:5* The platform externals a chunk bundle may require (mirror of- 动态导入本身无害,但会让依赖关系难以静态审阅。
- 读取环境变量
reads-env一般26 处命中lib/index.js:314...process.env,lib/index.js:2259const SEARCH_DEBUG = process.env.DSH_SEARCH_DEBUG === "1";lib/index.js:2260const LOG_FILE = join(process.env.DSH_HOME !== void 0 && process.env.DSH_HOME.trim() !== "" ? process.env.DSH_HOME : joi…lib/index.js:2360const env = process.env;- 环境变量里常混有密钥。看它是否把整个 env 都读走。
- 读取文件
reads-files一般23 处命中lib/index.js:483const entries = await readdir(cwd, { withFileTypes: true }).catch(() => []);lib/index.js:992* deliberately allocation-shy: one `readdir(withFileTypes)` call (nolib/index.js:1100dirents = await readdir(path, { withFileTypes: true });lib/index.js:1303mtimeMs = statSync(metaFile).mtimeMs;- 读文件是绝大多数插件的正常工作方式,本身不构成顾虑。
逐条扫描明细
| 能力 | 标识 | 关注度 | 命中次数 |
|---|---|---|---|
| 可执行外部程序 | spawns-processes | 高关注 | 8 |
| 以 shell 执行命令 | shell-exec | 高关注 | 2 |
| 启动伪终端 | spawns-pty | 需留意 | 51 |
| 写入文件 | writes-files | 需留意 | 34 |
| 发起网络请求 | network | 需留意 | 10 |
| R011 客户端可疑脚本 | client-side-risk | 需留意 | 3 |
| 接触凭据或密钥 | credentials | 一般 | 70 |
| 动态加载模块 | dynamic-import | 一般 | 49 |
| 读取环境变量 | reads-env | 一般 | 26 |
| 读取文件 | reads-files | 一般 | 23 |
这份报告的口径
扫描读的是包里的源码,全程不执行第三方代码。 本次读了 378 个文件,扫描于 2026-10-15。 命中次数只说明源码里出现过这类调用,不说明行为好坏——一个插件读写文件 500 次和 1 次 都会被记为「读取文件」。这是能力清单,不是信任评分,也不是安全结论: 没扫出来的能力可能只是写法没被规则覆盖。
依赖安全公告
这个插件声明的依赖中,有 17 条已公开的安全公告 (最高等级:中):
| 等级 | 依赖包 | 编号 | 摘要 |
|---|---|---|---|
| 中 | 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 详情 → |
| 中 | yaml | CVE-2023-2251 | Uncaught Exception in yaml 修复版本:2.2.2 详情 → |
| 低 | mermaid | CVE-2026-41150 | Mermaid Gantt Charts are vulnerable to an Infinite Loop DoS 修复版本:10.9.6, 11.15.0 详情 → |
| 低 | yaml | CVE-2026-33532 | yaml is vulnerable to Stack Overflow via deeply nested YAML collections 修复版本:1.10.3, 2.8.3 详情 → |
| 未分级 | dompurify | CVE-2026-109345 | DOMPurify: IN_PLACE returns a force-removed rawtext root whose text carries attacker markup — pure HTML reparse executes 修复版本:3.4.16 详情 → |
| 未分级 | dompurify | CVE-2026-109344 | DOMPurify: IN_PLACE: node-removing afterSanitize hook leaves detached subtree event handlers armed, causing DOM XSS 修复版本:3.4.16 详情 → |
| 未分级 | mermaid | CVE-2026-71436 | Mermaid XY Charts are vulnerable to an infinite loop DoS 修复版本:10.9.8, 11.16.1 详情 → |
| 未分级 | mermaid | CVE-2026-71437 | Mermaid Architecture diagrams are vulnerable to prototype pollution 修复版本:11.16.1 详情 → |
| 未分级 | mermaid | CVE-2026-50159 | Mermaid allows CSS injection applying to sibling elements of the diagram 修复版本:10.9.8, 11.16.1 详情 → |
| 未分级 | mermaid | CVE-2025-54881 | Mermaid improperly sanitizes sequence diagram labels leading to XSS 修复版本:10.9.4, 11.10.0 详情 → |
| 未分级 | mermaid | CVE-2026-41159 | Mermaid: Improper sanitization of configuration leads to CSS injection 修复版本:10.9.6, 11.15.0 详情 → |
查询的是依赖声明范围的下界(如 ^4.2.0 查 4.2.0),
不是实际安装到的版本。真正装的时候如果解析到了修复版本,就不受影响——
所以这是「可能受影响」,不是「这个插件有漏洞」。数据来自
OSV.dev。