Scan your whole stack
Are you using @noverax/courier-redis?
Find out what’s in your code.
Scan your apps free in minutes (opens in a new tab)Latest version: v0.9.0
@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.
| Version | Published | Status |
|---|---|---|
| 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 |
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.
The publisher’s own README, as collected from the registry.
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.
npm install @noverax/courier-redis @noverax/courier ioredis
ioredis 5.3 or later: its named Redis export is what the types use.
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 })
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.
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)
createRedisPubSub(config: RedisPubSubConfig): PubSubAdapterCreates 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): StreamAdapterCreates a Streams adapter for durable ordered event storage. Uses XADD/XRANGE/XTRIM with automatic MAXLEN trimming.
createRedisPresence(config: RedisPresenceConfig): PresenceAdapterCreates 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): ConnectionLeaseStoreCreates 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.
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.
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).
The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.