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

@noverax/courier-redis

Latest version: v0.9.0

Overview

Last scanned
28 Nov 2026
Published
28 Nov 2026
npm package Publisher: vgevorgyan
3 Stars
0 Forks
9 Versions
1.3K Downloads
TypeScript Repo language

Scan summary

@noverax/courier-redis was last scanned on 28 Nov 2026 at version 0.9.0. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 9 versions; the latest was published on 28 Nov 2026.
  • Findings: No rules fired in version 0.9.0.
  • Downloads: 1,345 downloads.

Versions

9 versions published
Versions and the rules that fired in each
VersionPublishedStatus
0.9.0 LATEST 28 Nov 2026 No rules fired
0.8.0 18 Nov 2026 No rules fired
0.7.1 16 Nov 2026 No rules fired
0.6.0 14 Nov 2026 Not shown
0.5.0 13 Nov 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.

Overview

Three adapters on ioredis, each plugging into a seam the core already has: a Pub/Sub adapter for the WebSocket handler, a presence adapter for channels, and a Streams adapter for the history a stream resumes from.

Install

npm install @noverax/courier-redis @noverax/courier ioredis

ioredis 5.3 or later: its named Redis export is what the types use.

Usage

Pub/Sub — Horizontal WebSocket Scaling

Broadcasts WebSocket messages across multiple server instances using Redis Pub/Sub:

import { Redis } from "ioredis"
import { createRedisPubSub } from "@noverax/courier-redis"

const pubsub = createRedisPubSub({
  publisher: new Redis(),
  subscriber: new Redis(),
  prefix: "courier:",
})

await pubsub.connect().catch((error) => console.warn(error.message))

It works from the moment it is made, Redis there or not. What is published while Redis is away waits — at most 1000 messages, 1 MiB, 5 seconds, the oldest dropped and counted past them (queue sets them) — and goes out in order once Redis is back. While Redis is reached but slow to answer, it sends Redis no more than those bounds unanswered, and what is published past them waits in the same queue. A publish — and a broadcast, disconnect and requireAuth with it — waits for Redis's answer 5 seconds at most, and the commands of disconnect and requireAuth go before the broadcasts waiting with them, none of which takes their place. Leave ioredis's commandTimeout off the publisher: a command it times out stays in ioredis until Redis answers, and the adapter, taking it for answered, would send Redis more. Every subscription is made again after each reconnect, and tried again after a growing pause when Redis refuses it; the adapter is ready again once Redis has answered those it makes again, 2 seconds after at most, so a subscription that catches up then misses nothing published after. subscribe() settles once Redis has answered its SUBSCRIBE — at once while Redis is away, after 2 seconds at most — so a WebSocket client is told subscribed once what the other replicas publish reaches it. connect() waits until it is ready and rejects at its deadline while the adapter goes on; disconnect() settles within its own. state, onStateChange() and stats() say how it stands.

With log: {}, it keeps a log of each topic's events in Redis — 100 a topic, for an hour after its last (maxEvents, ttlMs) — which numbers them in one sequence for every replica: a WebSocket handler publishes a topic's events through it, every replica delivers each under the same number, and a client resumes its subscription on any replica.

Pass it to createCourierServer or createWSHandler:

import { createCourierServer } from "@noverax/courier-server"

createCourierServer({ sources, pubsub, port: 3001 })
Streams — SSE Event History

Keeps a stream's events in Redis Streams, so a client that reconnects to any replica can be sent what it missed. The server does not use it on its own: the code that produces an event appends it, and the stream's handler replays getHistory(topic, ctx.lastEventId) and yields each event with tracked(event.id, …), so the id its client resumes from is the Redis one.

import { Redis } from "ioredis"
import { createRedisStream } from "@noverax/courier-redis"
import { courier } from "@noverax/courier/define"
import { tracked } from "@noverax/courier/realtime"

const history = createRedisStream({
  redis: new Redis(),
  prefix: "courier:stream:",
  maxLen: 1000,
})

await history.connect()

// Wherever an event happens
await history.append("activity:team-1", { data: { user: "ann" }, timestamp: Date.now() })

// The stream's handler sends what its client missed, after its Last-Event-ID
const { stream } = courier()

export const feed = stream.response<unknown>().implement(async function* (ctx) {
  for (const event of await history.getHistory("activity:team-1", ctx.lastEventId ?? "0")) {
    yield tracked(event.id, event.data)
  }
})

The Redis adapters guide has a complete handler that resumes across replicas, and presence used from a channel's handlers.

Presence — Who Is On a Topic, Across Replicas

Keeps who is on a topic in Redis — a sorted set of each connection's last heartbeat, a hash of its metadata — so every replica lists the same people. Give it a second connection as subscriber, and onDiff hears the joins and leaves of every replica, not only its own:

import { Redis } from "ioredis"
import { createRedisPresence } from "@noverax/courier-redis"

const presence = createRedisPresence({ redis: new Redis(), subscriber: new Redis() })

await presence.connect()

// In a channel's handlers: track a connection when it joins, untrack it when it leaves
await presence.track("room:general", { userId: "ann", connectionId: "conn_1", metadata: { status: "online" } })
const here = await presence.list("room:general")

// Hear every replica's joins and leaves
const stop = presence.onDiff("room:general", (diff) => console.log(diff.joins.length, "joined", diff.leaves.length, "left"))

// Remove connections without a heartbeat in the last 30 seconds
setInterval(() => presence.sweep("room:general", 30_000), 10_000)

API

createRedisPubSub(config: RedisPubSubConfig): PubSubAdapter

Creates a Pub/Sub adapter using two ioredis connections (one for publish, one for subscribe), with echo prevention via origin IDs. It sends Redis no more than queue: { maxMessages, maxBytes, maxAgeMs } holds unanswered, and queues what is published past it or while Redis is away within the same bounds, settles subscribe() once Redis has answered it, 2 seconds at most, makes every subscription again after a reconnect or a refusal, and reports where it stands through state, onStateChange() and stats(); connect({ timeoutMs }) and disconnect({ timeoutMs }) settle within their deadlines. With log: { maxEvents, ttlMs } it keeps each topic's events in Redis, numbered in one sequence for every replica, as its log.

createRedisStream(config: RedisStreamConfig): StreamAdapter

Creates a Streams adapter for durable ordered event storage. Uses XADD/XRANGE/XTRIM with automatic MAXLEN trimming.

createRedisPresence(config: RedisPresenceConfig): PresenceAdapter

Creates a presence adapter: track, heartbeat, untrack, list, sweep and onDiff over a sorted set and a hash per topic, with the diffs broadcast to the other replicas through the subscriber connection. It works before connect(), hears the other replicas' diffs again after a reconnect or a refused SUBSCRIBE, and its connect({ timeoutMs }) and disconnect({ timeoutMs }) settle within their deadlines.

createRedisConnectionLeases(config: RedisConnectionLeasesConfig): ConnectionLeaseStore

Creates the store a WebSocket handler's maxConnectionsPerKey counts connections in, so the limit holds across replicas: each decision is one Lua script on one key, on Redis's own clock, and a lease lapses unless renewed within ttlMs (60 s by default), which its replica does every third of it. A lease Redis lacks is put back as its replica renews it: a connection let in by the replica's own count, as Redis did not decide within timeoutMs (2 s by default), or one whose lease Redis lost, is counted again.

Part of Courier

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 @noverax/courier-redis

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

Ethersphere Hijacked With Crypto Stealing Malware (1)
npm

Ethersphere Hijacked With Crypto Stealing Malware Via Github & npm

Copy of Template Design OX Blog (2)
Research

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

Critical Apache HTTP Server Flaw Exposes Web Servers to RCE (1)
CVE

CVE-2026-119618: Critical Apache HTTP Server Flaw Exposes Web Servers to Remote Code Execution

Frame 2085668439 (1)
Group 1261154229