Skip to content
NOUMENResearch
Network
Engineering
, home page

Developers

The same records, from your own code.

One HTTP API serves everything on this site: 80 paths, 98 operations.

Quickstart

Three ways in.

None of the three needs an account.

Command line
npm install
npm run build -w noumen-cli
node cli/dist/main.js scan path/to/project
node cli/dist/main.js scan --format cyclonedx --output cbom.json

Command line: Node 22 or later; sends only package names and ecosystems to OSV. curl: anonymous scans are unlisted and expire after 30 days; file contents are not stored. TypeScript: @noumen/sdk, generated from the OpenAPI document. The tool and the SDK are not on npm yet; build them from the source repository.

Reports come as json (default), markdown, cyclonedx (CycloneDX 1.6) or text, from the tool or with ?format= on GET /v1/scans/{id}. The tool reads manifests and lockfiles, never source code. The API is at https://noumen-omega.vercel.app/api; every operation is in the API reference.

Command line: commands, options and exit codes for noumen 0.1.0
Commands
CommandWhat it does
noumen scan [path]Scan a folder. Without a path, the current folder.
noumen explain <ecosystem> <package>Show the catalogue entry for a package. The ecosystem is npm or crates.io.
noumen catalogueShow the catalogue version and counts.
noumen --versionShow the tool, engine and catalogue versions.
noumen --helpShow the help text.
Options for scan
OptionWhat it does
--format table|json|markdown|cyclonedxOutput format. table is the default.
--output <file>Write the report to a file instead of the terminal.
--no-advisoriesDo not look up public advisories. Nothing is sent anywhere.
--fail-on affected|possible|neverExit with code 2 when a match is found. affected: a resolved version is in a published affected range. possible: also when only a declared range may include one. The default is never.
--no-colorPlain output without colors.
--quietPrint nothing but the report and errors.
Exit codes
CodeMeaning
0Success.
1An error.
2A match was found and --fail-on asked to fail.

Authentication

Keys act for a workspace.

Send Authorization: Bearer nmn_live_.... Keys are made in a workspace, shown once, stored as a prefix and a hash, and stop working on the next request after you revoke them.

What each credential can do
CredentialCan
nonePublic records: findings, advisories, components, algorithms, standards. Anonymous scans.
readGET on the workspace’s scans, monitors, alerts and webhooks.
writeAlso POST, PATCH and DELETE on those. A read-only key gets 403.
sessionAccount, membership, keys, submissions, review and admin. A key gets 403.

Limits and errors

Limits, as the server counts them.

Over a limit: 429 rate_limited with Retry-After in seconds. A scan by a key counts against scan-auth and write.

Rate limits by group
GroupCoversLimitPerCounted by
authSign-up, sign-in, password reset and the other account routes, and account deletion.2015 minutesAddress
scan-upload-anonScans of uploaded files without an account or key.201 hourAddress
scan-repo-anonRepository scans without an account or key.61 hourAddress
scan-authScans by a signed-in user or an API key.1201 hourAccount or key
applicationsThe application form.51 hourAddress
submissionsFinding submissions.201 dayAccount or key
monitor-runRunning a monitor on demand.101 hourAccount or key
webhook-testTest pings to a webhook.201 hourAccount or key
triageAssisted triage requests by reviewers.601 hourAccount or key
writeEvery request that changes data, by a signed-in user or an API key.3005 minutesAccount or key
readEvery GET request.1,2005 minutesAddress

Bodies: 1 MB, or 5 MB and 40 files for scans; larger ones get 413 payload_too_large.

Every error is { "error": { "message", "type" } }. Branch on type; the message is for people and may change.

All 13 error types
Error types
TypeStatusMeaning
bad_request400The request could not be read, for example malformed JSON.
validation_error400A field is missing or out of range. The message names it.
unauthorized401No valid session or API key.
forbidden403Signed in, but not allowed: a read-only key, the wrong role, or a person-only action tried with a key.
not_found404No such record, or one you cannot see. Other workspaces’ resources and unpublished findings answer this too.
conflict409The record is not in a state that allows this, such as a move the state machine does not allow.
gone410The link or record has expired.
payload_too_large413The body is over the size limit.
rate_limited429Too many requests. Wait the number of seconds in Retry-After.
origin_mismatch403A request that changes data with a session cookie came without an allowed Origin header.
not_configured503The feature needs a setting this deployment does not have, such as assisted triage without its key.
upstream_error502A service Noumen depends on, such as GitHub or OSV, failed or timed out.
internal_error500Something failed on Noumen’s side. Nothing about the cause is returned.

Webhooks

Signed deliveries, retried.

Events: monitor.changed, advisory.matched, finding.state_changed, ping.

  • https only, checked against private and internal ranges when added and before each delivery.
  • Signed: Noumen-Signature: t=<unix seconds>,v1=<hex HMAC-SHA256 of "t.body">.
  • Any 2xx succeeds. Otherwise retried after 1 minute, then 10 minutes, then 1 hour, then 6 hours, 5 attempts in all; then the webhook is marked failing.
Verify a delivery

Check the signature against the raw body before parsing, and refuse deliveries older than five minutes. This site's tests run this function against the SDK's verifier.

js
import { createHmac, timingSafeEqual } from 'node:crypto';

// secret: the webhook's signing secret, shown once when you created it.
// header: the Noumen-Signature request header.
// rawBody: the request body exactly as received, before JSON.parse.
export function verifyNoumenSignature(secret, header, rawBody, toleranceSeconds = 300) {
  const parts = {};
  for (const piece of String(header ?? '').split(',')) {
    const at = piece.indexOf('=');
    if (at > 0) parts[piece.slice(0, at).trim()] = piece.slice(at + 1).trim();
  }
  if (!/^\d{1,12}$/.test(parts.t ?? '') || !/^[0-9a-f]{64}$/i.test(parts.v1 ?? '')) return false;
  const age = Math.abs(Math.floor(Date.now() / 1000) - Number(parts.t));
  if (age > toleranceSeconds) return false;
  const expected = createHmac('sha256', secret).update(`${Number(parts.t)}.${rawBody}`).digest();
  return timingSafeEqual(expected, Buffer.from(parts.v1, 'hex'));
}

With the TypeScript client:

ts
import { verifyWebhookSignature } from '@noumen/sdk/webhooks';

const result = await verifyWebhookSignature(secret, request.headers.get('noumen-signature'), rawBody);
if (!result.valid) return new Response('bad signature', { status: 400 });
Events and payload
  • monitor.changed: a monitor run found packages added, removed or changed, or advisories matched or cleared.
  • advisory.matched: a monitor run found advisories that newly match the repository.
  • finding.state_changed: a public finding about a package one of your monitored repositories uses moved to another state.
  • ping: a test delivery you asked for.
json
{
  "id": "<delivery id>",
  "event": "finding.state_changed",
  "createdAt": "<ISO 8601 time>",
  "workspaceId": "<workspace id>",
  "data": {
    "finding": {
      "id": "<NMN id>",
      "title": "<title>",
      "from": "in-review",
      "to": "reproduced",
      "component": {
        "ecosystem": "npm",
        "name": "<package>"
      }
    }
  }
}

Headers also carry Noumen-Event, Noumen-Delivery and the user agent Noumen-Webhooks/1.