Back to skill

Security audit

The Agent Payment Rails Playbook

Security checks for vulnerabilities and agentic risk

Overview

This is a non-executing payment guide, but its runnable examples handle real credentials and payment actions with insufficient guardrails.

Review this as operational payment guidance, not just educational text. Use sandbox-only credentials, pin the gateway host, avoid putting payment tokens or personal emails in metadata, and add explicit human review before running any create_payment_intent, confirm_payment, wallet, webhook, or dispute examples against production systems.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (3)

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:175
Finding

Bearer API credential can be transmitted to an attacker-controlled gateway

Content
View full analysis
dict: """Execute a single tool via the GreenHelix REST API.""" response = requests.post( f"{GATEWAY_URL}/v1", headers=self.headers, json={"tool": tool, "input": params}, timeout=30, ) ``` ### Technical Analysis The destination receiving the `Authorization` bearer credential is controlled entirely by the `GREENHELIX_API_URL` environment variable. The example does not validate the URL scheme, hostname, port, or redirect behavior before attaching the credential. Environment variables may be modified by a compromised deployment configuration, malicious wrapper, poisoned CI/CD configuration, or another process with control over how the application is launched. An attacker could set the variable to an arbitrary HTTP or HTTPS endpoint and capture the GreenHelix API key when the client performs its next operation. The client also does not explicitly disable redirects. Although common HTTP clients generally remove authorization headers during many cross-host redirects, relying on library-specific redirect behavior is insufficient protection for a payment client. ### Attack Path 1. An attacker obtains control over the application’s environment or deployment configuration. 2. The attacker sets `GREENHELIX_API_URL` to an endpoint under their control. 3. A user initializes `GreenHelixCl ...[truncated 1203 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:419
Finding

Reusable delegated payment token is copied into generic transaction metadata

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:832
Finding

Human principal email is unnecessarily duplicated in broadly retrievable identity claims

Content
View full analysis
org -> human principal claim_chain = client.execute("build_claim_chain", { "agent_id": agent_id, "claims": [ { "claim_type": "deployed_by", "subject": agent_id, "issuer": organization, "value": organization, }, { "claim_type": "authorized_by", "subject": agent_id, "issuer": organization, "value": human_principal_email, }, { "claim_type": "capability", "subject": agent_id, "issuer": organization, "value": ",".join(capabilities), }, { "claim_type": "eu_ai_act_article_50", "subject": agent_id, "issuer": organization, "value": json.dumps({ "is_ai_system": True, "deployer": organization, "principal": human_principal_email, "purpose": "autonomous_commerce", }), } ], }) ``` ### Technical Analysis The example transmits the human principal’s direct email address to GreenHelix in three places: 1. Agent-registration metadata. 2. The `authorized_by` claim. 3. The serialized EU AI Act disclosure claim. The same guide later retrieves claim chains through `get_claim_chains` when verifying counterpartie ...[truncated 2122 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (8)

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The introductory notice says all examples use the sandbox and that no API key is required, implying low-friction educational access. However, the documented client and curl examples later require GREENHELIX_API_KEY authorization headers and the manifest declares multiple credentials, so the actual demonstrated behavior depends on privileged credentials rather than unauthenticated sandbox use.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 39)May include surrounding context.

md
Six protocols now compete to define how AI agents pay for things. On April 2, 2026, x402 joined the Linux Foundation with backing from Google, Stripe, AWS, and Visa. Two weeks earlier, Stripe launched its Model Provider Payments (MPP) suite. OpenAI's Agentic Commerce Protocol (ACP) powers checkout inside ChatGPT for Etsy and Shopify merchants. Google and Shopify's Universal Commerce Protocol (UCP) is in production. Visa's Trusted Agent Protocol (AP2/TAP) introduces Know Your Agent compliance for the first time. And ERC-8183 handles on-chain escrow for agent jobs on Ethereum mainnet.
Each protocol solves a different slice of the problem. None solves the whole thing. The agent builder who ships a payment integration today faces a brutal question: which protocols do I wire together, and how?
This playbook answers that question with production code. Every chapter contains working Python examples against the GreenHelix A2A Commerce Gateway -- 128 tools accessible at `https://api.greenhelix.net/v1` via a single the REST API (`POST /v1/{tool}`) endpoint. By the end, you will have a multi-rail payment system that routes micropayments over stablecoin rails and high-value transactions over card rails, with spending controls, KYA compliance, dispute resolution, and production monitoring. All of it tested against the live gateway.

## What You'll Learn
- Chapter 1: The Agentic Payment Stack: Why 6 Protocols, Not 1

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 61)May include surrounding context.

md
Six protocols now compete to define how AI agents pay for things. On April 2, 2026, x402 joined the Linux Foundation with backing from Google, Stripe, AWS, and Visa. Two weeks earlier, Stripe launched its Model Provider Payments (MPP) suite. OpenAI's Agentic Commerce Protocol (ACP) powers checkout inside ChatGPT for Etsy and Shopify merchants. Google and Shopify's Universal Commerce Protocol (UCP) is in production. Visa's Trusted Agent Protocol (AP2/TAP) introduces Know Your Agent compliance for the first time. And ERC-8183 handles on-chain escrow for agent jobs on Ethereum mainnet.
Each protocol solves a different slice of the problem. None solves the whole thing. The agent builder who ships a payment integration today faces a brutal question: which protocols do I wire together, and how?
This playbook answers that question with production code. Every chapter contains working Python examples against the GreenHelix A2A Commerce Gateway -- 128 tools accessible at `https://api.greenhelix.net/v1` via a single the REST API (`POST /v1/{tool}`) endpoint. By the end, you will have a multi-rail payment system that routes micropayments over stablecoin rails and high-value transactions over card rails, with spending controls, KYA compliance, dispute resolution, and production monitoring. All of it tested against the live gateway.

## What You'll Learn
- Chapter 1: The Agentic Payment Stack: Why 6 Protocols, Not 1

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The guide repeatedly presents payment creation and confirmation flows against live or live-like endpoints without strong guardrails warning that running them outside sandbox can trigger real financial actions. In a payment skill, this context increases risk because users may paste examples directly and unintentionally initiate charges, fund transfers, or settlement operations.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
80% confidence
Finding

The code transmits user-supplied payment and identity data, along with bearer credentials, to an external service. External transmission is expected for a payment gateway client, but the snippet omits basic hardening such as allowlisting hosts, validating destination configuration, and warning that secrets and transaction metadata leave the local environment.

Content

Scanner excerpt · SKILL.md (reported line 189)May include surrounding context.

md
def execute(self, tool: str, params: dict[str, Any]) -> dict:
        """Execute a single tool via the GreenHelix REST API."""
        response = requests.post(
            f"{GATEWAY_URL}/v1",
            headers=self.headers,
            json={"tool": tool, "input": params},

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 293)May include surrounding context.

print(f"Received {len(market_data['ticks'])} market ticks")

text

### Verifying Payments with curl

For quick testing, the same flow works from the command line:

External Transmission

Medium
Category
Data Exfiltration
Confidence
84% confidence
Finding

This example sends an authorization bearer token to an external endpoint and retrieves a payment receipt, creating a realistic path for accidental secret use and unintended financial operations if copied blindly. In the context of a payments playbook, executable shell snippets with real request structure materially raise operational risk even if the intent is instructional.

Content

Scanner excerpt · SKILL.md (reported line 320)May include surrounding context.

md
}' | jq .

# Step 3: Confirm and get receipt
RECEIPT=$(curl -s -X POST https://sandbox.greenhelix.net/v1 \
  -H "Authorization: Bearer $GREENHELIX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
76% confidence
Finding

The notice frames the content as non-executing illustrative material, while later sections explicitly describe the snippets as working code against live or production endpoints. That is not just incomplete documentation; it creates conflicting expectations about whether the examples are inert reference material or operational code intended to perform real payment actions when run.

Content

No source excerpt is available for this finding.