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.
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.jsonBASE=https://noumen-omega.vercel.app/api
# Scan a lockfile, then fetch the report as CycloneDX
ID=$(jq -n --rawfile c package-lock.json '{files: [{path: "package-lock.json", content: $c}]}' \
| curl -s -X POST "$BASE/v1/scans" -H "Content-Type: application/json" --data-binary @- \
| jq -r .scan.id)
curl "$BASE/v1/scans/$ID?format=cyclonedx" -o cbom.json
# Or scan a public GitHub repository
curl -X POST "$BASE/v1/scans" -H "Content-Type: application/json" \
-d '{"repository": "https://github.com/owner/repo"}'import { createNoumen } from '@noumen/sdk';
const noumen = createNoumen({ baseUrl: 'https://noumen-omega.vercel.app/api', apiKey: process.env.NOUMEN_API_KEY });
const scan = await noumen.scanFiles([{ path: 'package-lock.json', content: lockfileText }]);
const cbom = await noumen.exportScan(scan.scan.id, 'cyclonedx');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
| Command | What 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 catalogue | Show the catalogue version and counts. |
| noumen --version | Show the tool, engine and catalogue versions. |
| noumen --help | Show the help text. |
| Option | What it does |
|---|---|
| --format table|json|markdown|cyclonedx | Output format. table is the default. |
| --output <file> | Write the report to a file instead of the terminal. |
| --no-advisories | Do not look up public advisories. Nothing is sent anywhere. |
| --fail-on affected|possible|never | Exit 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-color | Plain output without colors. |
| --quiet | Print nothing but the report and errors. |
| Code | Meaning |
|---|---|
| 0 | Success. |
| 1 | An error. |
| 2 | A 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.
| Credential | Can |
|---|---|
| none | Public records: findings, advisories, components, algorithms, standards. Anonymous scans. |
| read | GET on the workspace’s scans, monitors, alerts and webhooks. |
| write | Also POST, PATCH and DELETE on those. A read-only key gets 403. |
| session | Account, 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.
| Group | Covers | Limit | Per | Counted by |
|---|---|---|---|---|
| auth | Sign-up, sign-in, password reset and the other account routes, and account deletion. | 20 | 15 minutes | Address |
| scan-upload-anon | Scans of uploaded files without an account or key. | 20 | 1 hour | Address |
| scan-repo-anon | Repository scans without an account or key. | 6 | 1 hour | Address |
| scan-auth | Scans by a signed-in user or an API key. | 120 | 1 hour | Account or key |
| applications | The application form. | 5 | 1 hour | Address |
| submissions | Finding submissions. | 20 | 1 day | Account or key |
| monitor-run | Running a monitor on demand. | 10 | 1 hour | Account or key |
| webhook-test | Test pings to a webhook. | 20 | 1 hour | Account or key |
| triage | Assisted triage requests by reviewers. | 60 | 1 hour | Account or key |
| write | Every request that changes data, by a signed-in user or an API key. | 300 | 5 minutes | Account or key |
| read | Every GET request. | 1,200 | 5 minutes | Address |
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
| Type | Status | Meaning |
|---|---|---|
| bad_request | 400 | The request could not be read, for example malformed JSON. |
| validation_error | 400 | A field is missing or out of range. The message names it. |
| unauthorized | 401 | No valid session or API key. |
| forbidden | 403 | Signed in, but not allowed: a read-only key, the wrong role, or a person-only action tried with a key. |
| not_found | 404 | No such record, or one you cannot see. Other workspaces’ resources and unpublished findings answer this too. |
| conflict | 409 | The record is not in a state that allows this, such as a move the state machine does not allow. |
| gone | 410 | The link or record has expired. |
| payload_too_large | 413 | The body is over the size limit. |
| rate_limited | 429 | Too many requests. Wait the number of seconds in Retry-After. |
| origin_mismatch | 403 | A request that changes data with a session cookie came without an allowed Origin header. |
| not_configured | 503 | The feature needs a setting this deployment does not have, such as assisted triage without its key. |
| upstream_error | 502 | A service Noumen depends on, such as GitHub or OSV, failed or timed out. |
| internal_error | 500 | Something 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.
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:
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.
{
"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.