D

dsh-extras

github.com/CatheadOwl/dsh-extras

v0.3.2 会话与记忆 以 shell 执行命令可执行外部程序写入文件

`dsh plugin add` 一次全装,每个模块是组合里可独立开关的一行(按行 id 标识),不需要的行关掉即可,互不影响。本包与 dsh 宿主的关系、为什么要包装宿主 hook,见 docs/host.md。

作者原文(英文)

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

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

分类
session
发布
2026-09-23
版本
v0.3.2

检测报告

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

能力清单

  • 以 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_WIN32
    • modules/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-14。 命中次数只说明源码里出现过这类调用,不说明行为好坏——一个插件读写文件 500 次和 1 次 都会被记为「读取文件」。这是能力清单,不是信任评分,也不是安全结论: 没扫出来的能力可能只是写法没被规则覆盖。

依赖安全公告

这个插件声明的依赖中,有 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。

← 返回全部插件