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

@orielweb/api

Latest version: v0.6.3

Overview

Last scanned
27 Nov 2026
Published
27 Nov 2026
npm package Publisher: pgyctt
1 Stars
0 Forks
7 Versions
475 Downloads
C# Repo language

Scan summary

@orielweb/api was last scanned on 27 Nov 2026 at version 0.6.3. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 7 versions; the latest 3 were published within 3 days (25–27 Nov 2026).
  • Findings: No rules fired in version 0.6.3.
  • Downloads: 475 downloads.

Versions

7 versions published
Versions and the rules that fired in each
VersionPublishedStatus
0.6.3 LATEST 27 Nov 2026 No rules fired
0.6.2 26 Nov 2026 No rules fired
0.6.1 25 Nov 2026 No rules fired
0.6.0 12 Nov 2026 Not shown
0.5.0 25 Oct 2026 Not shown

No rules fired in 0.6.3

Findings

Findings for v0.6.3. 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 0.6.3; other versions have their own rules, not their own score.

README

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

@orielweb/api

OrielWeb 的页面侧 API。模块名与 @tauri-apps/api 一一对应,迁移时只需替换 import 前缀。

// Tauri
import { invoke } from '@tauri-apps/api/core';
// OrielWeb
import { invoke } from '@orielweb/api/core';
npm install @orielweb/api

发布状态:0.4.15 起发布到 npm(@orielweb/api,公开,MIT)。版本号与 NuGet 包 OrielWeb 同步取自根 Directory.Build.props,两边始终是同一个 X.Y.Z。

发布走手动一步:npm publish 需要 2FA 或带 bypass 2FA 的 Granular Token, npm login 拿到的 token 直接发会 403。prepublishOnly 会先跑单测、类型检查、 重新生成 types/ 并过 npm run check:types 闸门(scripts/check-published-types.mjs), 任一步红都不会上传。

不用 npm 也可以:npm install <仓库路径>/packages/api、workspace 引用,或像 samples/OrielDemo 那样直接把 src/*.js 内嵌进产物(OrielDemo.csproj 的 vendor 段, 内嵌源码而不是复制副本,所以不存在副本漂移)。

设计取舍

取舍 理由
JS + JSDoc,不用 TypeScript 源码 本库的卖点是零依赖、AOT、单文件;前端包也不该引入打包器。exports 直接指向 src/*.js,tsc 只用来校验类型(--noEmit)。
window.oriel 降级为传输层 它等价于 Tauri 的 __TAURI_INTERNALS__——能用,但不是公开 API。文档不再主推。
不做参数名自动转换 Tauri 把 JS 的 camelCase 转成 Rust 的 snake_case;本库的 [OrielCommand] 按方法参数名原样取值。转了反而对不上,所以不转。
mocks 与包同时提供 没有它,前端单测只能起真窗口,CI 里跑不动。

当前状态

模块 状态
core ✅ invoke(含逐次调用超时)/ isTauri / convertFileSrc(走宿主 asset.read 的 scope)
event ✅ listen / once / emit / emitTo + TauriEvent(含名字映射与按需转发,退订时对称关闭)
window ✅ getCurrentWindow / getAllWindows / getByLabel / getFocusedWindow + Window 类(含静态 Window.getFocusedWindow();状态查询、外观开关、光标 6 项、onThemeChanged / onScaleChanged)
dpi ✅ 四个类 + 归一 + toPhysical / toLogical 换算
path ✅ sep / delimiter(同步)+ 7 个路径运算 + 24 个目录解析(由宿主算)
app ✅ getName / getVersion / getIdentifier / getTauriVersion / supportsMultipleWindows(只读元信息,无需能力声明)
fs ✅ 整文件族(readTextFile / writeTextFile / readFile / writeFile / exists / size / readDir / stat / lstat / mkdir / remove / rename / copyFile / truncate)+ 句柄族(open / create / FileHandle / SeekMode / readTextFileLines,B17)+ 监视族(watch / watchImmediate,B20)——命令授权 + 路径 scope 两道关都必过;句柄的 scope 只在 open/create 时判,监视的 scope 逐项判
dialog ✅ open / save / message / ask / confirm
clipboard ✅ readText / writeText / clear + readImage / writeImage(PNG)/ writeHtml(HTML + 纯文本回退)/ writeSecret(请求不进历史)。图片走 PNG:宿主把剪贴板位图统一编码成 PNG 回来
opener ✅ openUrl / openPath / revealItemInDir(openWith 明确拒绝)
notification ✅ isPermissionGranted / requestPermission / sendNotification(含 schedule 排期)+ Schedule / ScheduleEvery + 登记表(active / pending / cancel / cancelAll / removeActive / removeAllActive)+ onNotificationReceived(真事件)/ onAction(订阅时抛 not_supported)。移动端的渠道与等级 8 项不做
autostart ✅ isEnabled / enable / disable
image ✅ Image(fromPath / fromBytes / new)+ transformImage。close() 是补壳(B14):没有资源可释放,调用不报错、debug 下打警告
mocks ✅ mockIPC / mockWindows / mockEmit / mockConvertFileSrc / clearMocks
menu ✅ 菜单树(Menu / MenuItem / PredefinedMenuItem / Submenu / CheckMenuItem / IconMenuItem)+ popup / setAsAppMenu / setAsWindowMenu
tray ✅ TrayIcon(B12,静态 3 + 实例 8),形状与 Tauri 一致

关闭接管:语义与 Tauri 一致

默认关闭,preventDefault() 才留下。handler(含 async)跑完后,没调 preventDefault() 库会替你调 destroy()——迁移代码不用改:

const win = getCurrentWindow();
const un = await win.onCloseRequested(async (event) => {
  if (!(await confirmDiscard())) event.preventDefault();   // 不关
  // 不调:handler 返回后窗口关闭
});

宿主侧的形态是"挂起 + 推事件"(Windows 的 WM_CLOSE 是同步消息、页面回执是异步 IPC, 宿主没法在中途等回调),"关不关"那一半由页面侧的包装层补上,与 Tauri 的实现是同一段逻辑。 订阅会自动打开宿主侧的关闭接管开关,退订时关掉。

window 方法的能力要求

标题栏必需的那组(minimize / toggleMaximize / toggleFullscreen / toggleOnTop / close / destroy / drag* / pickFile / contextMenu)与只读状态查询 (isVisible / isMaximized / isMinimized / isFocused / isFullscreen / isAlwaysOnTop / isDecorated / isResizable / isMaximizable / isMinimizable / isClosable / isEnabled / theme / title)无条件放行;其余要宿主 Allow("window.*") 或逐条声明。 清单与逐条理由见 API.md §11。

注意几条不在白名单里的:setEnabled / setMaximizable / setMinimizable / setClosable / setMaxSize / setSizeConstraints / requestUserAttention / setIcon / setBackgroundColor / getAll / getFocused / innerSize 一族——它们要么改的是能力而不只是外观, 要么泄露跨窗口信息。用之前必须显式声明。

event 的现状(迁移必读)

项 状态
listen / once / emit / emitTo ✅ 可用
事件对象 { event, id, payload } ✅ 包装在包内做——直接调 window.oriel.on 的既有页面不受影响
emit / emitTo 的宿主命令 ✅ event.emit,必须显式 Allow("event.emit")(不走 win.* 的后门)
内置事件名 ✅ tauri://resize / move / focus / blur / close-requested / scale-change / theme-changed 可用(高频的四个会自动打开宿主转发,退订时对称关闭);⛔ tauri://destroyed 永远收不到(窗口销毁时页面正在被拆掉)

mocks 里的 mockEmit(name, payload) 可以模拟宿主推事件,写前端测试时用它造"窗口被 resize 了"这类场景。

怎么把它引进页面

包没有打包器依赖,exports 直接指向 src/*.js。三条路:

npm install @orielweb/api
场景 做法
有打包器(Vite / esbuild / …) import { invoke } from '@orielweb/api/core' —— 裸标识符由打包器解析,无需额外配置
没有打包器(内嵌静态页) 两种:配一个 import map(映射到 node_modules/@orielweb/api/src/*.js);或把 src/*.js 拷进产物后走相对路径 ./vendor/orielweb-api/core.js

samples/OrielDemo 走的是第二条路的相对路径形式(它要把包源码内嵌进程序集, 见 OrielDemo.csproj 的 vendor 段落——直接内嵌源码而不是复制一份,所以不存在副本漂移):

<script type="module" src="app.js"></script>
// app.js
import { invoke, isTauri } from "./vendor/orielweb-api/core.js";
import { listen } from "./vendor/orielweb-api/event.js";

import map 在 WebView2 上可用,但 WebKitGTK 的支持版本不确定,所以示例不依赖它。 要用的话写成逐模块条目(不能让 @orielweb/api/core 解析成无扩展名的 URL—— 内嵌资源表是按完整相对路径查的):

<script type="importmap">
{ "imports": {
    "@orielweb/api/core": "./vendor/orielweb-api/core.js",
    "@orielweb/api/event": "./vendor/orielweb-api/event.js",
    "@orielweb/api/window": "./vendor/orielweb-api/window.js"
} }
</script>
迁移时最容易漏掉的两处

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 @orielweb/api

References

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

Powered by Read the latest findings

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

Vulnerability Insights

Compromised Claude Code extensions (versions 2.1.312 & 2.1.313) in Cursor try to install a backdoor

Copy of Template Design OX Blog (2)
Research

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

Frame 2085668439 (1)
Group 1261154229