会话与记忆 · v0.3.2
dsh-extras
dsh 工作区质量门禁插件(agent 会话的 local CI):ctx.gates 注册表 + gates_run 工具 + /gates 命令 + turn-stopping 阻塞驱动;仓库级 gates.yml 声明与插件级代码注册两种形态。
作者原文(英文)
Curated extras for dsh: one npm package, several independent plugin modules — gates (turn-close quality gates), markdown (md_rename tool + doc-link gate), enrichment (declarative context enrichment), routes (any_nav knowledge routing). `dsh plugin add @ca
简介取自插件自己的 README 原文。
安装命令
dsh plugin --profile web add @catheadowl/dsh-extras@0.3.2
已试装 · 层已挂载
已在一个隔离的 profile 里真装过:包能装上,并且插件层挂载成功。这一条是实测结果,不是作者的声明。
检测报告
能力清单
- 以 shell 执行命令
shell-exec高关注3 处命中modules/markdown/lib/links/git.js:29execFileSync('git', ['-C', root, ...args], {modules/markdown/lib/links/git.js:171execFileSync('git', ['-C', topLevel, 'mv', fromRepoRelative, toRepoRelative], {modules/gates/lib/repo-gates.js:74const child = spawn(command, { cwd: root, shell: true, stdio: ['ignore', 'pipe', 'pipe'], env });- 看命令字符串是拼出来的还是写死的。拼接用户输入才是真正的风险。
- 可执行外部程序
spawns-processes高关注2 处命中modules/markdown/lib/links/git.js:12import { execFileSync } from 'node:child_process';modules/gates/lib/repo-gates.js:5import { spawn } from 'node:child_process';- 看它调用哪些程序。调用本机已有的工具是常见做法。
- 写入文件
writes-files需留意6 处命中modules/markdown/lib/links/git.js:39rmSync(dir, { recursive: true, force: true });…/markdown/lib/links/normalize.js:100writeFileSync(file, content);…les/markdown/lib/links/rename.js:38* witness a completed rename (D1: refuse with a remedy hint, never guess or…les/markdown/lib/links/rename.js:482mkdirSync(dirname(plan.newPath), { recursive: true });- 看写入位置。写自己的配置目录是正常的,写系统目录不是。
- 读取文件
reads-files一般42 处命中…es/markdown/lib/links/anchors.js:87const anchors = documentAnchors(readFileSync(absPath, 'utf8'));…es/lib/breadcrumb-description.js:152return extractDescription(await readFile(markdownPath, 'utf8'));modules/markdown/lib/gate-check.js:67pairs = documentAnchorPairs(readFileSync(targetAbs, 'utf8'));modules/markdown/lib/links/git.js:36return readFileSync(outFile, 'utf8');- 读文件是绝大多数插件的正常工作方式,本身不构成顾虑。
- 动态加载模块
dynamic-import一般7 处命中modules/gates/lib/repo-gates.js:36const surface = await import(pathToFileURL(modulePath).href);modules/gates/README.md:71- module gate 的动态 `import()` 受 Node 模块缓存约束:会话期间修改仓库 gate 模块不会生效,需重启进程。…/lib/breadcrumb-description.d.ts:66export declare function registerBreadcrumbDescriptionProvider(ctx: import('@deepseek-ai/cordis').Context, options: Bread……nt/lib/client/EnrichmentTab.d.ts:37export declare function EnrichmentTab(props: EnrichmentTabProps): import("react").JSX.Element;- 动态导入本身无害,但会让依赖关系难以静态审阅。
- 读取环境变量
reads-env一般3 处命中…richment/vendor/ignore/index.cjs:618process.env && process.env.IGNORE_TEST_WIN32modules/gates/lib/repo-gates.js:73const env = gateCommandEnv(process.env, changes, options);- 环境变量里常混有密钥。看它是否把整个 env 都读走。
逐条扫描明细
| 能力 | 标识 | 关注度 | 命中次数 |
|---|---|---|---|
| 以 shell 执行命令 | shell-exec | 高关注 | 3 |
| 可执行外部程序 | spawns-processes | 高关注 | 2 |
| 写入文件 | writes-files | 需留意 | 6 |
| 读取文件 | reads-files | 一般 | 42 |
| 动态加载模块 | dynamic-import | 一般 | 7 |
| 读取环境变量 | reads-env | 一般 | 3 |
这份报告的口径
扫描读的是包里的源码,全程不执行第三方代码。 本次读了 153 个文件,扫描于 2026-10-15。 命中次数只说明源码里出现过这类调用,不说明行为好坏——一个插件读写文件 500 次和 1 次 都会被记为「读取文件」。这是能力清单,不是信任评分,也不是安全结论: 没扫出来的能力可能只是写法没被规则覆盖。
可信度
- -10声明与实物不符:client-present-undeclaredmajor:['modules/client/README.md', 'modules/client/docs/development.md', 'modules/client/lib/client.js', 'modules/client/lib/index.d.ts']
认证等级 L3
- L0静态结构与契约✓sha512-pYnvdYFWQuasAoGz… 与本地 tarball 复算一致,补丁与入口齐备,另有 1 项声明不一致(计入健康扣分)
- L1配置组合与依赖图✓跨包无 entry id 冲突,插入模块可解析,目录内 peer 满足
- L2隔离沙箱冒烟✓隔离 profile 安装成功,4.8s,层已挂载;宿主带它启动(booted)
- L3运行时健康监控✓抽样会话内未观测到外部进程 / 越界写 / 外连(2 个事件)
评分口径与作者信息
从 100 分开始按规则扣减:fail −20 / major −10 / warn −5 / minor −2;star 数、下载量、LLM 输出都不参与评分
- 维护者
- catheadowl
- 仓库
- https://github.com/CatheadOwl/dsh-extras
- 许可
- MIT
- 最后发布
- 2026-09-23
- 周下载
- 23
- star
- 0
扫描状态:已扫描。能力是事实,不是缺陷; 周下载与 star 只作参考,不参与评分。
认证等级只回答四件事:包本身是否完整可解析(L0)、能不能与别的插件组合(L1)、隔离环境里装不装得上并起得来(L2)、抽样运行时有没有异常(L3)。依赖漏洞、仓库存活、下载量都不参与评级,只作为独立信号标注。可信 ≠ 无漏洞,上架 ≠ 推荐。
| DSH peer 依赖 | 24 个cordisdsh-agentdsh-api-session-controllerdsh-api-workspace-controllerdsh-client-connectiondsh-client-localedsh-client-ui-plugin-managerdsh-client-ui-primitivesdsh-client-ui-rendererdsh-client-ui-sessiondsh-client-ui-slotsdsh-client-ui-workspace等 24 个均为 @deepseek-ai/ 下的包 |
|---|---|
| 第三方依赖 | 5 个 |
| bundle patch | ./cordis.patch.yml |
| 依赖安全公告 | 2 条,见下方 |
这个插件声明的依赖中,有 2 条已公开的安全公告 (最高等级:中):
| 等级 | 依赖包 | 编号 | 摘要 |
|---|---|---|---|
| 中 | yaml | CVE-2023-2251 | Uncaught Exception in yaml 修复版本:2.2.2 详情 |
| 低 | yaml | CVE-2026-33532 | yaml is vulnerable to Stack Overflow via deeply nested YAML collections 修复版本:1.10.3, 2.8.3 详情 |
查询的是依赖声明范围的下界(如 ^4.2.0 查 4.2.0),
不是实际安装到的版本。真正装的时候如果解析到了修复版本,就不受影响——
所以这是「可能受影响」,不是「这个插件有漏洞」。数据来自
OSV.dev。
元数据
| 主页 | https://github.com/CatheadOwl/dsh-extras#readme |
|---|---|
| 仓库最近提交 | 2026-09-23 |
| 仓库创建 | 2026-09-04 |
DSH