Back to skill

Security audit

The Protocol Wars: Agent Commerce Protocol Comparison — x402, ACP, MCP, A2A and Beyond

Security checks for vulnerabilities and agentic risk

Overview

This is a non-executable guide, but it asks for payment and signing credentials and includes runnable examples against live commerce and payment APIs.

Install only if you want a guide that includes live commerce integration examples. Do not provide production Stripe keys, signing keys, OAuth tokens, wallet credentials, or merchant credentials just to read it. If you test the code, use sandbox accounts, fake data, tightly scoped test keys, and review each endpoint before running any snippet.

Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • 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 (41)

Description-Behavior Mismatch

High
Confidence
99% confidence
Finding
The manifest presents the skill as a non-executable educational guide, but the later 'working implementation' includes package installation and code that performs live network calls to payment, identity, and commerce APIs. This mismatch can cause users or host systems to trust the skill as documentation while it actually encourages execution against real external services using sensitive credentials.

Context-Inappropriate Capability

High
Confidence
98% confidence
Finding
The skill requests WALLET_ADDRESS, AGENT_SIGNING_KEY, and STRIPE_API_KEY even though it is described as a comparison guide. Requesting payment and signing secrets in a guide materially increases exposure risk because users may provide real credentials that can be used for payments, identity assertions, or API abuse if any embedded code is executed.

Intent-Code Divergence

High
Confidence
99% confidence
Finding
The document explicitly says it does not execute code or install dependencies, but later instructs users to run 'pip install greenhelix-trading' and provides implementations that call live APIs. This contradiction undermines user trust and can lead to unsafe execution of network-active code under false assumptions about safety and side effects.

Missing User Warnings

Medium
Confidence
89% confidence
Finding
The guide prominently references live GreenHelix and other payment/commerce endpoints and frames examples as runnable against real infrastructure without a strong warning about charges, data transmission, and real account effects. In the context of payment and identity APIs, this makes accidental live execution more likely and therefore more dangerous than a typical educational example.

External Transmission

Medium
Category
Data Exfiltration
Content
def acp_transaction() -> bool:
    """Simulate a complete ACP checkout transaction."""
    # Create checkout session
    session = requests.post(
        "https://api.stripe.com/v1/acp/checkout/sessions",
        json={
            "product_id": "prod_benchmark_001",
Confidence
95% confidence
Finding
This code posts to Stripe ACP checkout endpoints using bearer credentials in a benchmark/example context. If run with real keys, it can create live payment sessions and transmit transaction metadata externally, which is risky in a skill advertised as a guide.

External Transmission

Medium
Category
Data Exfiltration
Content
ACP_API = "https://api.stripe.com/v1/acp"

# Register a product in the ACP catalog
product = requests.post(f"{ACP_API}/products", json={
    "name": "Code Review Agent",
    "description": "Automated code review with security analysis",
    "price": {"amount": 500, "currency": "usd"},  # $5.00
Confidence
93% confidence
Finding
The example sends product registration data to a live Stripe ACP endpoint. Even if intended as illustrative, it demonstrates real external transmission to a payment processor and may encourage users to run it with live API keys.

External Transmission

Medium
Category
Data Exfiltration
Content
}, headers={"Authorization": "Bearer sk_live_xxx"})

# Agent-side: initiate checkout
session = requests.post(f"{ACP_API}/checkout/sessions", json={
    "product_id": product.json()["id"],
    "buyer_agent_id": "agent-buyer-123",
    "success_url": "https://myagent.example.com/success",
Confidence
93% confidence
Finding
This snippet creates a checkout session on a live Stripe ACP endpoint, which can initiate actual commerce flows and send metadata externally. In a guide context with requested Stripe credentials, that creates tangible risk of accidental real-world operations.

External Transmission

Medium
Category
Data Exfiltration
Content
MPP_API = "https://api.visa.com/mpp/v1"

# Provision a virtual card for the agent
vcn = requests.post(f"{MPP_API}/virtual-cards", json={
    "agent_id": "agent-procurement-001",
    "funding_source": "card_fund_src_abc123",
    "spending_limit": {"amount": 10000, "currency": "USD", "period": "monthly"},
Confidence
88% confidence
Finding
The code provisions virtual cards via a Visa API endpoint, which is sensitive financial functionality involving external transmission. Even as sample code, live financial API interactions materially raise risk if copied into a real environment.

External Transmission

Medium
Category
Data Exfiltration
Content
}, headers={"Authorization": "Bearer visa_api_key"})

# Generate a one-time payment token
token = requests.post(f"{MPP_API}/tokens", json={
    "virtual_card_id": vcn.json()["id"],
    "amount": 25.00,
    "currency": "USD",
Confidence
88% confidence
Finding
Generating payment tokens through a live Visa endpoint can trigger sensitive financial operations and transmit merchant/payment data externally. In a documentation skill, this is unsafe without strong sandboxing and warnings.

External Transmission

Medium
Category
Data Exfiltration
Content
UCP_API = "https://api.ucp-protocol.org/v1"

# Register a service in the UCP registry
service = requests.post(f"{UCP_API}/services", json={
    "agent_id": "ucp:agent:data-analysis-001",
    "name": "Financial Data Analysis",
    "capabilities": ["time_series_analysis", "anomaly_detection", "forecasting"],
Confidence
82% confidence
Finding
The UCP example posts service registration data to an external API, transmitting operational metadata outside the local environment. While presented educationally, it still normalizes live data transmission from a guide.

External Transmission

Medium
Category
Data Exfiltration
Content
}, headers={"Authorization": "Bearer ucp_key_xxx"})

# Initiate a payment using the cheapest available rail
payment = requests.post(f"{UCP_API}/payments", json={
    "service_id": service.json()["id"],
    "buyer_agent_id": "ucp:agent:buyer-456",
    "amount": "2.50",
Confidence
82% confidence
Finding
The payment initiation example targets an external UCP API and includes buyer, amount, and escrow details. This could create or simulate real payment activity if used with actual credentials.

External Transmission

Medium
Category
Data Exfiltration
Content
VISA_TAP_API = "https://api.visa.com/tap/v1"

# Register an agent and receive a cryptographic identity
agent_identity = requests.post(f"{VISA_TAP_API}/agents", json={
    "organization_id": "org_acme_corp_123",
    "agent_name": "procurement-agent-001",
    "authorization_scope": {
Confidence
90% confidence
Finding
Registering an agent with Visa TAP transmits identity and authorization-scope data to an external financial service. Such examples are risky when paired with requested signing/payment credentials and weak warnings.

External Transmission

Medium
Category
Data Exfiltration
Content
signing_key = agent_identity.json()["signing_key"]

# Make a payment with cryptographic agent attestation
payment = requests.post(f"{VISA_TAP_API}/payments", json={
    "agent_id": agent_id,
    "attestation": sign_transaction(signing_key, {
        "amount": 150.00,
Confidence
92% confidence
Finding
This example submits a payment with cryptographic attestation to a Visa endpoint, combining external transmission with signing-key usage. If run with real credentials, it could authorize actual payments or leak sensitive signing workflows.

External Transmission

Medium
Category
Data Exfiltration
Content
AP2_API = "https://agentpayments.googleapis.com/v1"

# Step 1: User creates a spending mandate for their agent
mandate = requests.post(f"{AP2_API}/mandates", json={
    "user_id": "user:google:jane.doe@gmail.com",
    "agent_id": "agent:acme:shopping-assistant-001",
    "scope": {
Confidence
89% confidence
Finding
Creating Google AP2 mandates sends user and agent authorization data to an external service. Because mandates represent spending consent, demonstrating this as runnable code without strong safeguards is hazardous.

External Transmission

Medium
Category
Data Exfiltration
Content
mandate_signature = mandate.json()["cryptographic_signature"]

# Step 2: Agent executes a payment using the mandate
payment = requests.post(f"{AP2_API}/payments", json={
    "mandate_id": mandate_id,
    "mandate_signature": mandate_signature,
    "agent_id": "agent:acme:shopping-assistant-001",
Confidence
91% confidence
Finding
The AP2 payment snippet executes a payment using a cryptographic mandate against a live Google payments endpoint. That can trigger real financial actions and external disclosure of transaction metadata if executed with valid tokens.

External Transmission

Medium
Category
Data Exfiltration
Content
ACP_API = "https://api.stripe.com/v1/acp"  # Reference implementation

# Publish a product catalog
catalog = requests.post(f"{ACP_API}/catalogs", json={
    "merchant_id": "merchant_code_review_co",
    "products": [
        {
Confidence
93% confidence
Finding
Publishing a catalog to a live Stripe ACP endpoint is external data transmission tied to commerce infrastructure. In aggregate with the rest of the skill, it encourages real integration behavior from what is labeled a guide.

External Transmission

Medium
Category
Data Exfiltration
Content
}, headers={"Authorization": "Bearer sk_live_xxx"})

# Agent creates a cart and checks out
cart = requests.post(f"{ACP_API}/carts", json={
    "catalog_id": catalog.json()["id"],
    "items": [
        {"product_id": "prod_security_audit", "quantity": 1,
Confidence
93% confidence
Finding
Creating carts on a live ACP endpoint sends buyer and product metadata externally and may create real commerce state. This is risky in a guide, especially because the file requests Stripe credentials.

External Transmission

Medium
Category
Data Exfiltration
Content
}, headers={"Authorization": "Bearer sk_live_xxx"})

# Initiate checkout
checkout = requests.post(f"{ACP_API}/checkout", json={
    "cart_id": cart.json()["id"],
    "payment_method": "card",
    "return_url": "https://agent-buyer.example.com/callback",
Confidence
93% confidence
Finding
Initiating checkout on a live payment endpoint can produce actual checkout sessions and downstream charges or records. The danger is amplified by the surrounding narrative that presents the implementation as working code.

External Transmission

Medium
Category
Data Exfiltration
Content
PAYPAL_AR_API = "https://api.paypal.com/v2/agent-ready"

# Enable Agent Ready for an existing PayPal merchant
config = requests.post(f"{PAYPAL_AR_API}/merchants/configure", json={
    "merchant_id": "paypal_merchant_xyz",
    "supported_protocols": ["x402", "openai_acp", "google_ap2", "visa_tap"],
    "auto_accept_agents": True,
Confidence
90% confidence
Finding
This example configures PayPal Agent Ready via a real PayPal API endpoint, transmitting merchant configuration externally. In a documentation skill, such account-modifying operations should not be presented as directly runnable without strong caveats.

External Transmission

Medium
Category
Data Exfiltration
Content
UCP_API = "https://commerce.googleapis.com/ucp/v1"

# Syndicate a product catalog (merchant-side)
catalog = requests.post(f"{UCP_API}/catalogs/sync", json={
    "merchant_id": "shopify:my-store-123",
    "sync_source": "shopify",  # Also supports: "manual", "etsy", "custom"
    "filters": {
Confidence
85% confidence
Finding
The Google UCP catalog sync example transmits merchant catalog configuration to an external service. Although educational, it still involves live external operations that can modify remote state.

External Transmission

Medium
Category
Data Exfiltration
Content
}, headers={"Authorization": "Bearer merchant_oauth_token"})

# Agent searches for products across UCP-connected merchants
search = requests.post(f"{UCP_API}/products/search", json={
    "query": "noise-canceling wireless headphones",
    "filters": {
        "price_range": {"min": "50.00", "max": "150.00", "currency": "USD"},
Confidence
85% confidence
Finding
Product search against a live commerce API sends search and filtering data externally. This is lower risk than payment execution but still an unnecessary live transmission in a non-executable guide.

External Transmission

Medium
Category
Data Exfiltration
Content
# merchant_id, images, structured_attributes, reviews_summary

# Agent creates an order
order = requests.post(f"{UCP_API}/orders", json={
    "agent_id": "agent:acme:shopping-assistant-001",
    "items": [
        {
Confidence
90% confidence
Finding
Creating orders through a live Google UCP endpoint can initiate real commercial transactions and transmit shipping and payment reference data externally. This crosses from informational example into potentially state-changing commerce execution.

External Transmission

Medium
Category
Data Exfiltration
Content
return False  # Should have gotten 402

    # Step 2: Pay through facilitator (simulated)
    pay_resp = requests.post(f"{FACILITATOR}/pay", json={
        "amount": "0.005",
        "address": resp.headers["X-PAYMENT-ADDRESS"],
    })
Confidence
89% confidence
Finding
The benchmark flow posts payment details to an x402 facilitator endpoint, which is external transmission in a supposedly educational benchmark. Users may run it and accidentally initiate real payment flow interactions.

External Transmission

Medium
Category
Data Exfiltration
Content
def acp_transaction() -> bool:
    """Simulate a complete ACP checkout transaction."""
    # Create checkout session
    session = requests.post(
        "https://api.stripe.com/v1/acp/checkout/sessions",
        json={
            "product_id": "prod_benchmark_001",
Confidence
95% confidence
Finding
This code posts to Stripe ACP checkout endpoints using bearer credentials in a benchmark/example context. If run with real keys, it can create live payment sessions and transmit transaction metadata externally, which is risky in a skill advertised as a guide.

External Transmission

Medium
Category
Data Exfiltration
Content
Eleven competing protocols now claim to be the standard for agent commerce: x402, ACP (Agentic Commerce Protocol), AP2 (Agent Payments Protocol), MPP (Machine Payment Protocol), TAP (Trusted Agent Protocol), UCP (Universal Commerce Protocol), MCP (Model Context Protocol), Google's A2A, Visa TAP (Trusted Agent Protocol), Google AP2 (Agent Payments Protocol), OpenAI ACP (Agentic Commerce Protocol), PayPal Agent Ready, and Google UCP (Universal Commerce Protocol). Q1 2026 detonated what was already a crowded field -- five major protocols launched in a single quarter, backed by Google, OpenAI, Visa, PayPal, Shopify, Walmart, and dozens of other heavyweights. If you are building an agent commerce system in 2026, this is the most consequential architectural decision you will make. Pick wrong and you are locked into a dying standard with a shrinking ecosystem, incompatible partners, and migration costs that compound with every month of development. Pick right and you inherit network effects -- more counterparties, better tooling, cheaper integrations, and a protocol governance body that evolves in your direction. Pick poorly enough and you rewrite your entire commerce layer eighteen months from now, which is what happened to teams that went all-in on SOAP in 2005 or GraphQL subscriptions in 2019.
The problem is that no comprehensive comparison exists. You will find marketing pages from each protocol's backers, blog posts that compare two protocols at a time, and Twitter threads with strong opinions and no benchmarks. What you will not find is a single document that evaluates all protocols against the same criteria, with real latency measurements, cost calculations, migration path analysis, and production-tested code for hedging your bets across multiple protocols simultaneously. This guide provides exactly that. It includes a feature-by-feature comparison matrix, benchmark data from test deployments against live endpoints, step-by-step migration paths between the most comm
...[truncated 25 chars]
Confidence
80% confidence
Finding
The text explicitly states that every code example runs against a live GreenHelix gateway. That is effectively an instruction to use real remote infrastructure, increasing risk of data leakage and unintended external operations from a guide.

Static analysis

No suspicious patterns detected.