D

dsh-chat-cost

github.com/igormel81/dsh-chat-cost

v0.6.11 模型与账号 以 shell 执行命令可执行外部程序含混淆或编码代码

DeepSeek Harness (dsh) plugin: live token cost of every chat, its subagents and the whole session tree, the price of each finished answer in the transcript, budget planning that packs a work plan under a money limit, and scenario comparison that names whi

该插件尚未翻译,显示作者原文。

anthropicbudgetbudgetingcache-readcache-writeclaudecordiscost
分类
model
发布
2026-09-22
版本
v0.6.11

检测报告

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

能力清单

  • 以 shell 执行命令shell-exec高关注4 处命中
    • scripts/reconcile.mjs:94const listing = execFileSync('unzip', ['-Z1', target], { encoding: 'utf8' }).trim().split('\n')
    • scripts/reconcile.mjs:108return readCsv(execFileSync('unzip', ['-p', archive.zip, name], { encoding: 'utf8', maxBuffer: 64 * 1024 * 1024 }))
    • scripts/reconcile.mjs:129return execFileSync('zstd', ['-dc', file], { encoding: 'utf8', maxBuffer: 512 * 1024 * 1024 })
    • test/reconcile.test.mjs:96const stdout = execFileSync('node', [SCRIPT, ...args], { encoding: 'utf8' })
    • 看命令字符串是拼出来的还是写死的。拼接用户输入才是真正的风险。
  • 可执行外部程序spawns-processes高关注3 处命中
    • scripts/prose-check.mjs:35import { spawnSync } from 'node:child_process'
    • scripts/reconcile.mjs:36import { execFileSync } from 'node:child_process'
    • test/reconcile.test.mjs:12import { execFileSync } from 'node:child_process'
    • 看它调用哪些程序。调用本机已有的工具是常见做法。
  • 含混淆或编码代码obfuscated-code需留意34 处命中
    • lib/client.js:137title: "token \u8d39\u7528\u4f30\u7b97\uff08\u5185\u7f6e\u4f9b\u5e94\u5546\u4ef7\u683c\u76ee\u5f55\uff09",
    • lib/client.js:143unpriced: (count) => "\u6709 " + count + " \u4e2a\u4f1a\u8bdd\u5728\u76ee\u5f55\u4e2d\u6ca1\u6709\u4ef7\u683c\uff0c\u672…
    • lib/client.js:150planDeferred: (count) => count + " \u4e2a\u5355\u5143\u672a\u80fd\u7eb3\u5165\u9884\u7b97",
    • lib/client.js:152savings: (usd) => "\u6539\u7528\u8db3\u591f\u4fbf\u5b9c\u7684\u6a21\u578b\u53ef\u7701 $" + usd,
    • 混淆本身不是恶意,但公开源码里出现大段混淆值得问一句为什么。
  • 写入文件writes-files需留意24 处命中
    • lib/log.js:175await mkdir(dir, { recursive: true })
    • lib/log.js:178await appendFile(file, payload, 'utf8')
    • lib/log.js:218await writeFile(file, prefix + entry + '\n', 'utf8')
    • lib/plan.js:38await mkdir(dirname(file), { recursive: true })
    • 看写入位置。写自己的配置目录是正常的,写系统目录不是。
  • 发起网络请求network需留意2 处命中
    • lib/client.js:64entry.inflight = window.fetch(SUMMARY_PATH + "?sessionId=" + encodeURIComponent(entry.sessionId) + "&language=" + langua…
    • scripts/build-prices.mjs:65const response = await fetch(SOURCE, { headers: { 'user-agent': 'dsh-chat-cost price snapshot' } })
    • 看请求发往哪些域名。发往作者自己的后端是常见做法。
  • 动态执行代码dynamic-code需留意2 处命中
    • test/client.test.mjs:19new Function('window', source)(window)
    • test/widget.test.mjs:37new Function('window', 'document', source)(window, document)
    • 看 eval / new Function 的入参来自哪里。常量字符串和用户输入是两回事。
  • 读取文件reads-files一般67 处命中
    • lib/index.js:52catalog = JSON.parse(readFileSync(file, 'utf8'))
    • lib/index.js:683logPath = existsSync(file) ? file : null
    • lib/log.js:211text = await readFile(file, 'utf8')
    • lib/log.js:403text = await readFile(path, 'utf8')
    • 读文件是绝大多数插件的正常工作方式,本身不构成顾虑。
  • 动态加载模块dynamic-import一般11 处命中
    • lib/log.js:170const { mkdir, appendFile } = await import('node:fs/promises')
    • lib/log.js:171const { join } = await import('node:path')
    • lib/log.js:187const { stat } = await import('node:fs/promises')
    • lib/log.js:188const { join } = await import('node:path')
    • 动态导入本身无害,但会让依赖关系难以静态审阅。
  • 接触凭据或密钥credentials一般2 处命中
    • test/reconcile.test.mjs:79'user_id,start_time_iso,end_time_iso,model,api_key_name,api_key,type,price,amount',
    • 看它读取哪些凭据、发往哪里。用于登录自己的服务是正常的。
逐条扫描明细
能力标识关注度命中次数
以 shell 执行命令shell-exec高关注4
可执行外部程序spawns-processes高关注3
含混淆或编码代码obfuscated-code需留意34
写入文件writes-files需留意24
发起网络请求network需留意2
动态执行代码dynamic-code需留意2
读取文件reads-files一般67
动态加载模块dynamic-import一般11
接触凭据或密钥credentials一般2

这份报告的口径

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

依赖安全公告

已查询这个插件声明的全部依赖,没有匹配到已公开的安全公告。(含 DSH 框架包在内的 @deepseek-ai/* 不作查询——那是运行时自己的问题,不是插件的。)

← 返回全部插件