dsh-cookie-guard

DSH PLUGIN浏览器与联网

仓库 kevindawn11-hash/dsh-cookie-guard · npm dsh-cookie-guard

浏览器与联网 L4 · 沙盒安装通过 安全审查:低风险 可信度:银 可安装插件
安装这个插件

为 DeepSeek Harness 桌面端限制 dsh-auth-* 会话 cookie 的有效期,避免 cookie 累积撑爆请求头、导致 HTTP 431 启动崩溃。

一句话选型结论

按资料字段整理

dsh-cookie-guard 是浏览器与联网类的 DSH 可安装插件,验证等级 L4 · 沙盒安装通过,安全审查为低风险,列出 4 项功能,有可直接复制的安装命令。验证通过不等于安全:插件会读写文件、执行命令或联网,装前先到仓库确认它做了什么;涉及密钥或系统权限的,建议先在隔离环境试装。

分类浏览器与联网 收录类型可安装插件 验证等级L4 · 沙盒安装通过 安全审查低风险
验证等级 L4 L4 · 沙盒安装通过
GitHub 星标 2 复刻 0 · 未关闭 issue 0
最近更新 2026-10-31 创建于 2026-10-30
README 4.6 KB 正文体量,越大说明说明书写得越细

安装

可安装插件
在 DSH 里执行,装完用 dsh plugin list 确认已挂上;标了 L4 / L5 的命令已在沙盒里真实跑通
dsh plugin --profile web add dsh-cookie-guard
  1. 1
    确认版本与运行环境

    Node.js 要求 >=22;版本不匹配时安装会报错。

  2. 2
    执行安装命令

    在 DSH 里执行上面的命令;多包仓库要注意区分具体子包名,别装错包。

  3. 3
    确认已挂载

    用 dsh plugin list 查看列表里是否出现这个插件,出现即挂载成功。

  4. 4
    试跑并检查权限

    加载后跑一个最小用例,确认它能正常工作;同时看它申请了哪些文件、命令或网络权限。

兼容 DSH 版本未标注版本不匹配时安装会报错
Node.js 要求>=22来自仓库 package.json 的 engines 字段
前置依赖无需要同时安装的同级依赖
npm 包名dsh-cookie-guard可用 npm view 查看包信息

能做什么

4 项功能
字段来自项目仓库与公开索引,中文说明由本站标注

dsh-cookie-guard:为 DeepSeek Harness 桌面端限制会话 cookie 寿命的 DSH plugin

  • 限制 cookie 有效期为 7 天
  • 声明式 bundle 补丁,无运行时代码
  • 不受应用更新影响
  • 附带独立 cookie 清理脚本

适用场景

存储联网搜索

上游标签

cordisdeepseek-harnessdshdsh-pluginplugin

验证等级与安全审查

L4 · 沙盒安装通过
自动化流程结论,不是人工审核
验证等级L4 · 沙盒安装通过安装命令在隔离沙盒内真实执行成功,无依赖错误
安全审查低风险静态分析结论,未标注不代表已通过审查
仓库健康度活跃按仓库活跃度与最近更新时间给出
可信度银综合仓库活跃度与验证结果

上面的结论来自上游最近一次自动化验证(2026-11-05): 同一套检查会在插件发新版后重跑,页面显示的是最新一次的逐项结果。

逐项检查结果

L1 · 已找到 ✓ 通过
  • L1.0_DEFAULTED_FROM_L3 由 L3 推定 默认通过——L3 安装规范已通过(全库 L3 扫描策略)
L2 · 结构化 ✓ 通过
  • L2.0_DEFAULTED_FROM_L3 由 L3 推定 默认通过——L3 安装规范已通过(全库 L3 扫描策略)
L3 · 安装规范 ✓ 通过
  • L3.1_INSTALL_COMMAND_PARSED 安装命令已解析 方式:安装规范解析
  • L3.2_DSH_VERSION_DECLARED DSH 版本已声明 方式:DSH 版本声明
L4 · 安装已测 ✓ 通过
  • L4.1_INSTALL_EXECUTED_CONFINED 受限沙盒内执行安装 方式:沙盒安装执行
  • L4.2_INSTALL_SUCCESS 沙盒安装成功 方式:沙盒安装执行
  • L4.3_ARTIFACT_CONFIRMED 安装产物已确认 方式:沙盒安装执行
L5 · 运行已测 ? 未知
  • L5.1_INSTALL_PASSED_SANDBOXED 沙盒安装通过 方式:沙盒安装执行
  • L5.2_WEB_BOOT_READY Web 启动就绪 方式:Web 启动
  • L5.3_HTTP_SERVED HTTP 服务响应 方式:HTTP 请求
  • L5.4_PLUGIN_INVENTORY_ACTIVE 插件清单中已激活 方式:插件清单查询

风险详情

  • 结论说明 静态扫描 低;动态审计无结论(以下以静态为准)→ 总评级 低。
  • 风险计数 严重 0 / 高 0

选择建议

装之前先看这几条
按条目字段给出的判断,不替你决定用不用

值得选的地方

  • 验证等级 L4:在沙盒里真实装过,依赖能装上,不是纸面声明。
  • 静态安全审查为低风险,没有发现明显可疑行为。
  • 有可直接复制的安装命令,不用自己翻文档找入口。
  • 列出了 4 项功能,能直接看出它解决什么问题。

先想清楚的地方

  • 验证通过不等于安全:插件会读写文件、执行命令或联网,装前先到仓库确认它做了什么。

更适合

  • 需要在浏览器与联网场景里给 DSH 补能力的人。
  • 想装完就能用、不想自己排依赖的人。
  • 能接受在本地装依赖、愿意自己确认权限的人。

不太适合

  • 只使用 DSH 官方内置能力、不接受第三方插件的人。

同类对比

6 个同类
同分类里挑最接近的几条,字段以各自详情页为准
插件验证等级安全审查星标兼容版本安装命令
dsh-cookie-guard当前 L4 · 沙盒安装通过 低风险 2 未标注 有
dsh-our-free-model L3 · 安装规范通过 低风险 8,796 未标注 有
dsh-web L3 · 安装规范通过 低风险 8,549 未标注 无
BrowserSkill L4 · 沙盒安装通过 低风险 8,456 未标注 有
dsh-pocket L5 · 运行验证通过 低风险 1,656 0.2.0-rc.2 等 12 个 有
Browser4 L4 · 沙盒安装通过 中风险 1,152 未标注 有

仓库档案

浏览器与联网
字段来自项目仓库与公开索引,中文说明由本站标注
作者 / 维护方kevindawn11-hash仓库 dsh-cookie-guard · 默认分支 main
分类浏览器与联网network
收录类型可安装插件声明了 dsh.bundle、可用 dsh plugin add 安装的条目
开发语言JavaScript仓库主语言
许可证MIT商用或二次分发前请确认条款原文
星标 / 复刻 / issue2 / 0 / 0收录时的数值,非实时
创建 / 更新2026-10-30 · 2026-10-31最后推送 2026-10-31
本站收录2026-10-30首次进入本站目录的时间

README 全文

4.6 KB
作者原文,中文版优先;只做安全转义,不改内容

dsh-cookie-guard


A tiny fix for DeepSeek Harness Desktop: it caps the lifetime of the desktop
browser-session cookies (dsh-auth-*) from the default 30 days to 7 days, so
stale cookies can no longer pile up and overflow the request header — a failure
that prevents the app from starting at all.

  • Declarative bundle patch only; no runtime code, no changes to the installed app,
    no Electron main-process hacks.
  • Survives app updates (it lives in your profile, not in app.asar).
  • Ships a standalone cleanup script for machines that are already stuck.

Symptom

At launch the app shows:

DeepSeek Harness is unavailable
The application could not start or stopped unexpectedly.

The diagnostic report (%APPDATA%\@deepseek-ai\dsh-desktop\logs\crash-*-host.log)
contains either:

desktop welcome: Web authentication failed

or the host logs an HTTP 431 (Request Header Fields Too Large).

Root cause

Not an account, network or plugin issue — it is unbounded cookie growth:

  1. @deepseek-ai/dsh-client-connection names its cookie
    "dsh-auth-" + sha256(host:port) — one cookie per authority, port included.
  2. The Desktop Host always launches with --port 0 (main() in
    dsh-desktop-host), so every start gets a new random port.
  3. Cookies default to cookieMaxAgeDays: 30 and nothing ever prunes them.
  4. The Electron welcome page fetches with Chromium net.fetch, which sends
    every historical dsh-auth-* cookie in one Cookie header.
  5. Node's maxHeaderSize defaults to 16 KB; one cookie is ≈200 B, so
    ~90 cookies overflow the header, the Host answers 431 and Electron throws
    desktop welcome: Web authentication failed.

Measured: 71 cookies (~12 KB) accumulated in 13 days were enough to reproduce.
At 3–5 launches/day, any long-term desktop user hits this within a month.
Web mode uses a fixed port and is unaffected — this is desktop-only, present in
both 0.2.1-rc.3 and rc.5.

Install

Requires Node.js >= 22 and a DSH build that ships the desktop profile
(0.2.1-rc.3 and later).

Option 1 — one command (recommended)

dsh plugin --profile desktop add dsh-cookie-guard

Then restart DeepSeek Harness. This is the same install path the community
plugin markets use (dsh-plugin.org, dsh-market).

Option 2 — from source

dsh plugin --profile desktop add github:kevindawn11-hash/dsh-cookie-guard

Option 3 — manual profile install

cd $env:USERPROFILE\.dsh\profiles\desktop
pnpm add dsh-cookie-guard

Append "dsh-cookie-guard" to dsh.profile.bundles in the same package.json,
then restart DeepSeek Harness.

Option 4 — cleanup only, no plugin

With DSH fully closed:

node tools/prune-cookies.mjs

The script backs up Network\Cookies, then deletes every dsh-auth-* row.
The next launch issues a fresh cookie and the app recovers.

How it works

The package is just a bundle patch:

- id: connection
config:
cookieMaxAgeDays: 7

DSH applies bundle patches after @deepseek-ai/dsh-web-app, so this overrides the
connection node's config. A 7-day lifetime means at most "launches in 7 days"
cookies (< 35, ~7 KB), far from the 16 KB ceiling, while still covering sessions
that stay open for a week.

Use 1 for a tighter cap (daily restarts, but sessions older than a day expire);
increase it if you keep the app open longer.

Verify

After a restart:

node -e &quot;const{DatabaseSync}=require(&#x27;node:sqlite&#x27;);const db=new DatabaseSync(process.env.APPDATA+&#x27;\\@deepseek-ai\\dsh-desktop\\Network\\Cookies&#x27;);console.log(db.prepare(\&quot;select name,expires_utc from cookies where name like &#x27;dsh-auth-%&#x27;\&quot;).all())&quot;

Chromium timestamps are microseconds since 1601.

Limitations

A plugin runs inside the Host process; it cannot read or delete the Electron
main process's Chromium cookie store (exclusively locked at runtime). So a plugin
can only cap growth, not clean history. A real fix belongs upstream — two minimal
options are in docs/upstream-issue.md:

  1. Electron main: remove stale dsh-auth-* cookies before host.start();
  2. Connection service: name the cookie by host hash (127.0.0.1) so each start
    overwrites the same cookie instead of adding one.

Compatibility

DSH Desktop Status
0.2.1-rc.3 reproduces, patch works
0.2.1-rc.5 reproduces, patch works

Desktop (packaged Windows/macOS) only; CLI / dsh web is unaffected.

License

MIT

常见问题

8 问
答案由本站依据条目字段整理,不引用上游原文
dsh-cookie-guard 怎么安装?

在 DSH 里执行 `dsh plugin --profile web add dsh-cookie-guard` 即可。对应的 npm 包名是 `dsh-cookie-guard`。

dsh-cookie-guard 的验证等级是什么意思?

L4 · 沙盒安装通过。安装命令在隔离沙盒内真实执行成功,无依赖错误

dsh-cookie-guard 安全吗?

低风险。静态扫描 低;动态审计无结论(以下以静态为准)→ 总评级 低。

dsh-cookie-guard 装之前要先确认什么?

先看它会读写哪些文件、执行哪些命令、连接哪些网络地址;验证等级只说明装得上、跑得起来,不等于安全。涉及密钥或系统权限的,建议先在隔离环境试装。

dsh-cookie-guard 需要什么运行环境?

Node.js >=22。环境不满足时安装会失败,建议先确认本机版本。

dsh-cookie-guard 用的是什么许可证?

上游标注为 MIT。商用或二次分发前请到仓库确认许可证原文。

dsh-cookie-guard 有哪些功能?

限制 cookie 有效期为 7 天、声明式 bundle 补丁,无运行时代码、不受应用更新影响、附带独立 cookie 清理脚本。

这条记录的数据可靠吗?

本站按仓库名去重后合并整理,字段以作者仓库与 npm 元数据为准;安装命令、仓库地址与 README 保持原文,带 L4 / L5 标记的安装命令已在隔离沙盒里真实跑通。

同名或近似条目

6 条
不同作者的仓库分开列,请确认你要装的是哪一个
浏览器与联网
按星标排序,可作替代方案

dsh-our-free-model

dsh-our-free-model

在 DeepSeek Harness 中装上这个 DSH plugin,无需登录、注册或填 API Key,即可直接调用 DeepSeek

L3 · 安装规范通过 8,796 星

dsh-web

dsh-web

侧边栏多列任务看板:卡片交给真实 DSH 智能体会话执行,支持 cron 定时(Host 侧到点执行,关浏览器也生效)。

L3 · 安装规范通过 8,549 星

BrowserSkill

BrowserSkill

BrowserSkill 的 DeepSeek Harness 浏览器自动化桥接插件,通过原生浏览器工具控制可见的 Chrome 和 Edg

L4 · 沙盒安装通过 8,456 星

dsh-pocket

dsh-pocket

DSH Pocket 让 DeepSeek Harness 装进口袋:电脑跑 dsh web,手机扫码即实时同步访问(局域网+公网),人在外

L5 · 运行验证通过 1,656 星

Browser4

Browser4

L4 · 沙盒安装通过 1,152 星

agentrq

agentrq

L4 · 沙盒安装通过 1,140 星

插件的元信息来自作者仓库;分类、验证等级与安全结论的中文说明为中文整理,最近核验 2026-11-05。