D

dsh-cost-meter

github.com/Saikel-Orado-Liu/dsh-cost-meter

v0.5.1 模型与账号 发起网络请求动态执行代码R013 清单可疑

本插件已发布到 npm:`@gamegeek-saikel/dsh-cost-meter`,以官方 DSH 插件 bundle 形态交付(单个 `cordis.patch.yml` 行同时挂载 host 与浏览器两半)。

作者原文(英文)

Cost tracking plugin for the DeepSeek Harness Web GUI — snapshot-anchored per-turn pricing, account balance, and live cost estimates.

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

deepseekdshdsh-plugincost-trackingpricingtoken-metertypescriptreact
分类
model
发布
2026-10-02
版本
v0.5.1

检测报告

有一定能力。命中了若干能力模式,大多是插件正常工作时会用到的。
3需留意3一般18未命中
高关注需留意一般

能力清单

  • 发起网络请求network需留意15 处命中
    • …ypes/client/AssistantCostChip.js:59void fetch(`/cost-meter?currency=${currency}`, { cache: 'no-store' })
    • lib/client.js:731fetch(endpoint, { cache: "no-store" }).then((res) => {
    • lib/client.js:936fetch(`/cost-meter?session=${encodeURIComponent(sessionId)}&currency=${currency}`, { cache: "no-store" }).then((res) => …
    • lib/client.js:1195fetch(`/cost-meter?currency=${currency}`, { cache: "no-store" }).then((res) => res.ok ? res.json() : null).then((data) =…
    • 看请求发往哪些域名。发往作者自己的后端是常见做法。
  • 动态执行代码dynamic-code需留意1 处命中
    • lib/index.js:298schema.callback = new Function("return " + schema.callback)();
    • 看 eval / new Function 的入参来自哪里。常量字符串和用户输入是两回事。
  • R013 清单可疑manifest-obfuscation需留意1 处命中
    • 安装脚本: prepare
    • 清单被刻意写乱时,加载行为会难以预测。看原文而不是看渲染结果。
  • 接触凭据或密钥credentials一般76 处命中
    • lib/index.js:1import { credentialRef } from "@deepseek-ai/dsh-credentials";
    • lib/index.js:2740/** Default credential reference, matching the llm-deepseek adapter. */
    • lib/index.js:2741const DEFAULT_API_KEY_ENV = "DEEPSEEK_API_KEY";
    • lib/index.js:2804apiKeyEnv: Schema.string().role("credential-ref").default(DEFAULT_API_KEY_ENV),
    • 看它读取哪些凭据、发往哪里。用于登录自己的服务是正常的。
  • 动态加载模块dynamic-import一般10 处命中
    • …es/client/AssistantCostChip.d.ts:15export declare const AssistantCostChip: import("react").MemoExoticComponent<({ messageId, useProjection, t }: AssistantC…
    • …types/client/CostPluginCard.d.ts:11export declare const CostPluginCard: import("react").MemoExoticComponent<({ view, form, t }: CostPluginCardProps) => imp…
    • lib/types/client/CostView.d.ts:9export declare const CostView: import("react").MemoExoticComponent<({ useProjection, sessionId, t }: CostViewProps) => i…
    • …ypes/client/SessionCostLine.d.ts:17export declare const SessionCostLine: import("react").MemoExoticComponent<({ useProjection, sessionId, t }: SessionCostL…
    • 动态导入本身无害,但会让依赖关系难以静态审阅。
  • 读取环境变量reads-env一般3 处命中
    • lib/index.js:2873const ambient = process.env[env];
    • lib/types/index.js:177const ambient = process.env[env];
    • src/index.ts:269const ambient = process.env[env]
    • 环境变量里常混有密钥。看它是否把整个 env 都读走。
逐条扫描明细
能力标识关注度命中次数
发起网络请求network需留意15
动态执行代码dynamic-code需留意1
R013 清单可疑manifest-obfuscation需留意1
接触凭据或密钥credentials一般76
动态加载模块dynamic-import一般10
读取环境变量reads-env一般3

这份报告的口径

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

依赖安全公告

这个插件声明的依赖中,有 1 条已公开的安全公告 (最高等级:低):

等级依赖包编号摘要
低zodCVE-2023-4316Zod denial of service vulnerability
修复版本:3.22.3 详情 →

查询的是依赖声明范围的下界(如 ^4.2.0 查 4.2.0), 不是实际安装到的版本。真正装的时候如果解析到了修复版本,就不受影响—— 所以这是「可能受影响」,不是「这个插件有漏洞」。数据来自 OSV.dev。

← 返回全部插件