D

dsh-host-apiproxy

github.com/deepseek-ai/deepseek-harness

v0.0.1-rc.1 模型与账号 写入文件发起网络请求

所有客户端共享的 API 网关,由三部分组成:TypeScript API 契约(`src/api/`,零 Node 依赖,可从浏览器导入)、fetch 载体对(`src/fetch/`:宿主侧的 `toFetchHandler`,客户端侧的 `AbstractApiClient` 及平台子类),以及宿主侧实现(`src/api-proxy.ts`:`createApiProxy` 加上默认导出的 `ApiProxyService` 网

作者原文(英文)

API gateway: the ApiProxy contract (api/), the fetch carrier pair (fetch/), and the host-side gateway plugin providing ctx.apiProxy

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

分类
model
发布
2026-08-10
版本
v0.0.1-rc.1

检测报告

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

能力清单

  • 写入文件writes-files需留意16 处命中
    • lib/types/api-proxy.js:1226await mkdir(cwd, { recursive: true });
    • lib/types/api-proxy.js:1855async rename(request) {
    • lib/types/api-proxy.js:1865const accepted = titles.rename(found.agent.session, title);
    • lib/types/api-proxy.js:2330async rename(request) {
    • 看写入位置。写自己的配置目录是正常的,写系统目录不是。
  • 发起网络请求network需留意6 处命中
    • lib/types/fetch/client.js:197* SSE protocol path: streaming fetch (not EventSource), '\n\n' framing, ServerRequest envelope +
    • lib/types/fetch/client.js:356return this.handler.fetch(input, init);
    • lib/types/fetch/client.js:362this.handler.fetch(input, init)
    • lib/types/fetch/handler.js:169* @returns an object holding `fetch(Request)`; paths outside /api/ return 404.
    • 看请求发往哪些域名。发往作者自己的后端是常见做法。
  • 接触凭据或密钥credentials一般256 处命中
    • lib/types/api-proxy.js:23// The settings/credentials seams: brand guards run at this wire boundary; the
    • lib/types/api-proxy.js:27import { credentialRef } from '@deepseek-ai/dsh-credentials';
    • lib/types/api-proxy.js:1458/** Missing-service report shared by the credentials domain. */
    • lib/types/api-proxy.js:1459function credentialsAbsent() {
    • 看它读取哪些凭据、发往哪里。用于登录自己的服务是正常的。
  • 动态加载模块dynamic-import一般70 处命中
    • …es/api/agent-presets.schema.d.ts:32sessionId: z.ZodType<import("@deepseek-ai/dsh-session").SessionId, unknown, z.core.$ZodTypeInternals<import("@deepseek-a…
    • …/types/api/approvals.schema.d.ts:12sessionId: z.ZodType<import("@deepseek-ai/dsh-session").SessionId, unknown, z.core.$ZodTypeInternals<import("@deepseek-a…
    • lib/types/api/commands.schema.d.ts:17sessionId: z.ZodType<import("@deepseek-ai/dsh-session").SessionId, unknown, z.core.$ZodTypeInternals<import("@deepseek-a…
    • lib/types/api/commands.schema.d.ts:31sessionId: z.ZodType<import("@deepseek-ai/dsh-session").SessionId, unknown, z.core.$ZodTypeInternals<import("@deepseek-a…
    • 动态导入本身无害,但会让依赖关系难以静态审阅。
  • 读取环境变量reads-env一般6 处命中
    • lib/index.js:414const env = internals.env ?? process.env;
    • lib/index.js:438const env = internals.env ?? process.env;
    • lib/index.js:474const env = internals.env ?? process.env;
    • lib/types/native-path-opener.js:72const env = internals.env ?? process.env;
    • 环境变量里常混有密钥。看它是否把整个 env 都读走。
逐条扫描明细
能力标识关注度命中次数
写入文件writes-files需留意16
发起网络请求network需留意6
接触凭据或密钥credentials一般256
动态加载模块dynamic-import一般70
读取环境变量reads-env一般6

这份报告的口径

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

依赖安全公告

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

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

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

← 返回全部插件