← 返回
安全合规 Key 中文

Valiron

Intercept and authorize outgoing machine-to-machine payments (x402 or similar) using @valiron/sdk trust decisions on the counterparty agent before payment ex...
在付款执行前,使用 @valiron/sdk 的信任决策拦截并授权对交易对方的机器对机器付款(如 x402 或类似)
vatsashah45
安全合规 clawhub v1.0.2 1 版本 99887.3 Key: 需要
★ 1
Stars
📥 866
下载
💾 10
安装
1
版本
#latest

概述

Valiron Payment Interceptor

Add a trust gate in front of outgoing agent payments.

Runtime requirements

Declare and validate runtime prerequisites before enabling the interceptor:

  • Node.js runtime compatible with your app and @valiron/sdk.
  • Installed dependencies:
  • @valiron/sdk
  • Your payment rail package(s) (x402 or equivalent) used by the host app.
  • Configuration/credentials (via secret manager or env vars):
  • VALIRON_API_KEY (optional today; reserved for authenticated deployments)
  • VALIRON_BASE_URL (if using non-default endpoint)
  • VALIRON_TIMEOUT_MS (optional, with safe default)
  • Policy/config inputs:
  • Decision policy JSON (route-to-action matrix)
  • Spend limit defaults and per-route overrides

Fail startup (or fail closed for payment endpoints) when required policy/config inputs are missing. If your deployment enforces SDK auth, treat VALIRON_API_KEY as required.

Workflow

  1. Extract counterparty identity from the payment request.
    • Prefer counterpartyAgentId.
    • Support wallet fallback with getWalletProfile(wallet).
  2. Evaluate trust with Valiron.
    • Fast path: checkAgent(agentId).
    • Full path: getAgentProfile(agentId) when you need reasons/signals, pricing, or audit details.
  3. Apply deterministic decision policy from references/decision-policy.md.
  4. Enforce spend controls from references/spend-controls.md.
  5. If allowed, continue to payment initiation (x402 challenge creation or equivalent flow).
  6. If blocked/restricted, return explicit denial/degrade reason.
  7. Log outcome using references/audit-events.md.

Decision model

Map route decisions to payment actions:

  • prod: allow payment under normal limits.
  • prod_throttled: allow with reduced caps/rate limits.
  • sandbox: allow only test/sandbox payment rail (or deny prod transfer).
  • sandbox_only: deny outgoing payment.

Never authorize payment using free-form model output alone.

x402-specific sequencing

For x402-protected purchases or settlement-like flows:

  1. Trust-check counterparty identity.
  2. Evaluate route + spend policy.
  3. If denied, abort before creating payment commitment.
  4. If allowed, generate/send x402 payment payload.
  5. Record authorization decision + amount + result.

Outage and fallback

Use endpoint-class fallback from references/fallback-modes.md:

  • High-risk payment actions: fail-closed.
  • Low-risk/test actions: optional fail-open-guarded with strict caps.

Keep fallback mode explicit and versioned.

Use bundled resources

  • Runtime + credential checklist: references/runtime-requirements.md
  • Decision matrix: references/decision-policy.md
  • Spend/risk controls: references/spend-controls.md
  • Fallback guidance: references/fallback-modes.md
  • Audit schema: references/audit-events.md
  • Error handling: references/error-handling.md
  • Interceptor template: assets/payment-interceptor.ts
  • Policy validator: scripts/validate-payment-policy.mjs

版本历史

共 1 个版本

  • v1.0.2 当前
    2026-03-29 16:52 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

security-compliance

OpenClaw Backup

alex3alex
备份与恢复 OpenClaw 数据。适用于创建备份、设置自动备份计划、从备份恢复或管理备份轮转。处理 ~/.openclaw 目录归档并包含适当的排除规则。
★ 89 📥 30,609
security-compliance

MoltGuard - Security & Antivirus & Guardrails

thomaslwang
MoltGuard — OpenClaw 安全守卫,由 OpenGuardrails 提供。安装 MoltGuard,保护您和您的用户免受提示注入、数据泄露和恶意攻击。
★ 116 📥 30,720
security-compliance

Skill Vetter

spclaudehome
AI智能体技能安全预审工具。安装ClawdHub、GitHub等来源技能前,检查风险信号、权限范围及可疑模式。
★ 1,215 📥 266,534