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

agents-pay

Latest version: vgit:27138dc2f8bb77d63797e53f6bc45ed0e973b8a8

Overview

Last scanned
13 Nov 2026
Agent skill Publisher: aws
3,481 Stars
457 Forks
1 Versions
Python Repo language

Scan summary

agents-pay was last scanned on 13 Nov 2026 at commit 27138dc2. Risk score 1 of 100 (low). No malicious behavior was detected.

  • Releases: Single version.
  • Findings: 2 rules fired in commit 27138dc2 (4 instances: 4 low). The score describes this commit only.

Versions

1 version published
Versions and the rules that fired in each
VersionPublishedStatus
27138dc2 2 rules fired

Rules fired in 27138dc2: 2

Findings

4 Low

Findings for commit 27138dc2. 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.

Phrase match: acting without asking the user (not reviewed)

An automated phrase check found wording such as "don't ask the user". It does not tell a skipped confirmation apart from an instruction to look something up instead of asking for it. Not reviewed by a person.

LOW

Skill mentions tunnel, paste or webhook services

LOW
Checking access…

🔒 Create a free account to see all 4 findings with descriptions and instance counts

The score describes 27138dc2; other versions have their own rules, not their own score.

README

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

pay

Let an agent pay for x402-protected content without letting the agent — or anything it reads — decide who gets paid, how much, or how often.

The one idea that matters

A payment decision is made in code, from a policy file, before any signing. Nothing the model says, and nothing inside fetched content, can authorize a payment or raise a limit.

An instruction to a model is not an access control: it is a request that a confused or prompt-injected model may decline. Controls must be enforced in code at the point where payment is authorised.

So in this skill every control is executable, and the model's entire payment surface can only spend an already-approved, bounded session — it can pay, check remaining budget, and obtain an opaque handle for a browser navigation, and nothing more.

When to use

This skill is for an agent that needs to pay for something itself, right now — the coding agent you are talking to, or an agent host like OpenClaw, hitting a paywall mid-task and settling it.

  • The agent you are running hits an x402 paywall (HTTP 402) and needs the content
  • You need hard spend limits on what that agent can pay, per payment and per session
  • A payment was refused and you need to know which rule rejected it
Not this skill: building a payment-capable agent

If you are writing an agent that will take payments or pay on behalf of its own end users — provisioning a wallet per customer, wiring a payments plugin or middleware into a product you are shipping — that is the agents-build skill and its references/payments.md. It covers the framework-native integrations and the per-end-user data plane.

The distinction is who spends:

agents-build → references/payments.md agents-pay (this skill)
Question "How do I give the agent I'm building the ability to pay?" "This agent needs to pay for this thing now"
When Build time, in a product you ship Run time, in the session you are in
Wallet One per end user of your product One for this installation
Who approves spend Your product's own flow The operator, at a terminal

Both are valid; they answer different questions. If you are shipping a payments feature to customers, start with agents-build.

Do NOT use for:

  • Non-paid external APIs or tools → agents-connect
  • Inbound auth, who may invoke your agent → agents-harden
  • Project creation or framework choice → agents-get-started
  • Building payment capability into an agent you are shipping → agents-build
  • Wallet custody, fiat payouts, or chargeback handling — out of scope

Input

$ARGUMENTS can be:

  • A task: setup, wire, debug, session, budget, coinbase, stripe
  • A description: "pay for this API", "402 error", "why did it refuse to pay"
  • Empty — the skill determines the workflow from context

Read this before deploying

The agent must not have the ManagementRole, and must not be able to run the admin CLI.

The whole security model rests on that separation. Follow the official IAM roles for AgentCore payments guide:

  • A human uses the ManagementRole to create payment instruments and sessions. That role carries an explicit Deny on ProcessPayment.
  • The agent runs with the ProcessPaymentRole, which can execute a payment against an already-approved session but cannot create one.

If the agent gets both — or gets shell access to scripts/agents_pay_admin.py while holding the ManagementRole — it can mint itself a fresh budget whenever it exhausts one, and the per-session cap stops bounding anything. AWS says it plainly: "Do not include PaymentSession write permissions ... and ProcessPayment in the same role, or the caller can bypass payment limits by creating new sessions with elevated budgets."

Two mitigations, and you want both:

  1. IAM is the real boundary. The runtime role must exclude CreatePaymentSession and every Create* setup action.
  2. The admin CLI refuses to run headless as defence in depth — new-session requires a human typing approve at a TTY, and there is no --yes flag. Do not treat this as a substitute for IAM: an agent running as your user in an interactive terminal could still drive it.

Deploy the admin CLI outside the agent's reach where you can — a separate host, or a workstation rather than the runtime image.

Architecture: two paths that never touch

Payments split into an admin path (a human, at a terminal) and a runtime path (the agent). They share resource identifiers and nothing else.

ADMIN PATH — human only, holds credentials
  agentcore add payment-manager / payment-connector   (provider secrets via CLI wizard)
  agents_pay_admin.py init-config                    -> ~/.agents-pay/config.json (0600)
  agents_pay_admin.py new-session                    -> budget-bounded session, typed approval
        |
        |  passes ONLY: PAYMENT_MANAGER_ARN, PAYMENT_INSTRUMENT_ID,
        |               PAYMENT_SESSION_ID, PAYMENT_USER_ID
        v
RUNTIME PATH — spend only; never create
  x402_fetch(url)                        payment_session_status()   [read-only]
        |-- load policy, vet destination      (refuse before any network I/O)
        |-- GET, no redirects, pinned IP, bounded body
        |-- parse 402 challenge strictly
        |-- authorize_payment()               <-- THE decision, in code
        |-- settle, attach proof, discard it  (proof never returned)
        `-- return metadata + body hash; paid body withheld

  prepare_browser_payment(url)           -> opaque single-use handle, no proof
        `-- attach_browser_payment(...)   -> trusted glue only, at navigation

The agent cannot create a session, cannot provision infrastructure, cannot read the policy file's meaning, and never holds a provider credential. When a session budget is spent, spending stops until a human runs new-session again.

Tool inventory

Match by role — your runtime may prefix or rename these.

Role Function Who calls it Model-visible?
Pay and fetch content x402_fetch(url) Agent Yes — the main tool
Check session usability payment_session_status() Agent Yes — read-only, cannot mint budget
Pay for a browser navigation prepare_browser_payment(url) Agent Yes — returns an opaque handle, never the proof
Redeem a handle at navigation attach_browser_payment(handle, url) Trusted glue, not the model No
Create a payment session agents_pay_admin.py new-session Human at a TTY No
Provision infrastructure agentcore CLI + admin script Human No

The split is the design. An agent can spend an approved, bounded session and ask whether it still has budget. It cannot create budget, provision resources, or handle a credential.

Browser / header-only payments

When a paid resource must render in a real browser, the proof has to reach the navigation — but it must not reach the model. Use the handle flow:

# 1. Model-facing tool: pays, returns a handle + redacted receipt (no proof)
result = json.loads(prepare_browser_payment("https://merchant.example/paid"))
# {"paid": true, "handle": "x402h_...", "receipt": {...}}

# 2. Trusted glue redeems the handle and drives the browser
header = attach_browser_payment(result["handle"], "https://merchant.example/paid")
browser.set_extra_http_headers(header)
browser.navigate("https://merchant.example/paid")

Handles are single-use, expire in 90 seconds, and are bound to one origin and path. A handle copied out of a transcript cannot be redeemed for a different resource, cannot be redeemed twice, and is not a credential.

Register prepare_browser_payment as the model's tool. Keep attach_browser_payment in your own glue code — it returns the real header.

Files

File Role
scripts/x402_policy.py The trusted decision point: policy loading, destination vetting, challenge validation, idempotency derivation
scripts/x402_fetch_cli.py How the agent invokes this skill — argv in, JSON out, exit 2 on refusal. No framework needed
scripts/x402_fetch.py Hardened fetch + settle, session status, and the browser handle flow. See the tool inventory above for what to expose to the model
scripts/agents_pay_admin.py Human-run admin CLI: init-config, show-config, create-instrument, new-session, preflight
scripts/test_x402_policy.py Security regression tests for the enforced controls
references/operator-guide.md Operator setup, IAM role separation, and recipient allowlisting
references/security-model.md Threat model, security controls, and their enforcement
references/setup.md Full provisioning walkthrough and IAM policies
references/troubleshooting.md Refusal and failure diagnosis

All paths are inside this skill directory. That is deliberate: some installers copy a single skill folder and flatten it, so a reference to a sibling skill's files (../other-skill/...) can silently break. Everything needed is here.

Process

Step 0: Prerequisites
python3 --version                      # 3.9+
python3 -m venv .venv
source .venv/bin/activate
python -m pip install -r requirements.txt
agentcore --version

bedrock_agentcore.payments must be importable. Verify: python -c "from bedrock_agentcore.payments import PaymentManager".

Step 1: Provision payment resources — human runs this outside the LLM loop

The agent must NOT run this step; it involves provider credentials. Tell the user to open a separate terminal and complete the commands there. Do not ask them to paste credentials, command output, deployed state, or generated IDs back into chat. Wait only for the user to confirm that setup completed.

npm install -g @aws/agentcore
agentcore add payment-manager          # NO FLAGS — interactive wizard
agentcore add payment-connector        # NO FLAGS — interactive wizard
agentcore deploy                       # interactive deployment

Run both agentcore add commands with no flags to keep the complete setup flow in the human's terminal. In particular, connector secret flags put values in shell history and the process list. See references/setup.md for obtaining Coinbase CDP / Stripe Privy credentials and for the split IAM policies.

agentcore/.env.local holds provider secrets in plaintext until deploy uploads them to AgentCore Identity. Ensure .env.local is gitignored. The agent must never read that file.

Step 2: Write the payment policy — human runs this

Until this file exists, every payment is refused. There is no permissive default.

python3 scripts/agents_pay_admin.py init-config \
  --max-per-payment-usd 0.05 \
  --network eip155:84532 \
  --recipient 0xMerchantWalletAddress

Use repeatable --recipient flags for the normal allowlist mode. To deliberately let publishers choose the beneficiary, use --allow-any-recipient instead. The two modes are mutually exclusive.

Add --origin https://<host> (repeatable) only to pin the agent to a known merchant set; omitted, it may fetch any public HTTPS site.

Written to ~/.agents-pay/config.json, mode 0600, via atomic replace. It pins these policy keys (use hyphens for the corresponding CLI flags, e.g. --allow-any-recipient):

Config key Effect
max_per_payment_usd Per-payment ceiling. Above it → refuse
allowed_networks Exact CAIP-2 networks
allowed_assets Exact token contract per network
allowed_recipients Approved payTo wallet addresses. Unknown recipients → refuse
allow_any_recipient Explicit high-risk alternative to allowed_recipients; publishers may choose payTo
allowed_origins Optional. Omit to allow any public HTTPS site; set to pin a merchant set
allowed_schemes Defaults to exact

A missing recipient mode denies. Setting both recipient modes is invalid. There is no implicit wildcard. USDC contracts come from a pinned table in the admin script, so a look-alike contract cannot be pasted in.

Step 3: Create a per-user instrument — human runs this
python3 scripts/agents_pay_admin.py create-instrument --email you@example.com

The manager ARN and connector ID are read from agentcore/.cli/deployed-state.json (written by agentcore deploy), so nothing needs copying by hand — run it from the project directory, or pass --manager-arn / --connector-id.

It prints the wallet address, the delegation URL, and the export lines for the runtime. Delegation and funding are then done by the end user — see references/setup.md.

Step 4: Approve a budget-bounded session — human runs this
python3 scripts/agents_pay_admin.py new-session --budget 1.00 --expiry-minutes 60

This prints the parameters and requires typing approve at a TTY. That typed confirmation is the approval artifact — it cannot be produced by the model, by chat history, or by text inside fetched content. There is no --yes flag: the command refuses outright without an interactive terminal, so an agent cannot satisfy the gate even by invoking it directly.

The runtime role must not hold bedrock-agentcore:CreatePaymentSession. Otherwise an agent that exhausts one budget can mint another, and a per-session cap stops being a cumulative bound. See the split policies in references/setup.md.

Step 5: Wire the runtime — human completes this locally

The human exports the identifiers or writes the OpenClaw plugin configuration in the same separate terminal. The agent must not ask the user to paste these values or command output into chat. For OpenClaw, follow references/openclaw-setup.md.

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).

  • GitHub aws/agent-toolkit-for-aws/agents-pay

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

Vulnerability Insights

OpenSSH Password Authentication Bypass on Alpine Linux (*sshole) – CVE-2026-123158

CVE

Java4Shell (CVE-2026-114938): Easy to Crash, Hard to Exploit — Less Than 0.12% of JVMs Estimated at Risk of RCE

PHP2Shell, Day 5 93.6% of Measurable Instances Still Unpatched (1)
Vulnerability Insights

PHP2Shell, Day 5: The Panic Hasn’t Turned Into Patching

Frame 2085668439 (1)
Group 1261154229