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

@zukhruf/net

Latest version: v0.8.226

Overview

Last scanned
29 Nov 2026
Published
29 Nov 2026
npm package Publisher: ezzabuzaid
1 Stars
0 Forks
6 Versions
TypeScript Repo language

Scan summary

@zukhruf/net was last scanned on 29 Nov 2026 at version 0.8.226. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 6 versions; the latest 5 were published within 2 days (28 and 29 Nov 2026).
  • Findings: No rules fired in version 0.8.226.

Versions

6 versions published
Versions and the rules that fired in each
VersionPublishedStatus
0.8.226 LATEST 29 Nov 2026 No rules fired
0.8.225 29 Nov 2026 No rules fired
0.8.224 28 Nov 2026 No rules fired
0.8.223 28 Nov 2026 Not shown
0.8.222 28 Nov 2026 Not shown

No rules fired in 0.8.226

Findings

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

README

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

@zukhruf/net

In build (backlog #6078). The API on paper was approved on 2026-11-28, and it is built as the paper shows. It is on npm, and the test files of sdk-it, text2sql, finetuning, mteb, deepagents and offers-evals moved onto it; the other consumers move next (see Who uses it). Each decision is an accepted ADR, and each detail that the review decided is in Decided in the review.

A server of this program that accepts connections, and that ends each one at its end. A Server says what to do with each connection. server.serve(endpoint) listens on a TCP port of the loopback address or on a pipe, and gives a Serving. The serving keeps each socket that it accepted. Its close() destroys each one and waits for its close, and its shutdown(signal) waits until each one ends by itself and closes the rest at the abort. @zukhruf/net/http is the same server for HTTP.

A test needs this server most: 48 test files of 9 repositories have their own copy of it, and 13 files have their own portOf (ADR 0001). It is a base package, so shipped code can use it too.

The words in these documents have one meaning each. See the glossary in CONTEXT.md.

Use it

npm install @zukhruf/net
import { Server, TcpEndpoint } from '@zukhruf/net';

const echo = new Server((socket) => socket.pipe(socket));
await using serving = await echo.serve(new TcpEndpoint());
console.log(serving.address.port); // a free port of 127.0.0.1

Listen on a free port

new TcpEndpoint({ host, port }) says where to listen. The defaults are host: '127.0.0.1' and port: 0, a free port that the system chooses. serving.address is a net.SocketAddress with the port that the serving got (ADR 0003).

await using serving = await server.serve(new TcpEndpoint());
const client = connect(serving.address.port, serving.address.address);
  • host is an IP address. The endpoint does not look up a host name.
  • To listen again on the same port, give it: server.serve(new TcpEndpoint({ port: serving.address.port })).

Listen on a pipe

A PipeEndpoint of @zukhruf/pipes is an endpoint too: a Unix socket on macOS and Linux, a named pipe on Windows. serving.address is then its PipeAddress, and it has no port.

import { Server } from '@zukhruf/net';
import { PipeEndpoint } from '@zukhruf/pipes';

await using serving = await new Server(onPeer).serve(
  new PipeEndpoint(socketPath, { prefix: 'mutex' }),
);
const peer = await serving.address.connect();

Say what to do with each connection

new Server(handler, options) holds the handler and listens on nothing. handler(socket) gets each accepted net.Socket. A server can serve more than once, also on two endpoints at once (ADR 0004).

Copy today With the package
ssh startSilentServer() new Server(() => {}).serve(new TcpEndpoint())
mutex standInServer(path, onPeer) new Server(onPeer).serve(new PipeEndpoint(path, { prefix }))
ssh listen(path, accepted, { allowHalfOpen }) new Server(accepted, { allowHalfOpen }).serve(endpoint)
portOf(server) serving.address.port

End a serving

Call What happens underneath
await serving.close() The listener stops its accepts. Each accepted socket gets destroy(). It resolves when the listener has closed and each socket has emitted close.
await using serving = ... close() at the end of the scope.
await serving.shutdown(signal) The listener stops its accepts. It waits until each accepted socket has closed by itself. When signal aborts first, it destroys the rest and waits for their close.
a second close() or shutdown() It waits for the end of the first call and resolves.

The listener's own close never ends an accepted socket, as Go's net.Listener does not. Only the serving ends them (ADR 0005).

Serve HTTP

new HttpServer(handler, options) of @zukhruf/net/http is a server whose handler gives each accepted socket to its own http.Server. handler is a request listener of node:http. On a TCP endpoint, the serving has origin (ADR 0006).

import { TcpEndpoint } from '@zukhruf/net';
import { HttpServer } from '@zukhruf/net/http';

await using site = await new HttpServer((request, response) => {
  response.end('hello');
}).serve(new TcpEndpoint());
const answer = await fetch(`${site.origin}/`);
  • The close destroys each accepted socket, also a socket that an upgrade took. Then it destroys each client socket of this process that belonged to a destroyed connection, and waits for its close, so the timers of fetch are cleared before the next test (testing ADR 0030).
  • shutdown(signal) ends each idle connection at once, and each other connection after its response, as Go's Shutdown.
  • options are those of http.createServer (keepAliveTimeout, highWaterMark, ...) and upgrade, a listener of the upgrade event. docker's fake engine needs all three.
@zukhruf/testing/http today @zukhruf/net/http
await new HttpServer().start(handler) await new HttpServer(handler).serve(new TcpEndpoint())
handle.origin serving.origin
await handle.cleanup() await serving.close()
handle.server.close(), then listen(port) serving.close(), then serve(new TcpEndpoint({ port }))
HttpServerHandle HttpServing

Errors

The package has no error class of its own. A caller does not do a different next step for an error of this package.

Error When
the error of net.Server.listen serve() rejects with it: EADDRINUSE for a port in use, EACCES, EADDRNOTAVAIL.
the errors of @zukhruf/pipes serve() on a PipeEndpoint rejects with them: UnsafeFolderError, a RangeError for a long path.

What the package does not do

  • Faults. Latency, a partition, a reset or a stall are in the tool package @zukhruf/chaos, which uses this one.
  • Look up a host name. TcpEndpoint takes an IP address, as net.SocketAddress does.
  • Tell a raw handler that a shutdown began. Kestrel does it with ConnectionClosedRequested. It is on the map as later.
  • TLS. A host can write a TLS endpoint: an Endpoint is an interface.
  • Later, on the map: unref() and the five shipped servers (mutex, election, single-flight, ssh twice), testing's EngineProxy (ADR 0007).

Who uses it

Consumer How Record
56 test files of sdk-it (18), text2sql (20), finetuning (9), mteb (6), deepagents (2) and offers-evals (1) HttpServer on a TcpEndpoint backlog #6078
50 test files of elt (49) and context-compiler (1) HttpServer, today from @zukhruf/testing/http backlog #6078
docker's 12 test files of the engine HttpServer on a PipeEndpoint, today fakeEngine backlog #6078
ssh's client, config-dial-route and config-dial tests Server with no handler, today startSilentServer backlog #6078
6 mutex and 3 single-flight test files Server on a PipeEndpoint, today standInServer backlog #6078
ssh control.test.ts, owner-death.test.ts Server with allowHalfOpen, today listen backlog #6078
13 files of docker, ssh, testing and tools/eslint-rules serving.address.port, today portOf backlog #5947
@zukhruf/chaos Proxy is a handler that a Server serves backlog #6078

The same concepts in other systems

Concept Other systems
An endpoint .NET EndPoint, IPEndPoint, UnixDomainSocketEndPoint; Go x/net nettest.NewLocalListener
A listener that leaves its connections Go net.Listener, .NET IConnectionListener, Node.js net.Server.close, @zukhruf/pipes PipeServer
A close that ends the connections Go http.Server.Close, httptest.Server.Close, Kestrel AbortAllConnectionsAsync
A shutdown with a limit Go http.Server.Shutdown(ctx), Kestrel CloseAllConnectionsAsync then AbortAllConnectionsAsync
HTTP over a listener Go http.Server.Serve(l), Node.js emit('connection')
The origin of a test server Go httptest Server.URL

Why not a package of npm

The leaders' standard libraries split listener and server, and Node.js 26 gives every part but the tracking of accepted sockets on a net.Server: net.Server has no closeAllConnections (probe of 2026-11-28). The package adds that one part. No npm package does that part (probe of 2026-11-28 on Node.js 26). stoppable 1.1.0 (last release 2018) ends and destroys the sockets of a raw net.Server, but its grace is a fixed time with no abort signal, and with sockets that emit('connection') gave an http.Server it calls back before their close. http-terminator 3.2.0 (last release 2022) skips the sockets of a raw net.Server and polls every 10 ms. Both lean on server.close(), so neither waits for sockets that the server did not accept itself.

API

import type {
  IncomingMessage,
  ServerOptions as NodeHttpServerOptions,
  ServerResponse,
} from 'node:http';
import type { Socket, SocketAddress } from 'node:net';
import type { Duplex } from 'node:stream';

/** Gets each accepted socket. */
export type Handler = (socket: Socket) => void;

/** Accepts connections and gives each one to a handler. Its close leaves each accepted socket open. Go's net.Listener. */
export interface Listener<A> extends AsyncDisposable {
  readonly address: A;
  close(): Promise<void>;
}

/** Where a server listens. PipeEndpoint of @zukhruf/pipes is one. */
export interface Endpoint<A> {
  listen(handler: Handler): Promise<Listener<A>>;
}

export interface TcpEndpointOptions {
  /** An IP address. Default '127.0.0.1'. */
  readonly host?: string;
  /** Default 0: a free port that the system chooses. */
  readonly port?: number;
}

export class TcpEndpoint implements Endpoint<SocketAddress> {
  constructor(options?: TcpEndpointOptions);
  listen(handler: Handler): Promise<Listener<SocketAddress>>;
}

export interface ServerOptions {
  /** Set on each accepted socket before the handler gets it. Default false, as node:net. */
  readonly allowHalfOpen?: boolean;
}

/** What to do with each connection. It listens on nothing until serve(). */
export class Server {
  constructor(handler: Handler, options?: ServerOptions);
  serve<A>(endpoint: Endpoint<A>): Promise<Serving<A>>;
}

/** A server while it listens on one endpoint. Only serve() makes one. */
export interface Serving<A> extends AsyncDisposable {
  readonly address: A;
  /** The accepted sockets that are open now. */
  readonly connections: number;
  /** Stops the accepts, destroys each accepted socket, waits for each close. */
  close(): Promise<void>;
  /** Stops the accepts, waits until each accepted socket has closed; at the abort of signal, closes the rest. */
  shutdown(signal: AbortSignal): Promise<void>;
  [Symbol.asyncDispose](): Promise<void>;
}
// @zukhruf/net/http
/** A request listener of node:http. A rejection stays unhandled and fails the process. */
export type HttpHandler = (
  request: IncomingMessage,
  response: ServerResponse,
) => unknown;

export interface HttpServerOptions extends NodeHttpServerOptions {
  /** A listener of the upgrade event. The serving destroys its socket at the close. */
  readonly upgrade?: (
    request: IncomingMessage,
    socket: Duplex,
    head: Buffer,
  ) => void;
}

export class HttpServer {
  constructor(handler: HttpHandler, options?: HttpServerOptions);
  serve(endpoint: Endpoint<SocketAddress>): Promise<HttpServing<SocketAddress>>;
  serve<A>(endpoint: Endpoint<A>): Promise<HttpServing<A>>;
}

/** An HTTP serving. Only an endpoint with a SocketAddress gives it an origin. */
export type HttpServing<A> = Serving<A> &
  (A extends SocketAddress ? { readonly origin: string } : unknown);

Decided in the review

Each item is a detail that a caller sees. Ezz approved each proposal on 2026-11-28 ("Approve as written"; item 2, address on PipeServer: "Add address"), and each follows the leader that it names. The npm candidates are probed before the build.

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 @zukhruf/net

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

Copy of Template Design OX Blog (1)
Research

Thousands Of GitHub Accounts Hijacked With wfx-loot CI Secret Stealing Malware Via GitHub Actions & npm

Vulnerability Insights

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

Frame 2085668439 (1)
Group 1261154229