浏览全部

工具与效率 · v2.0.1

dsh-plugin-writing-guard

github.com/xmutfyh/dsh-plugin-writing-guard

能力以 shell 执行命令写入文件启动伪终端

少解释,多论证。保留科学内容。

作者原文(英文)

Less explanation. More argument. Preserve the science.

简介取自插件 README 开头,由 DeepSeek 模型翻译,仅供参考。

academic-writingscientific-writingresearch-paperai-writingscientific-integrityjournal-fitdeepseek-harnessdocx
认证 L1已扫描 ✓健康 A/90周下载 760
7 项能力
许可
MIT
发布
2026-09-04
维护者
xmutfyh
插件 ID
2383

安装命令

dsh plugin --profile web add dsh-plugin-writing-guard@2.0.1

强装后仍失败

即使绕过版本门禁,这个包装上之后仍然失败。说明问题不只是版本对齐,包本身在当前环境里也跑不起来。

检测报告

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

能力清单

  • 以 shell 执行命令shell-exec高关注1 处命中
    • scripts/install-extras.mjs:79execSync(`${cmd} -c "import docx; print(docx.__version__)"`, { stdio: 'pipe' })
    • 看命令字符串是拼出来的还是写死的。拼接用户输入才是真正的风险。
  • 写入文件writes-files需留意7 处命中
    • lib/index.js:139await fs.mkdir(dir, { recursive: true });
    • lib/index.js:141await fs.writeFile(tmp, JSON.stringify(data, null, 2), 'utf8');
    • lib/index.js:142await fs.rename(tmp, stateFile);
    • lib/index.js:659await fs.writeFile(tmpFile, replacementsJson, 'utf8');
    • 看写入位置。写自己的配置目录是正常的,写系统目录不是。
  • 启动伪终端spawns-pty需留意1 处命中
    • scripts/install-extras.mjs:79execSync(`${cmd} -c "import docx; print(docx.__version__)"`, { stdio: 'pipe' })
    • 伪终端等于给了一个完整 shell。确认这是插件的核心功能。
  • 清单可疑manifest-obfuscation需留意1 处命中
    • 安装脚本:postinstall
    • 清单被刻意写乱时,加载行为会难以预测。看原文而不是看渲染结果。
  • 读取文件reads-files一般14 处命中
    • lib/index.js:74const raw = await fs.readFile(stateFile, 'utf8');
    • lib/index.js:173return fs.readFile(filePath, 'utf8');
    • lib/index.js:287const bibs = (await fs.readdir(dir)).filter((f) => f.toLowerCase().endsWith('.bib'));
    • lib/index.js:289bibText = await fs.readFile(path.join(dir, bibs[0]), 'utf8');
    • 读文件是绝大多数插件的正常工作方式,本身不构成顾虑。
  • 读取环境变量reads-env一般9 处命中
    • lib/index.js:154const pythonCmd = process.env.DSH_PYTHON ?? 'python3';
    • lib/index.js:551const candidates = process.env.DSH_PYTHON
    • lib/index.js:552? [process.env.DSH_PYTHON]
    • scripts/install-extras.mjs:19if (process.env.DSH_HOME) return process.env.DSH_HOME
    • 环境变量里常混有密钥。看它是否把整个 env 都读走。
  • 动态加载模块dynamic-import一般5 处命中
    • lib/index.js:153const { execFile } = await import('node:child_process');
    • lib/index.js:549const { execFile } = await import('node:child_process');
    • scripts/install-extras.mjs:69const { execSync } = await import('node:child_process')
    • src/word_guard/__init__.py:12from .editor import (
    • 动态导入本身无害,但会让依赖关系难以静态审阅。
逐条扫描明细
能力标识关注度命中次数
以 shell 执行命令shell-exec高关注1
写入文件writes-files需留意7
启动伪终端spawns-pty需留意1
清单可疑manifest-obfuscation需留意1
读取文件reads-files一般14
读取环境变量reads-env一般9
动态加载模块dynamic-import一般5

这份报告的口径

扫描读的是包里的源码,全程不执行第三方代码。 本次读了 23 个文件,扫描于 2026-10-16。 命中次数只说明源码里出现过这类调用,不说明行为好坏——一个插件读写文件 500 次和 1 次 都会被记为「读取文件」。这是能力清单,不是信任评分,也不是安全结论: 没扫出来的能力可能只是写法没被规则覆盖。

可信度

90 健康分 A 扣分项下方逐条附证据
  • -10声明与实物不符:peer-static-import-unsatisfiedmajor:{'@deepseek-ai/dsh-tools': '^0.1.0-rc.6', '@deepseek-ai/dsh-llm': '^0.1.0-rc.6'}

认证等级 L1

  • L0静态结构与契约✓sha512-k71MEGo3i+0HnQPz… 与本地 tarball 复算一致,补丁与入口齐备,另有 1 项声明不一致(计入健康扣分)
  • L1配置组合与依赖图✓跨包无 entry id 冲突,插入模块可解析,目录内 peer 满足
  • L2隔离沙箱冒烟—试装未通过(force-failed)
  • L3运行时健康监控—未抽样(本层是抽样检测:没有会话不等于干净)
评分口径与作者信息

从 100 分开始按规则扣减:fail −20 / major −10 / warn −5 / minor −2;star 数、下载量、LLM 输出都不参与评分

维护者
xmutfyh
仓库
https://github.com/xmutfyh/dsh-plugin-writing-guard
许可
MIT
最后发布
2026-09-04
周下载
760
star
46

扫描状态:已扫描。能力是事实,不是缺陷; 周下载与 star 只作参考,不参与评分。

认证等级只回答四件事:包本身是否完整可解析(L0)、能不能与别的插件组合(L1)、隔离环境里装不装得上并起得来(L2)、抽样运行时有没有异常(L3)。依赖漏洞、仓库存活、下载量都不参与评级,只作为独立信号标注。可信 ≠ 无漏洞,上架 ≠ 推荐。

DSH peer 依赖3 个cordisdsh-llmdsh-tools均为 @deepseek-ai/ 下的包
Node 要求>=18
第三方依赖0 个(纯自包含)
bundle patch./cordis.patch.yml
依赖安全公告已查询全部依赖,没有匹配到已公开的安全公告(含 DSH 框架包在内的 @deepseek-ai/* 不作查询——那是运行时自己的问题,不是插件的。)

元数据

主页https://github.com/xmutfyh/dsh-plugin-writing-guard#readme
仓库最近提交2026-10-05
仓库创建2026-08-15

返回首页