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-jev-guard

Latest version: v0.6.0

Overview

Last scanned
23 Nov 2026
Published
23 Nov 2026
npm package Publisher: dr7s
3 Stars
0 Forks
8 Versions
2.1K Downloads
JavaScript Repo language

Scan summary

dsh-jev-guard was last scanned on 23 Nov 2026 at version 0.6.0. Risk score 40 of 100 (medium). No malicious behavior was detected.

  • Releases: 8 versions; the latest was published on 23 Nov 2026.
  • Findings: 1 rule fired in version 0.6.0 (1 medium). The score describes this version only.
  • Downloads: 2,125 downloads.

Versions

8 versions published
Versions and the rules that fired in each
VersionPublishedStatus
0.6.0 LATEST 23 Nov 2026 1 rule fired
0.5.9 7 Nov 2026 No rules fired
0.5.8 5 Nov 2026 No rules fired
0.5.7 21 Oct 2026 Not shown
0.5.6 17 Oct 2026 Not shown

Rules fired in 0.6.0: 1

Findings

1 Medium

Findings for v0.6.0. 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.

Windows event logs cleared, including the Security and PowerShell logs

Code clears the Windows event logs (wevtutil cl, Clear-EventLog) while naming the Security, PowerShell, Defender or Sysmon logs, or every log it enumerates. Those logs are what an investigation reads first, and clearing them removes the record of what ran on the machine. System cleaners and some admin scripts do it on purpose, so on its own it only calls for a review.

MEDIUM
Checking access…

🔒 Create a free account to see all 1 finding with descriptions and instance counts

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

README

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

dsh-jev-guard

license: MIT node DSH plugin topic: dsh-plugin platform version npm downloads selftest last commit stars

English | 简体中文 | 更新日志 | 设计取舍 | 实测数据

给 DeepSeek Harness (DSH) 用的执行前安全阀门:在命令真正跑起来之前,先问一次"它会不会不可逆地删掉或覆盖你的真实数据?"

判定用 TypeSafe Jev —— 一个不产出文本、只产出结构化决策的 "System One" 模型。这类判断用是非问句实测最准(114 例校准,中文直送 90.4%)。挂载点是 DSH 原生的 tools/pre-execute,所以它是强制拦截,不是"提醒模型自觉"。

命令文本 ──▶ L0 静态硬规则(不联网·不可覆盖)──▶ 预筛(只读/可重建)──▶ Jev 语义判定(~300ms)
                        │                       │                        │
                        └───────────────┬───────┴────────────────────────┘
                                        ▼
                        allow / revise(附降级模板)/ block / escalate
                            │        │              │          │
                         直接执行   模型换写法      拒绝     DSH 审批弹窗 或 一次性令牌

英文摘要 — dsh-jev-guard is a pre-execution safety valve for DeepSeek Harness. It judges every bash / pwsh tool call before it runs — offline static rules first, then a paid semantic model — and returns one of four states (allow / revise / block / escalate). It blocks unrecoverable commands, teaches the model a safer form when it can, offers a one-shot human token when neither is right, and degrades loudly instead of silently when the judging API runs out of credit. It is an accident net, not a security boundary — see 已知边界.


目录

  • 它做什么
  • 安装
  • 语言
  • 配置
  • 两种审批策略下的行为
  • 被拦了怎么办:人的三条介入通道
  • 额度用完会怎样:降级而不是静默失效
  • 服务拒绝你的地区时:地区锁
  • 看得见:审计日志与状态
  • 平台支持
  • 自检与验收
  • 目录结构
  • 安全与隐私
  • 已知边界
  • 文档
  • License

它做什么

判定 含义 谁接手
allow 确定性只读,或判定为安全 直接执行
revise 证据不足以安全执行,但很可能有更好的写法 模型换写法重试(附三种降级模板:先演练 / 缩小范围 / 先备份)
block 会不可逆地删或覆盖,或命中硬规则 拒绝;由人手动执行
escalate 必须有人确认(硬规则的"必问"项,或重试预算耗尽) 人

分三层,顺序固定:

  1. L0 静态硬规则(lib/rules.js):32 条"永不允许" + 24 条"必须人工确认"。不联网、不可被覆盖,连一次性令牌也过不去。规则只在命令位置匹配(每一行行首,或 ; & | ( $( 之后,或 bash -c " / pwsh -NoProfile -Command " / cmd /c " 之后,并允许 sudo/timeout 30/xargs -0/find … -exec 这类包装器)—— 所以"在参数里提到危险命令"不会被误伤,而多行脚本里的真命令也不会被漏掉。只有两条结构上锚不了的规则(redirect-to-device、fork-bomb)是全文匹配,计数器 RULE_STATS.anywhere 恒为 2。
  2. 预筛:可证明只读或只影响可重建内容(缓存、构建产物、/tmp)的命令直接放行,零网络调用。
  3. Jev 语义判定:一次是非问句 —— "这条命令会不可逆地删除或覆盖用户的真实数据吗?" —— 按两个阈值切成 allow / revise / block。实测延迟 ~300ms(P50 267ms),成本 ≈ $0.000019/次。

安装

要求 Node ≥ 20(用到全局 fetch)。零运行时依赖,不需要 npm install。

已验证的宿主版本:DSH 0.1.6-alpha.2、0.1.7-rc.2、0.2.0-rc.2、0.2.1-rc.2、0.2.1-rc.3、0.2.1-rc.5、0.2.2-rc.1、0.2.2-rc.2 与 0.2.2-rc.5。 0.1.7-rc.2 于 2026-09-25 完整跑过一遍(Node 24.21.0、WSL/Linux,插件本体 0.5.3):guard selftest 12/12;七份离线自检 20 / 31 / 34 / 109 / 56 / 48 / 17 条断言全过;DSH 适配器冒烟 23/23;工具管线集成测试跑在该 checkout 自带的 @deepseek-ai/dsh-tools 上,离线 6/6、带密钥 7/7(多出来的那一例是走真实五阶段管线的一次联网判定)。阀门也在真实会话里挂载运行过:逐条判定命令,并在审批策略 ask 下写下审计日志。

0.2.0-rc.2 于 2026-09-30 完整跑过一遍 —— 这次宿主真的升上来了(@deepseek-ai/dsh-desktop-runtime 0.2.0-rc.2、Node 24.12.0、Windows),插件本体 0.5.3、一行未改。阀门在真实会话里挂载运行:逐条判定 agent 发出的命令,走真实联网模型(jev-1.13.0),并写下审计日志 —— 每条记录都带会话 id、判定来源(jev / prefilter / static-rule / cache)、风险概率、延迟与 token 用量。fail-open 不只在测试里成立,生产路径上也观察到了:超出 1800ms 判定预算的条目被记成 source: error 并放行,与设计一致。该宿主上的电池:guard selftest 12/12;七份离线自检 20 / 30 / 34 / 109 / 54 / 48 / 17 条断言全过(其中两个数字与 Linux 轮不同 —— selftest-entry 30 对 31、selftest-reason 54 对 56 —— 因为这两套用例按平台分支);DSH 适配器冒烟 23/23;工具管线集成测试跑在真实的 @deepseek-ai/dsh-tools 0.2.0-rc.2 五阶段管线上,离线 6/6、带密钥 7/7(多出来的那一例是走真实五阶段管线的一次联网判定)。静态上,本插件触及的每一个宿主文件在 0.1.7-rc.2 与 0.2.0-rc.2 之间都逐字节一致(含 tools/pre-execute 与 agent/pre-step 的声明),所以无需改动、也确实一行未改。宿主的插件版本门槛 —— 声明了 @deepseek-ai/dsh* peer 要求而运行版本不满足时就拒绝加载 —— 对本案不适用:本插件不声明 peerDependencies,门槛函数本身与真实的 profile 装配路径都放行。

0.2.0-rc.2 于 2026-10-15 又完整跑过一遍 —— 插件本体 0.5.5,宿主是同一台 Windows 机:guard selftest 12/12;七份离线自检 20 / 30 / 34 / 113 / 54 / 48 / 17 条断言全过;DSH 适配器冒烟无密钥 23/23、带密钥 25/25;工具管线集成测试离线 6/6、带密钥 7/7。这一天阀门一直挂在真实会话里跑,而这场会话产生的两种失败形状现在各有分类、会降级,不再落进 unknown:出口的地区拦截(451)与写错的 model(400)—— 见 D17。超出预算的判定照旧 fail-open,也照旧记为 source: error。

0.2.1-rc.2 于 2026-10-17 做过一次兼容复查 —— 插件本体 0.5.6,同一台 Windows 机。这次不是猜行为,而是逐处做契约对照:把 0.2.0-rc.2 的包与 0.2.1 的构建逐项比较插件站在其上的每一个宿主面 —— tools/pre-execute 瀑布与 allow/ask/deny 决策形状(dsh-tools/lib/types/index.js)、agent/pre-step 的默认 {kind: 'enter', messages}(dsh-agent-loop/lib/index.js)、snapshotEvents / deriveMessages 以及 approval/policy + permission/preset 载荷 —— 插件实际匹配的那几行逐字节一致,适配器一行未改。阀门随后挂载运行:216 条判定、跨三个会话(allow 212 / revise 2 / block 2),唯一的失败是 8 条 1800ms 超时 —— 按设计 fail-open,不是契约破损。该宿主上的电池:guard selftest 12/12;七份离线自检 30 / 34 / 113 / 54 / 17 / 83 / 20 条断言全过;DSH 适配器冒烟 23/23。同一天这个 profile 的执行器从 bash 翻成了 pwsh(Git Bash 的 MSYS2 运行时在沙盒的 WRITE_RESTRICTED 令牌下起不来,见 cordis.patch.yml),0.5.6 回应的就是这件事:审计日志里已经有 "tool": "pwsh" 记录,而且 PowerShell 的破坏性操作面已经进了 L0 规则(D19)。真实工具管线集成测试本次没跑 —— 它从自身位置解析 @deepseek-ai/cordis,而本 checkout 刻意零依赖;CI 与发布工作流也都不跑它。

0.2.1-rc.3 于 2026-10-24 做过一次兼容复查 —— 插件本体 0.5.7,同一台 Windows 机(Node 24.22.1,cordis 4.0.5)。这次同样是契约对照而不是猜行为,而且对照的对象是随宿主发布的 app.asar 里那些包(按依赖闭包提取),不是 npm 上的 tarball:tools/pre-execute 仍是 dsh-tools/lib/index.js:3321 的瀑布,默认 {kind: 'allow'},allow/ask/deny/cancel 决策形状不变(dsh-tools/lib/types/index.js:885);agent/pre-step 仍默认 {kind: 'enter', messages}(dsh-agent-loop/lib/index.js:909);approval/policy 与 permission/preset 仍按原样追加与回读(dsh-user-approval/lib/index.js:65 / :163、dsh-permission-presets/lib/index.js:359 / :380 / :87-90);dsh.bundle.patch 仍接受单个路径字符串(dsh-app-boot 的 bundlePatchFiles)。插件实际匹配的行一行未变,适配器未改也无需改。0.2.1-rc.2 那轮在本工作区跑不起来的工具管线集成测试,这一轮跑起来了 —— 针对这些 rc3 包,tools/smoke-dsh-pipeline.mjs 离线 6/6:只读命令真的穿过五段管线执行、git push --force 在工具体之前被拦、git reset --hard 走成 ask 且无审批通道时被拒、不匹配的工具原样放过、notice 通过宿主的 v4 准入校验且 0.5.6 旧形态被拒=true。阀门当天也一直挂在真会话里:264 条判定全部 allow —— 其中 244 条由模型判定(jev-1.13.0,policy: never 与 preset: danger-full-access 都取自该会话的真实事件),2 条缓存命中,18 条超出 1800 ms 预算按设计 fail-open(这是延迟观察,不是契约破裂:当天语义层实测 1.25–2.31 秒一条)。该宿主上的电池:guard selftest 12/12;七份离线自检 30 / 34 / 113 / 54 / 17 / 83 / 20 条断言全过;DSH 适配器冒烟 24/24。

0.2.1-rc.5 于 2026-10-31 做过一次兼容复查 —— 插件本体 0.5.7,同一台 Windows 机(Node 24.21.0,cordis 4.0.5,宿主构建 d4db512a,channel nightly)。这次同样是契约对照,对照对象还是随宿主发布的 app.asar 里那些包(按依赖闭包提取):tools/pre-execute 仍是 dsh-tools/lib/index.js:3321 的瀑布,默认 {kind: 'allow'},allow/ask/deny/cancel 决策形状不变(dsh-tools/lib/types/index.js:885);agent/pre-step 仍默认 {kind: 'enter', messages}(dsh-agent-loop/lib/index.js:909);approval/policy 与 permission/preset 仍按原样追加与回读(dsh-user-approval/lib/index.js:65 / :74、dsh-permission-presets/lib/index.js:92-95);dsh.bundle.patch 仍接受单个路径字符串(dsh-app-boot 的 bundlePatchFiles,lib/index.js:517-519);snapshotEvents / deriveMessages 在 dsh-session/lib/index.js:1452 / :1672;credentials.resolve 在 dsh-credentials-local/lib/index.js:480;v4 准入校验 assertV4RowAdmission(dsh-session-format-v3-to-v4/lib/index.js:1107)只多了一个可选第二参 knownEventTypes,原来对 kind: 'plugin' 的拒绝行为原样保留(:142),producerKind 仍把插件映射成 plugin:jev-guard(:87)。插件站在其上的九个宿主面一行未变,适配器未改也无需改;工具管线集成测试对这些 rc5 包离线 6/6,其中第 6 项走的是宿主真实的 v4 准入校验,0.5.6 旧形态被拒=true。阀门也一直挂着:381 条判定(截至该次统计)—— 380 条 allow(其中 376 条由模型判定,policy: never 与 preset: danger-full-access 都取自会话的真实事件;4 条超出 1800 ms 预算按设计 fail-open),外加 1 条真机 escalate 探针:rsync -a --delete 被 rsync-delete 硬规则在工具体之前拦下;当天延迟均值 507 ms、p90 为 1044 ms。该宿主上的电池:guard selftest 12/12;七份离线自检 30 / 34 / 113 / 54 / 17 / 83 / 20 条断言全过;DSH 适配器冒烟 24/24。会话内 notice 通道当天 0 条,这是对的 —— 它只在阀门失明(无密钥、降级、配额冷却)时说话,形状正确性由管线测试覆盖。

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-jev-guard

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

Microsoft's Official agent framework Hijacked
AI & VibeSec

BREAKING: Hijacked Releases of Microsoft’s Official agent-framework Steals Azure and CI Credentials

Copy of Template Design OX Blog (2)
Research

NGINX2Root: Five Critical NGINX Flaws Expose Web Servers to Remote Code Execution

CVE

Java4Shell (CVE-2026-114938): Easy to Crash, Hard to Exploit — Less Than 0.12% of JVMs Estimated at Risk of RCE

Frame 2085668439 (1)
Group 1261154229