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

@paystage/policy

Latest version: v0.4.0-canary.95

Overview

Last scanned
27 Nov 2026
Published
27 Nov 2026
npm package Publisher: loadmaster, munts-west, paystage-admin
9 Stars
13 Forks
20 Versions
11.3K Downloads
TypeScript Repo language

Scan summary

@paystage/policy was last scanned on 27 Nov 2026 at version 0.4.0-canary.95. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 20 versions; the latest 5 were published within 4 days (24–27 Nov 2026).
  • Findings: No rules fired in version 0.4.0-canary.95.
  • Downloads: 11,345 downloads.

Versions

20 versions published
Versions and the rules that fired in each
VersionPublishedStatus
0.4.0-canary.95 LATEST 27 Nov 2026 No rules fired
0.4.0-canary.94 26 Nov 2026 No rules fired
0.4.0-canary.93 25 Nov 2026 No rules fired
0.4.0 24 Nov 2026 Not shown
0.3.1-canary.90 24 Nov 2026 Not shown

No rules fired in 0.4.0-canary.95

Findings

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

README

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

@paystage/policy

Shared spending-policy schema and loader for PayStage agent payment tools.

Install

npm install @paystage/policy

Zero runtime dependencies

This package has no runtime dependencies (#181). The policy parser is hand-written (src/guards.ts); zod is a devDependency, used by tests/differential.test.ts as the oracle for every fixture in the repository plus generated mutations. That test is the reason the replacement is safe: it asserts the same accept/reject decision, the same parsed output and the same invalid policy: message, byte for byte.

The gain is narrow and worth stating exactly. This is the evaluator every other surface depends on, so npm i @paystage/preflight is now one installable evaluator with no schema library in the tree.

What this does not claim: @paystage/mcp, @paystage/velocity, @paystage/auth-watch, @paystage/trade-preflight and @paystage/ai-sdk are built on the official @modelcontextprotocol/server SDK, which lists zod as its own dependency. They inherit zod from the SDK; removing our imports does not remove it from a user's tree.

Usage

import { parsePolicy, loadPolicy, humanToAtomic } from "@paystage/policy";

// Parse an in-memory object (validates against the schema).
const policy = parsePolicy({
  version: 1,
  // The ceiling is per asset, and every allowed asset must be capped unless allow_uncapped_assets says otherwise.
  max_amount: { value: "1.00", asset: "USDC", decimals: 6 },
  allowed_networks: ["eip155:8453"],
  // `network` is optional: an entry without one matches this address on any network the policy allows (#37).
  allowed_assets: [
    { symbol: "USDC", decimals: 6, address: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913" },
  ],
  allowed_pay_to: ["0x209693Bc6afc0C5328bA36FaF03C514EF312287C"],
  max_timeout_seconds: 300,
  unknown_payee: "review",
  // Optional step-up (#414): a large or novel payment becomes `review`, answerable by the principal without a
  // browser. `answers` defaults to all three non-interactive methods; human approval is only the fallback.
  step_up: {
    amount_above: { value: "0.02", asset: "USDC", decimals: 6 },
    unknown_payee: true,
    answers: ["pre_signed_allowance", "second_key", "bounded_auto_approve"],
  },
});

// Load and validate from disk.
const fromDisk = await loadPolicy("./policy.json");

// Convert human-readable USDC to atomic units (6 decimals).
humanToAtomic("0.50"); // "500000"

API

  • parsePolicy(input) — validate an object, returns a typed Policy.
  • loadPolicy(path) — read + parse a JSON policy file.
  • humanToAtomic(amount) — convert "0.50" → "500000" (USDC, 6 decimals).

Supply chain and access

Flag Why it is there
Filesystem access loadPolicy() reads one JSON file — the policy it evaluates against. It never writes.
Environment variable access PAYSTAGE_POLICY_PATH, as a fallback when no path argument is given.
Network access None. This package is pure: policy in, normalised policy out.

No shell, no eval, no telemetry. Full table: SECURITY.md.

Links

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 @paystage/policy

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

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?

Copy of Template Design OX Blog (3)
Research

Ruby2Shell: Ruby Memory Corruption Flaws Expose Applications to Remote Code Execution, But is it an Actual Risk?

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