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

@stravon/scale-sdk

Latest version: v1.5.0

Overview

Last scanned
24 Nov 2026
Published
24 Nov 2026
npm package Publisher: stravon-tech-labs
6 Versions
397 Downloads

Scan summary

@stravon/scale-sdk was last scanned on 24 Nov 2026 at version 1.5.0. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 6 versions; the latest 3 were published within 2 days (23 and 24 Nov 2026).
  • Findings: No rules fired in version 1.5.0.
  • Downloads: 397 downloads.

Versions

6 versions published
Versions and the rules that fired in each
VersionPublishedStatus
1.5.0 LATEST 24 Nov 2026 No rules fired
1.4.0 24 Nov 2026 No rules fired
1.3.0 23 Nov 2026 No rules fired
1.2.0 12 Nov 2026 Not shown
1.1.1 15 Aug 2026 Not shown

No rules fired in 1.5.0

Findings

Findings for v1.5.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 1.5.0; other versions have their own rules, not their own score.

README

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

Stravon Client SDK (S.C.A.L.E)

TypeScript client SDK for the Stravon Management Platform. Storage-only in v1 — auth-route coverage is deferred to v2.

Install

npm install @stravon/scale-sdk

Requirements

Node 18+ (uses built-in fetch — no axios, node-fetch, or any added HTTP dependency).

Quickstart

import { ScaleClient } from "@stravon/scale-sdk";

const scale = new ScaleClient({ apiKey: "YOUR_API_KEY" });

const result = await scale.storage.upload({
  filename: "photo.jpg",
  contentType: "image/jpeg",
  body: fileBuffer,
});

console.log(result.usage.level); // "ok" | "warn80" | "upgrade90" | "overage"

API Reference

storage.create(params)

Maps to POST /v1/storage/files.

Input:

{ filename: string; contentType: string; fileSize: number }

Output:

{ uploadUrl: string; publicUrl: string; key: string; uuid: string; filename: string; usage: UsageSnapshot }

fileSize is the exact byte size of the file and is required. contentType must be image/* or video/*. fileSize must be a positive integer. The size is reserved against the project's storage quota before the URL is issued. Rejections: QuotaExceededError, SubscriptionExpiredError, ValidationError (see Error Handling).

storage.complete(params)

Maps to POST /v1/storage/files/complete.

Input:

{ key: string }

Output:

{ verified: boolean; bytes: number }
storage.read(params)

Maps to GET /v1/storage/files?key=....

Input:

{ key: string }

Output:

{ downloadUrl: string; publicUrl: string; key: string; filename: string }
storage.modify(params)

Maps to PATCH /v1/storage/files?key=....

Input:

{ key: string; contentType: string; fileSize: number }

Output:

{ uploadUrl: string; publicUrl: string; key: string; uuid: string; filename: string; usage: UsageSnapshot }

fileSize is the byte size of the replacement file and is required. Replacing a file counts the larger of old and new size, not both.

storage.delete(params)

Maps to DELETE /v1/storage/files?key=....

Input:

{ key: string }

Output:

{ success: boolean; key: string }
storage.usage()

Maps to GET /v1/storage/usage.

Input: none.

Output:

{

 tier: string;
 billingInterval: "monthly" | "annual";
 subscriptionStatus: "active" | "expired";
 currentPeriodEnd: string | null;
 usedBytes: number;
 quotaBytes: number;
 ceilingBytes: number;
 percent: number;
 level: "ok" | "warn80" | "upgrade90" | "overage";
 overageBytes: number;
 fileCount: number;
 maxFileBytes: number;
}

Behavior:

  • level: ok under 80% of quota, warn80 from 80% to under 90%, upgrade90 from 90% to under 100%, overage at 100% or more.
  • Uploads continue past 100% of quota and the excess is recorded as overageBytes. Uploads are rejected at ceilingBytes with QuotaExceededError.
  • Remaining quota: quotaBytes - usedBytes.
  • Units are decimal: 1 GB = 1,000,000,000 bytes.
  • Read, usage, and delete are never blocked by quota or subscription state.
  • Counts against the project's shared rate-limit bucket.
storage.upload(params) — convenience method

Orchestrates: create() → direct PUT to the returned uploadUrl → complete().

Input:

{ filename: string; contentType: string; body: BodyInit; fileSize?: number }

Output:

{ key: string; uuid: string; filename: string; verified: boolean; bytes: number; usage: UsageSnapshot }

fileSize is derived automatically from string, Blob/File, ArrayBuffer, and typed-array/Buffer bodies. For streams or FormData the size cannot be determined, so pass fileSize explicitly or a ValidationError is thrown before any request is made. usage is the state at reservation time, before this file's bytes were verified.

Note: The intermediate PUT step goes directly to the storage provider (R2/Cloudflare), not through the backend. If that PUT fails, the SDK throws a plain Error — not one of the typed error classes below — because the failure came from the storage infrastructure, not the backend API.


storage.batchRead(params)

Maps to POST /v1/storage/files/batch-read.

Input:

{ keys: string[] }

Output:

{
  results: Array<
    { key: string; downloadUrl: string; publicUrl: string; filename: string }
    | { key: string; error: string }
  >;
  retryAfterMs?: number;
}

Behavior:

  • Max 50 keys per call. Excess keys result in a 400 error before any tokens are consumed.
  • Partial failure is supported: individual keys that don't exist, belong to another project, or exceed rate limits come back as { key, error } entries inside results — the call does not throw for these. Possible per-key error values: "not_found", "cross_project", "rate_limit_exceeded".
  • If zero keys in the batch could be served (batch fully throttled), a RateLimitError is thrown — same as other methods, carrying retryAfterMs.
  • The order of results matches the order of input keys.

Error Handling

All eight error classes are exported from the package root.

Class Thrown when
ScaleError Base class for all SDK errors. Extends native Error.
AuthError Backend returns 401 (bad or missing API key).
RateLimitError Backend returns 429. Carries a retryAfterMs: number property matching the backend body { error: "rate_limit_exceeded", retryAfterMs }.
QuotaExceededError Backend returns 403 storage_ceiling_exceeded. Carries limitBytes and usedBytes (both optional numbers).
SubscriptionExpiredError Backend returns 403 subscription_expired. create() and modify() are blocked; read(), usage(), and delete() still work.
ValidationError Backend returns any other 400-class response, including 403 file_too_large (file exceeds the tier's single-file limit), non-image/video contentType, and missing or invalid fileSize.
ServerError Backend returns a 5xx response.
TimeoutError Client-side request exceeds the configured timeout (see Configuration below).

No retry logic exists anywhere in the SDK. The caller decides whether and how to retry.

Configuration

Option Type Default Description
apiKey string (required) Your project's API key.
baseUrl string https://stravon-management.onrender.com Backend base URL. Change only when targeting a dev/staging deployment.
timeoutMs number 65000 Client-side request timeout in milliseconds, applied to every backend request unless overridden per-call internally (e.g. read() uses a 20000ms timeout). Configurable via the constructor: new ScaleClient({ apiKey, baseUrl, timeoutMs }).

Usage widget

A framework-agnostic web-component-style widget that renders a project's storage usage as an arch gauge plus a detail table. It mounts into any element and manages its own polling, refresh, and teardown.

The widget sizes its layout from its own width, so it needs a block-level or width-defined host. In a shrink-to-fit parent (an inline-block, or a flex item with width:auto inside a parent that has no width) it stays in the compact phone layout.

Install path
npm install @stravon/scale-sdk

The widget is a separate entry point: import it from @stravon/scale-sdk/widget, not the package root.

import { mountUsageWidget } from "@stravon/scale-sdk/widget";
fetchUsage contract

mountUsageWidget(target, options) requires a fetchUsage function that resolves to a StorageUsageReport (the same type returned by client.storage.usage()):

interface UsageWidgetOptions {
  fetchUsage: () => Promise<StorageUsageReport>;
  refreshMs?: number;          // poll interval; 0 disables, 1-4999 raised to 5000; default 60000
  brand?: UsageWidgetBrand;    // optional color/font/radius overrides (see Branding)
  title?: string;
  onUpgrade?: () => void;      // fires for upgrade90 / overage / expired states
  onError?: (err: unknown) => void;
}

interface UsageWidgetBrand {
  accent?: string;    // ring and header icon; default #002147
  action?: string;    // Upgrade/Renew button background; default #d4af37
  actionInk?: string; // Upgrade/Renew button text; default #111111
  ink?: string;       // text color; default #002147
  surface?: string;   // card background; default #f6f4eb
  font?: string;      // CSS font-family; default Inter, system-ui, …
  radius?: string;    // card corner radius; default 20px
}

interface UsageWidgetHandle {
  refresh(): Promise<void>;    // force a reload
  destroy(): void;             // remove host + stop polling
}

The widget renders usedBytes, quotaBytes, ceilingBytes, percent/level, overageBytes, tier, billingInterval, subscriptionStatus, currentPeriodEnd, fileCount, and maxFileBytes. formatBytes uses decimal units (1 GB = 1,000,000,000 B). See the field mapping table below.

Server-route pattern (recommended)

fetchUsage should call your own backend route, which calls the SDK server-side with the project's API key. The widget never sees the raw key.

// Server route (e.g. GET /api/storage-usage)
import { ScaleClient } from "@stravon/scale-sdk";
const client = new ScaleClient({ apiKey: process.env.STRAVON_API_KEY! });
// return await client.storage.usage();
// Client
import { mountUsageWidget } from "@stravon/scale-sdk/widget";

const w = mountUsageWidget("#usage", {
  fetchUsage: () => fetch("/api/storage-usage").then((r) => r.json()),
  onUpgrade: () => (location.href = "/billing"),
});
// w.destroy() on unmount

usageFromClient(client) is a server-side helper that adapts a ScaleClient to the fetchUsage shape: fetchUsage: usageFromClient(client).

Warning — API key in the browser: Do NOT construct a ScaleClient with a raw API key in browser/client code and pass it as fetchUsage. Any key shipped to the browser is public and can be extracted. Route through your own backend (above) and keep STRAVON_API_KEY server-side only.

React / SPA cleanup:

useEffect(() => {
  const w = mountUsageWidget(ref.current!, { fetchUsage });
  return () => w.destroy();
}, []);
How the widget loads data

The widget never talks to Stravon directly. It calls fetchUsage(), which must resolve to a StorageUsageReport. Your backend route is what calls the SDK with the API key.

mountUsageWidget -> fetchUsage() -> integrator backend route -> client.storage.usage() -> GET /v1/storage/usage -> StorageUsageReport -> widget re-renders
  • Load: fetchUsage() is called once immediately on mount. Until it resolves, the card shows "Loading usage".
  • Update: a successful fetch replaces the previous report in full and the card re-renders. Call widget.refresh() to reload on demand.
  • Error: if the first fetch fails, the card shows the error and a Retry button. If a later refresh fails, the last good data stays visible with a "Refresh failed" banner.
  • Polling: with refreshMs (default 60000 ms) the widget refetches on that interval; refreshMs: 0 disables polling; values 1–4999 are raised to 5000. Polls are skipped while the document is hidden, and a visibilitychange back to visible refetches only if the data is older than refreshMs. An error carrying retryAfterMs pushes the next poll out to at least that delay.

Server route:

import { ScaleClient } from "@stravon/scale-sdk";
const client = new ScaleClient({ apiKey: process.env.STRAVON_API_KEY! });
// GET /api/storage-usage
return Response.json(await client.storage.usage());

Client:

import { mountUsageWidget } from "@stravon/scale-sdk/widget";
const widget = mountUsageWidget("#usage", {
  fetchUsage: () => fetch("/api/storage-usage").then((r) => r.json()),
});

After uploads / mutations:

await client.storage.upload(...); // or modify(...) / delete(...)
await widget.refresh();

Call await widget.refresh() after every upload, modify, or delete. The usage snapshot returned by upload() lacks fileCount and maxFileBytes, so it cannot render the full card on its own — refetch via refresh() to get a complete StorageUsageReport.

Do not ship the API key to the browser. Never construct a ScaleClient with a real API key in client-side code, and never pass such a client as fetchUsage. Keep STRAVON_API_KEY server-side and let the browser call only your own route.

Options

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 @stravon/scale-sdk

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Plug and Pray: Your AI Agents Are Taking Orders From Strangers
Research

Plug and Pray: Your AI Agents Are Taking Orders From Strangers

Ethersphere Hijacked With Crypto Stealing Malware (1)
npm

Ethersphere Hijacked With Crypto Stealing Malware Via Github & npm

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