D

dsh-browser

github.com/anweat/dsh-browser

v0.2.1 开发与运行时 可执行外部程序以 shell 执行命令写入文件

本地整合候选的修复、工具清单与安全边界见 AUDIT.md。`allowedDomains` 只限制认证状态装载,不是网络防火墙或 Agent 隔离边界。

作者原文(英文)

Self-contained browser runtime plugin for DeepSeek Harness (scoped @anweat) — bundles Playwright (chromium) and OpenCLI as plugin-local dependencies (with global-reuse fallback), exposes a `browser` service and interactive browser tools.

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

dshdeepseek-harnesspluginbrowserplaywrightopencli
分类
dev
发布
2026-10-05
版本
v0.2.1

检测报告

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

能力清单

  • 可执行外部程序spawns-processes高关注4 处命中
    • lib/deps.js:18import { spawn, execFileSync } from 'node:child_process';
    • scripts/dump-prompts.mjs:16import { spawnSync } from 'node:child_process'
    • scripts/install-browser.mjs:7import { spawnSync } from 'node:child_process'
    • scripts/measure-tool-surface.mjs:21import { spawnSync } from 'node:child_process'
    • 看它调用哪些程序。调用本机已有的工具是常见做法。
  • 以 shell 执行命令shell-exec高关注1 处命中
    • lib/deps.js:29cachedGlobalRoot = execFileSync('npm', ['root', '-g'], { encoding: 'utf8', windowsHide: true, timeout: 15000 }).trim();
    • 看命令字符串是拼出来的还是写死的。拼接用户输入才是真正的风险。
  • 写入文件writes-files需留意11 处命中
    • lib/automation-assets.js:606fs.mkdirSync(this.policy.directory, { recursive: true });
    • lib/automation-assets.js:608fs.writeFileSync(temporary, JSON.stringify(this.state, null, 2), { encoding: 'utf8', mode: 0o600 });
    • lib/automation-assets.js:609fs.renameSync(temporary, this.statePath);
    • lib/browser-service.js:522fs.mkdirSync(path.dirname(session.profile.storageStatePath), { recursive: true });
    • 看写入位置。写自己的配置目录是正常的,写系统目录不是。
  • 动态执行代码dynamic-code需留意4 处命中
    • lib/automation-v2.js:528const rows = await target.locator('a[href]').evaluateAll(new Function('anchors', 'limit', 'return anchors.slice(0, limit…
    • lib/locator.js:156const rows = await locator.evaluateAll(new Function('els', `return (${SUMMARIZE})(els)`));
    • lib/observe.js:90const run = new Function('el', 'opts', `return (${OBSERVE_SOURCE})(el, opts)`);
    • lib/observe.js:93const IDENTITY = new Function('els', `return (${IDENTITY_SOURCE})(els)`);
    • 看 eval / new Function 的入参来自哪里。常量字符串和用户输入是两回事。
  • 发起网络请求network需留意1 处命中
    • scripts/check-host-rpc.mjs:38const request = (signed, method = 'snapshot') => fetch(base + '/dsh-browser-assets/' + method, {
    • 看请求发往哪些域名。发往作者自己的后端是常见做法。
  • 接触凭据或密钥credentials一般197 处命中
    • lib/activation-rules.js:12* How many different input sets the credential's passing test covered: its passed sets, one for a plain single run,
    • lib/activation-rules.js:13* and enough for any requirement when it is a `legacy` credential synthesized from data written before input sets
    • lib/activation-rules.js:16export function inputSetsCovered(credential) {
    • lib/activation-rules.js:17if (credential.legacy)
    • 看它读取哪些凭据、发往哪里。用于登录自己的服务是正常的。
  • 读取文件reads-files一般23 处命中
    • lib/auth-profiles.js:23if (!fs.existsSync(profile.storageStatePath)) {
    • lib/auth-profiles.js:27else if (!fs.statSync(profile.storageStatePath).isFile()) {
    • lib/automation-assets.js:596if (!fs.existsSync(this.statePath))
    • lib/automation-assets.js:599return persistedState(JSON.parse(fs.readFileSync(this.statePath, 'utf8')));
    • 读文件是绝大多数插件的正常工作方式,本身不构成顾虑。
  • 动态加载模块dynamic-import一般11 处命中
    • lib/actions/runtime.js:14const { describePrompts } = await import("../prompts.js");
    • scripts/check-host-rpc.mjs:13const load = name => import(pathToFileURL(require.resolve(name)).href)
    • scripts/dump-prompts.mjs:28const { promptsDumpText } = await import(pathToFileURL(path.join(root, 'src/prompts.ts')).href)
    • scripts/measure-tool-surface.mjs:42const { registerTools } = await import(pathToFileURL(path.join(root, 'src/tools.ts')).href)
    • 动态导入本身无害,但会让依赖关系难以静态审阅。
  • 读取环境变量reads-env一般4 处命中
    • lib/automation-assets.js:23const home = process.env.DSH_HOME ?? path.join(os.homedir(), '.dsh');
    • lib/config.js:121const home = process.env.DSH_HOME ?? path.join(os.homedir(), '.dsh');
    • lib/deps.js:32cachedGlobalRoot = path.join(process.env.APPDATA ?? '', 'npm', 'node_modules');
    • lib/deps.js:160const env = { ...process.env, ...opts.env };
    • 环境变量里常混有密钥。看它是否把整个 env 都读走。
逐条扫描明细
能力标识关注度命中次数
可执行外部程序spawns-processes高关注4
以 shell 执行命令shell-exec高关注1
写入文件writes-files需留意11
动态执行代码dynamic-code需留意4
发起网络请求network需留意1
接触凭据或密钥credentials一般197
读取文件reads-files一般23
动态加载模块dynamic-import一般11
读取环境变量reads-env一般4

这份报告的口径

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

依赖安全公告

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

← 返回全部插件