Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

dsh-git-forge

Latest version: v1.2.4

Overview

Last scanned
23 Nov 2026
Published
23 Nov 2026
npm package Publisher: omsociety
6 Stars
2 Forks
7 Versions
2.5K Downloads
JavaScript Repo language

Scan summary

dsh-git-forge was last scanned on 23 Nov 2026 at version 1.2.4. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 7 versions; the latest 2 were published within 2 days (22 and 23 Nov 2026).
  • Findings: No rules fired in version 1.2.4.
  • Downloads: 2,490 downloads.

Versions

7 versions published
Versions and the rules that fired in each
VersionPublishedStatus
1.2.4 LATEST 23 Nov 2026 No rules fired
1.2.3 22 Nov 2026 No rules fired
1.2.2 1 Nov 2026 No rules fired
1.2.1 31 Oct 2026 Not shown
1.2.0 9 Oct 2026 Not shown

No rules fired in 1.2.4

Findings

Findings for v1.2.4. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 1.2.4; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

这是什么 • 效果 • 安装方式 • 侧栏 • 模型工具 • 数据放在哪 • 安全 • 环境要求 • 开发 • 支持与致谢 • 许可证与作者

这是什么

DSH Git Forge 是 DeepSeek Harness 的社区插件,在 DSH 官方右侧栏里给你一个 Forge 账号库 + 按项目授权 + 推送策略 的管理面。

它管两件事:

  • agent 用哪份凭据:在侧栏给项目授权账号之后,agent shell 里的 HTTPS git fetch / git push 由本插件的 credential helper 自动取用对应 token,token 只在宿主侧读,不进模型上下文。
  • 这个项目允许推到哪:未授权 host 会被 push 拦截器在工具层直接拒绝;裸 git push 与 git push origin 会先解析 remote URL 再判定。

SSH 远程与系统 gh auth 不受影响,仍走本机 SSH / gh;本插件只补 DSH agent shell 下的 HTTPS 这一段。

效果

安装方式

从 npm 安装

# 先停掉正在运行的 DSH(运行中的服务会锁住依赖,装完再起)
dsh plugin --profile <profile> add "dsh-git-forge@1.2.4"

提示:装好后刷新一下浏览器页面,「Git 凭据」从右侧栏的引导页打开——只重启宿主不够,客户端产物是页面加载时取的。

装完怎么用

  1. 打开右侧栏「Git 凭据」→ 账号库 加一个账号(token 只在侧栏里填,不进对话)
  2. 点探测确认这个 token 有效
  3. 切到 项目授权 → 勾上该账号并保存,当前工作区就拿到了推送凭据
  4. 让 agent 在项目里跑 HTTPS 的 git fetch / git push,凭据由 helper 自动注入,模型看不到 token
  5. 反过来试一个未授权的 host:让 agent 推过去,应当被 push 拦截器直接拒绝

侧栏

侧栏只有一个 Tab,内部三页:

页面 作用
项目授权 当前项目可用的账号,以及是否 enforcePush
账号库 账号增删改、探测 API token;账号按 gitHost 归集,界面给出 github.com / gitee.com / gitlab.com / bitbucket.org 常用选项,自建 Forge 直接填自己的域名
策略状态 当前允许的 gitHost,以及未绑定项目的默认策略

模型工具

动作 作用 参数
GitForge action=list_accounts 列出账号库(不含 token) 无
GitForge action=list_project_accounts 列出某项目已授权的账号 project_path
GitForge action=get_policy 看该项目策略:授权账号、是否 enforcePush、未绑定项目默认 project_path
GitForge action=check_remote 校验某个 remote URL 是否被允许推送(不推送) url(必填)
Agent HTTPS 与项目路径
  • 授权 key = DSH 会话工作区(agent shell 里注入 DSH_GIT_FORGE_PROJECT),不是子仓路径;工作区路径按磁盘实态归一(realpath),Windows 8.3 短名与符号链接折叠到同一 key
  • helper 找项目:env → cwd 精确匹配 → 向父目录 walk(cwd 在 /workspace 下时上界为 /workspace,否则走到根)
  • R1:同一 host 仅当恰好 1 个已授权 token 账号时才自动注入凭据
  • agent shell 的 GIT_CONFIG_GLOBAL 指向 $DSH_HOME/git-forge/gitconfig;文件第一行 include 回接你的用户级 gitconfig(user.name / user.email / http.proxy 等照常生效),随后一条空 credential.helper 清掉系统级 helper,再挂本插件 helper——系统凭据管理器的弹窗不会卡住无头 shell,用户自己配的 helper 也会被同样清掉

数据放在哪

$DSH_HOME/git-forge/(目录 0700;0600/0700 权限仅在 POSIX(Linux/macOS)生效,Windows 无等效收紧):

文件 内容
accounts.json 账号元数据(不含 token)
secrets.json token(0600)
grants.json projectPathKey → accountIds[] 与 enforce / unbound 策略
gitconfig 注入给 agent shell 的 credential helper 配置(不含凭据)

注意:accounts.json / secrets.json / grants.json 若解析失败,坏文件会被改名保留为 <原名>.corrupt-<时间戳> 并回退默认值,不会覆盖丢失现场。

安全

  • token 不出现在 API 结果、工具结果与模型上下文里
  • push 策略在 Host tools.guard 中硬拦截,不依赖模型自觉:命令里的 URL、裸 git push、git remote add / set-url 都按授权判定
  • 未给项目配置任何授权时,push 拦截器默认不拦截(便于渐进启用),helper 也不会凭空给出凭据
  • token 只落在宿主侧数据目录 secrets.json;helper 是由 git 拉起的独立进程,按需读取;token 不进模型上下文。secrets.json 疑似泄露请立即轮换 token
  • 侧栏 API 在解析 URL、读取正文、访问账号或授权数据及业务分派之前完成宿主准入校验。旧宿主(@deepseek-ai/dsh-client-connection \<= 0.2.2-rc.5)仍调用 connection.requestRejection,401 / 403 按原状态码结束响应;新宿主(>= 0.2.3-alpha.1)已由 WebServer 完成准入,handler 复用传入的 Peer 并要求 principal.kind === 'owner',无 Peer 或非 owner 一律 403
  • push 检测基于命令文本启发式,已知绕过面(env 变量改名 git、git alias、路径经变量拼接、非 bash/sh 包装器、time/nice 等未覆盖前缀);这一边界是明示的检测口径,不是放行依据
  • 配置了授权的项目里,裸 git push 的 remote 解析失败会重试一次,仍失败即拒绝(fail-closed)

环境要求

  • DSH profile(desktop 与服务器自建均可);插件不声明 DSH 版本要求,装进哪个宿主就在哪个宿主上跑
  • Node.js >= 20

开发

npm test                      # 27 项离线自检(scripts/smoke-test.mjs)
npm run check                 # 语法 + 自检
npm run build:preview          # 重出 docs/ 下的侧栏预览图(需本机 Chrome,CHROME_PATH 可指定)
DSH_PROFILE=desktop bash scripts/sync-to-dsh.sh   # 以 link: 方式把本仓库接入 DSH profile(开发用)

目录与「改东西去哪」:

lib/index.js            宿主入口:工具注册、/dsh-git-forge/api 路由、push 拦截、credential helper 配置
lib/client.js           客户端 bundle(已入库;dsh plugin add 不做构建)
lib/shared/             宿主与客户端共用纯函数:path / git-policy / remote-resolve / credential-select / account-summary
docs/preview/           预览输入:fixture.json 为虚构数据,panel.html 与 docs/panel-*.png 由 build:preview 生成
scripts/                install.sh · install.ps1 · sync-to-dsh.sh · smoke-test.mjs · git-credential helper
cordis.patch.yml        包内 bundle patch,CLI 据此写入 dsh.profile.bundles

支持与致谢

  • 如果这个插件对你有帮助,欢迎点亮 Star;有问题或建议请提 Issue 或 Pull Request。
  • 变更记录见 CHANGELOG。
  • dsh-ssh-tunnel:同门插件,主机库与侧栏交互与本案对齐
  • DeepSeek Harness:插件、工具与 agent shell 的宿主

许可证与作者

MIT。上游项目与代码作者 @thirsty5034;本仓库的维护与新增部分 © 2026 @OMSociety。

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • npm dsh-git-forge

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Cry2Wolf: How to Tell a Real Bug from a Nothingburger
AI & VibeSec

Cry2Wolf: Not Every Branded Bug Deserves a Fire Drill

PolinRider Returns
Research

PolinRider Returns: Hijacked npm Packages Use Ethereum Blockchain to Conceal Malware Infrastructure

Ethersphere Hijacked With Crypto Stealing Malware (1)
npm

Ethersphere Hijacked With Crypto Stealing Malware Via Github & npm

Frame 2085668439 (1)
Group 1261154229