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

Latest version: v0.8.0

Overview

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

Scan summary

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

  • Releases: 7 versions; the latest 4 were published within 6 days (13–18 Nov 2026).
  • Findings: No rules fired in version 0.8.0.
  • Downloads: 2,401 downloads.

Versions

7 versions published
Versions and the rules that fired in each
VersionPublishedStatus
0.8.0 LATEST 18 Nov 2026 No rules fired
0.7.1 16 Nov 2026 No rules fired
0.6.0 14 Nov 2026 No rules fired
0.5.0 13 Nov 2026 Not shown
0.3.1 20 Oct 2026 Not shown

No rules fired in 0.8.0

Findings

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

README

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

Why Courier

Most HTTP clients stop at “send a request, get a response”, and leave the types, the validation, the retries and the route the browser goes through to you. Courier starts from the definition: you describe each endpoint once, and every call made from it — on the server, in the page, over a stream — is typed by name, variables and answer, and checked at runtime. It works with any backend that speaks HTTP — FastAPI, Rails, Go, Laravel, a service you do not own — and asks nothing of it.

Install

npm install @noverax/courier

Or set up the API layer, its proxy route, Studio and a mock in your project with one command — Next.js, Nuxt, SvelteKit, Astro, React Router, SolidStart, Vite, Expo, Express, Hono, Fastify or NestJS:

npx @noverax/create-courier

Quick Start

1. Define your API
import { courier, defineApi, defineGroup } from "@noverax/courier/define"

const { endpoint } = courier()

type User = { id: string; name: string; email: string }

const users = defineGroup({
  prefix: "users",
  endpoints: {
    getAll: endpoint.get("").response<User[]>(),
    getById: endpoint.get(":id").variables<{ id: string }>().response<User>(),
    create: endpoint.post("").variables<{ name: string; email: string }>().response<User>(),
  },
})

export const api = defineApi({
  baseURL: "https://api.example.com",
  groups: { users },
})
2. Call endpoints

Direct mode — works anywhere with fetch:

import { createCaller } from "@noverax/courier/server"
import { api } from "./api/sources"

const caller = createCaller(api)

const users = await caller.users.getAll()
//    ^? User[]

const user = await caller.users.getById({ id: "1" })
//    ^? User

Proxy mode — browser → server → backend:

import { createProxyCaller } from "@noverax/courier/client"
import { routes } from "@noverax/courier/routes"

// The routes Courier's plugin builds from the endpoints you mark .expose():
// what a page may call, and how. The API definition — upstream URL, endpoint
// paths, middleware — stays on the server.
const caller = createProxyCaller(routes.api, { proxyPath: { http: "/api/request" } })

const users = await caller.users.getAll()
3. Add middleware
const api = defineApi({
  baseURL: "https://api.example.com",
  middleware: [
    retryMiddleware({ limit: 3 }),
    authMiddleware({ getToken: () => localStorage.getItem("token") }), // none yet: no header
  ],
  groups: { users },
})

retryMiddleware retries a request that got no answer, unless its certificate was refused, and the answers 408, 425, 429, 500, 502, 503 and 504 — not a timeout, nor an answer undici's own headersTimeout or bodyTimeout ran out waiting for, unless retryOn names it — after random waits that grow up to 20 s, or what an answer's Retry-After asks. A deadline bounds all the attempts together, and a retry budget its calls share stops the retries while an upstream keeps failing. It retries only endpoints that read: a write whose answer was lost may already have been carried out, so it is sent once unless it carries an idempotency key, it never left, or you pass mutations: true — do that only when the upstream recognises a repeated write. The same holds for a retry policy on a courier() base or an endpoint's .retry().

4. Add validation
import { z } from "zod"

const users = defineGroup({
  prefix: "users",
  endpoints: {
    getAll: endpoint.get("").response(z.array(UserSchema)),
    create: endpoint.post("").variables(z.object({ name: z.string().min(1), email: z.email() })).response(UserSchema),
  },
})

Testing

import { createTestClient } from "@noverax/courier/testing"
import type { api } from "./api/sources"

const { client, mock, history, reset } = createTestClient<typeof api>()

const alice = { id: "1", name: "Alice", email: "alice@test.com" }

mock("users", "getAll").resolves([alice])

const users = await client.users.getAll()
expect(users).toHaveLength(1)
expect(history).toHaveLength(1)
expect(history[0].group).toBe("users")
expect(history[0].method).toBe("getAll")

// Mock lifecycle
mock("users", "getAll").resolves([alice]).once()         // consumed after 1 call
mock("users", "getAll").resolves([alice]).times(3)       // consumed after 3 calls
mock("users", "getAll").resolves([]).delay(100)          // artificial delay
mock("users", "getById").rejects(500, { message: "Error" })  // mock errors

Proxy Security

The handler serves browser pages on the application's own origin and refuses a request another site's page made, so no third-party page can call your API with your users' cookies. A browser's Sec-Fetch-Site decides where it is sent — an <img> or a link on another site is refused even though it carries no Origin — and otherwise the page's Origin must be the origin the request was addressed to. A caller that sends neither is not a browser page, and is served.

Pages on other origins are served when allowedOrigins lists them. An entry is an exact origin, https://*.example.com for the sub-domains of a host over one scheme and port, or *.example.com for them over any.

A DNS-rebinding page points its own name at the machine the app runs on, and its calls then look same-origin to the browser. Every entry point therefore answers only for the host names the app is reached by: a request for another host gets 421 with the code HOST_NOT_ALLOWED, and a socket is closed with 4421. localhost, *.localhost names and IP addresses are always served; list the rest in allowedHosts — createHandler({ allowedHosts: ["app.example.com", "*.preview.example.com"] }), and the same option on createWSHandler and every adapter. Left out, development serves nothing else and production every name.

Either list may be a function, which the handler calls when the first request comes in — allowedHosts: () => [new URL(process.env.APP_URL!).host] reads the running app's variable, where a list would read it while a framework builds the route. Left out, they are COURIER_ALLOWED_HOSTS and COURIER_ALLOWED_ORIGINS, comma-separated. While a list cannot be read, every request is answered 500 with the code SERVER_MISCONFIGURED, and the log says why, once. createWSHandler reads both the same way when the first socket opens; while either cannot be read, every socket is answered auth_error and closed with 1011.

createHandler({ allowedOrigins: ["https://admin.example.com", "https://*.example.com"] })

The handler speaks CORS for those origins: it answers their preflight and gives every answer the permission a browser needs to read it. Route OPTIONS to the handler as well as GET and POST.

The proxy serves only the endpoints you mark — .expose() on an endpoint, or expose on its group or its API, the nearest deciding — and answers any other as a name the source does not define. From the marks, Courier's plugin for your build — @noverax/courier-build and the framework packages' /plugin — gives a page's proxy client its routes, as routes from @noverax/courier/routes, typed from the API you register, with the endpoints a page may call alone; or Courier writes them into courier.routes.ts — Studio as you work, courier-cli routes from @noverax/courier-cli without it:

// api.ts
export const api = defineApi({
  baseURL: "https://api.example.com",
  groups: {
    users: defineGroup({ prefix: "users", expose: true, endpoints: { getAll: endpoint.get("") } }),
    // Nothing marks it: the server's alone
    admin: defineGroup({ prefix: "admin", endpoints: { purge: endpoint.post("purge") } }),
  },
})

An API that keeps the user's session describes it, and the proxy — like a server rendering a page for the user — sends it the cookies the session is kept in and nothing else of the browser's, repeats its double-submit token on writes, refuses a write another site set off, and hands the browser the session cookies the API sets, made for your application's origin:

export const api = defineApi({
  baseURL: "https://api.example.com",
  session: { cookies: ["sessionid"], csrf: { cookie: "csrftoken", header: "x-csrftoken" } },
  groups: { users },
})

For an API that keeps none, cookies cross the proxy only where they are named: cookie in a source's allowedHeaders, a base's, or an endpoint's .headers() forwards the browser's cookies to the upstream, and set-cookie passes the upstream's back. Unnamed, neither crosses, so a source that points at a third party never receives your users' session and cannot set cookies on your origin. A backend-for-frontend sign-in names each where it travels:

const auth = defineGroup({
  prefix: "auth",
  endpoints: {
    login: endpoint.post("login").headers(["set-cookie"]), // the session reaches the browser
    me: endpoint.get("me").headers(["cookie"]), // and goes back to the upstream
  },
})

A client address is never copied from the caller, which can write any: the proxy sends the upstream an X-Forwarded-For it writes from the connection — the chain a reverse proxy on a loopback or private address wrote, with that proxy's address appended, or the caller's own public address. Where the runtime does not report the connection — Next.js, React Router, an edge function — the chain the proxy or the platform in front recorded goes on, so serve the app behind one that appends the address it saw: Next.js reached directly keeps the X-Forwarded-For the caller wrote. A platform that writes the header itself, such as a CDN that overwrites whatever the client sent, can have its copy forwarded by naming it: allowedHeaders: ["x-forwarded-for"].

A proxied call carries the server's credentials, so it follows an upstream redirect only while the redirect stays on the origin the call was sent to; a redirect to another origin reaches the caller as its status, unfollowed. Set redirect: "follow" on a source that trusts every redirect its upstream sends.

A streamed answer passes the upstream's body and content type through, from your application's origin, so it carries Content-Security-Policy: default-src 'none'; sandbox and X-Content-Type-Options: nosniff: HTML an upstream sends cannot run as your application when its URL is opened as a page.

Security Defaults

  • pathOptions decides its own keys. A path parameter pathOptions returns — a tenant read from the session cookie — cannot be replaced by a caller's variable of the same name, and a missing value refuses the call with a 400. To let the caller choose a path parameter, leave it out of pathOptions and declare it in the endpoint's variables.
  • A path parameter stays in its segment. Its value is percent-encoded, and . or .. — which the URL parser would resolve into a different route — refuse the call with a 400.

Logging

Courier logs through createLogger, which your own server code can use too:

import { createLogger } from "@noverax/courier/server"

const log = createLogger("Billing")

log.info("Invoice sent")
log.warn("Payment provider slow to answer", error) // the error prints with its stack and cause chain

On a server, debug and info go to stdout and warn and error to stderr, one line each: the time, the level, and courier: with the context in kebab case — createLogger("Billing") logs as courier:billing — then the message, the messages of every scope starting in one column. An error passed as the second argument is printed under the line the way the runtime's console prints errors — stack, cause chain, an AggregateError's errors, properties such as code — and the root of a chain too deep for the console to show is printed on its own.

16:03:59 ● courier:billing        Invoice sent
16:04:02 ▲ courier:billing        Payment provider slow to answer

On a terminal the level is a symbol in its colour — ● info, ▲ warn, ✕ error, · debug, with the debug line dimmed — and a request line such as GET /users → 404 (3ms) has its status coloured by class. Warnings, errors and statuses use the terminal's own sixteen colours, so they follow its theme, light or dark; only the info symbol is in Courier's blue, and the message keeps the terminal's foreground. A log file or a pipe gets plain text with the level as a word — 16:04:02 WARN courier:billing … — and COURIER_LOG_FORMAT=json writes one JSON object per line for a log pipeline:

{"time":"2026-10-04T13:04:02.120Z","level":"warn","scope":"billing","pid":4120,"message":"Payment provider slow to answer","error":{"name":"TypeError","message":"fetch failed","stack":"…","cause":{"name":"Error","message":"connect ECONNREFUSED 10.0.0.7:443","code":"ECONNREFUSED"}}}
Variable Values Default
COURIER_LOG_LEVEL debug, info, warn, error, silent info
COURIER_LOG_FORMAT text, or json for one JSON object per line text
NO_COLOR any non-empty value turns colour off colour on a terminal only
FORCE_COLOR 1, 2, 3 or true turns colour on, also into a pipe —

COURIER_LOG_LEVEL and COURIER_LOG_FORMAT are read on every line, so setting them in your entry module takes effect. In a browser the lines go to the devtools console, whose own level filter applies.

Before a server writes a line down, the line and the error under it lose every credential they carry: a token after Bearer, a password= pair, the password in a connection string, a header value the platform repeated as it refused it. An error that carries none prints as the error it is; one that does prints as a copy without it. redact() cuts the same way, for what your own code sends elsewhere:

import { redact } from "@noverax/courier/server"

Sentry.captureException(redact(error)) // the copy carries no token, password or secret header

A refusal the application meant — onConnect, onReauth, authorize, authorizeMessage, onSSEConnect or a middleware refusing — is one warn line with its code and the thrown error's name and message, at most once every 10 seconds for each kind, the rest counted; its stack is printed at debug. Keep secrets out of the messages of the errors these hooks throw.

Building Server Adapters

The createHandler function returns a Web Standard handler. All official adapters use it internally:

import { createHandler, registerSources } from "@noverax/courier/server"
import { sources } from "./api/sources"

registerSources(sources)

const handler = createHandler({ allowedOrigins: ["https://app.example.com"] })

// handler.handle(request)     — auto-routes GET/POST/SSE
// handler.handleGet(request)  — query endpoints only
// handler.handlePost(request) — mutations + data
// handler.handleSSE(request)  — streams
// handler.shutdownSSE()       — drains open streams before the host closes

Given sources — createHandler({ sources }) — the handler answers for those alone. Without them it reads the process-wide registry that registerSources() and attachRuntime() fill, at request time, which is how the framework adapters work. createWSHandler takes sources the same way. Pass it nothing to accept the defaults.

For Node.js servers, use toWebRequest and sendWebResponse from @noverax/courier/node to bridge between Node.js and Web Standard APIs. An adapter announces what it hosts to Studio with announceWhenRegistered from @noverax/courier/announce, called on each request.

Exports

The package's entry points, each loaded only where it is imported:

@noverax/courier — Main

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

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

Vulnerability Insights

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

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?

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