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

@statewalker/webapp.browser

Latest version: v0.9.0

Overview

Last scanned
29 Nov 2026
Published
29 Nov 2026
npm package Publisher: mkotelnikov
0 Stars
0 Forks
6 Versions
891 Downloads
TypeScript Repo language

Scan summary

@statewalker/webapp.browser was last scanned on 29 Nov 2026 at version 0.9.0. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 6 versions; the latest was published on 29 Nov 2026.
  • Findings: No rules fired in version 0.9.0.
  • Downloads: 891 downloads.

Versions

6 versions published
Versions and the rules that fired in each
VersionPublishedStatus
0.9.0 LATEST 29 Nov 2026 No rules fired
0.8.0 16 Nov 2026 No rules fired
0.6.0 13 Nov 2026 No rules fired
0.7.0 13 Nov 2026 Not shown
0.5.2 6 Oct 2026 Not shown

No rules fired in 0.9.0

Findings

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

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

README

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

@statewalker/webapp.browser

What it is

The browser host for the web-app project nature. hostApp takes a web-app project, builds its SiteHandler with @statewalker/webapp.core, adds cross-origin isolation headers to every response, and mounts it behind a same-origin ServiceWorker with HostedSiteBuilder from @statewalker/webrun-site-host. The package also contains the webapp:open command, which hosts a project and opens it as a dock panel, and the dock-panel ids and spec shape that the <SiteFrame> renderer in @statewalker/webapp.view.react is registered against. No React.

Why it exists

webapp.core produces a handler but does not know where it runs. In the browser the only way to serve a project's files and API at real URLs, so that an iframe can load them, is a ServiceWorker. This package is that binding, plus the command logic that connects it to the shell's dock. The command logic is kept free of React and takes the host function as a parameter, so it runs and is tested in Node without a ServiceWorker; the React renderer imports only the shared constants from here.

How to use

pnpm add @statewalker/webapp.browser

No peer dependencies. One entry point, @statewalker/webapp.browser, ESM with .d.ts. The package ships dist/ (built JS and types) and src/ (TypeScript sources).

hostApp needs a browser with ServiceWorker support and the worker script served by the page (default /sw-worker.js, the HostedSiteBuilder default). The other exports also run in Node.

import { hostApp } from "@statewalker/webapp.browser";

const app = await hostApp(project);
iframe.src = `${app.baseUrl}~/client/index.html`;
// later
await app.stop();

Examples

Options for hostApp:

import { dataFilesOf } from "@statewalker/webapp.core";
import { hostApp } from "@statewalker/webapp.browser";

const app = await hostApp(project, {
  siteKey: "my-app", // first URL segment after the worker scope; default: a random UUID
  serviceWorkerUrl: "/my-sw.js",
  env: { data: dataFilesOf(project) }, // context passed to the server entry
});

Open a project in a dock tab through the command:

import { hostApp, OpenWebAppCommand, registerOpenWebApp } from "@statewalker/webapp.browser";

// commands: a Commands instance (@statewalker/shared-commands)
// store: a SpecStore (@statewalker/render.core)
const dispose = registerOpenWebApp({ commands, store, host: hostApp });
await commands.call(OpenWebAppCommand, { project }).promise;
dispose(); // removes the listener and stops every app it hosted

Add isolation headers to any handler:

import { withIsolationHeaders } from "@statewalker/webapp.browser";

const isolated = withIsolationHeaders(async (req) => new Response("ok"));

Build the dock spec yourself:

import { makeSiteFrameSpec, webAppPanelId, webAppSpecId } from "@statewalker/webapp.browser";

const spec = makeSiteFrameSpec({ baseUrl: app.baseUrl, clientEntry: "~/client/index.html" });
webAppPanelId(project.path); // "webapp:<project path>"
webAppSpecId(project.path); // "spec:webapp:<project path>"

Internals

What webapp:open does
OpenWebAppCommand { project }
  first time for this project path:
     host(project) ──> HostedApp { baseUrl }
     store.create({ id: spec:webapp:<path>, catalogId: "webapp",
                    spec: SiteFrame { baseUrl, clientEntry: "~/<clientEntry>" },
                    meta: { persistent: true } })      (only if the spec does not exist)
  every time:
     ShowDockPanelCommand { panelId: webapp:<path>, specId }   (opens or focuses the tab)

Panel and spec ids use the full project path, not the folder name, so two projects with the same folder name in different places get different tabs.

The pending host() promise is stored before any await. A second dispatch for the same project that arrives while the first is still mounting reuses that promise instead of mounting a second ServiceWorker site. If mounting fails, the entry is removed so the next dispatch retries, and the command rejects with the mount error.

Why the isolation headers

The client runs in an iframe inside a cross-origin-isolated page. Every response the worker serves therefore gets Cross-Origin-Embedder-Policy: credentialless and Cross-Origin-Resource-Policy: cross-origin. The body is streamed through unchanged and the original response is not modified.

Why getBaseUrl is late-bound

The server runner imports ${baseUrl}~/<serverEntry>, but baseUrl is known only after HostedSiteBuilder.build() returns. hostApp passes a closure and fills in baseUrl after the mount.

API reference
  • hostApp(project, opts?), HostAppOptions (siteKey, serviceWorkerUrl, env), HostedApp (baseUrl, stop()).
  • withIsolationHeaders(handler), type SiteHandler.
  • OpenWebAppCommand (webapp:open), OpenWebAppPayload, registerOpenWebApp({ commands, store, host }), RegisterOpenWebAppOptions, HostAppFn.
  • WEBAPP_DOCK_CATALOG_ID ("webapp"), webAppPanelId, webAppSpecId, makeSiteFrameSpec, SiteFrameParams.
Dependencies
  • @statewalker/webapp.core - buildSiteHandler, resolveWebAppConfig, appFilesOf.
  • @statewalker/webrun-site-host - HostedSiteBuilder, the ServiceWorker mount.
  • @statewalker/shell.core - ShowDockPanelCommand.
  • @statewalker/render.core - Spec, SpecStore.
  • @statewalker/shared-commands - Command, Commands.
  • @statewalker/workspace.core - the Project type.

License

MIT

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 @statewalker/webapp.browser

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

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

Cry2Wolf: Not Every Branded Bug Deserves a Fire Drill

The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Vulnerability Insights

The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?

Ethersphere Hijacked With Crypto Stealing Malware (1)
npm

Ethersphere Hijacked With Crypto Stealing Malware Via Github & npm

Frame 2085668439 (1)
Group 1261154229