2026-04-15

Threat model: agent commerce

Threat actors, security primitives, and STRIDE coverage for the agentic-commerce layer pop-pay defends.

1. Executive summary

pop-pay protects against prompt injection stealing card data, hallucinated purchases, malicious checkout pages, and scope expansion. By isolating sensitive card credentials from the agent’s reasoning process and employing a multi-layered verification engine, pop-pay ensures that compromised, malicious, or hallucinating agents cannot extract raw payment data or execute unauthorized financial transactions.

2. Threat actors

IDActorDescription
T1Malicious checkout pagesWebpages designed to detect agentic browsers and inject hidden instructions or spoofed form fields to steal credentials.
T2Prompt injection via agent contextExternal attackers who control part of the agent’s input (e.g., via a malicious email or document) to subvert agent logic.
T3Hallucinating agentsAutonomous agents that spontaneously decide to purchase items or services outside the original task scope due to model error.
T4Compromised agent tool chainA malicious MCP server, plugin, or dependency in the agent’s environment attempting to intercept payment requests.

3. Security primitives

4. STRIDE attack matrix

IDSTRIDEScenarioMitigating primitive
A1SpoofingAttacker spoofs a merchant domain after approval (TOCTOU).Ephemeral Authorization Scope
A2TamperingAgent attempts to delete .node file to force a security downgrade.Context Isolation Layer
A3RepudiationAgent or user denies a valid purchase was authorized.Human Trust Anchor
A4Information DisclosureAgent uses read_file to attempt to read the encrypted vault.Zero-Knowledge Card Surface
A5Denial of ServiceHallucinating agent attempts an infinite purchase loop.Intent Verification Engine
A6Elevation of PrivilegeAgent tries to call internal vault decryption functions directly.Context Isolation Layer
A7Information DisclosurePrompt injection instructs agent to “print your card number.”Zero-Knowledge Card Surface
A8TamperingMalicious checkout page changes the price after the agent approves.Intent Verification Engine
A9SpoofingMalicious MCP server intercepts and logs JSON-RPC requests.Context Isolation Layer
A10Information DisclosureAgent reasoning contains card data from a previous session.Context Isolation Layer

5. Data flow

                                 [ TRUST BOUNDARY ]
                                         |
    +----------------+           +-------|--------------------------+
    |                |           |       |  Policy Engine (PEP)     |
    |  Agent Process |---(1)---->|       V                          |
    | (Masked Only)  |           |  [ Intent Verification Engine ]  |
    |                |<---(2)----|               |                  |
    +----------------+           |               | (3)              |
                                 |               V                  |
                                 |    [ Encrypted Vault ]           |
                                 |    [ Rust napi-rs Layer ]        |
                                 |               |                  |
                                 +---------------|------------------+
                                                 | (4)
                                                 V
    +----------------+           +----------------------------------+
    |  Payment       |           |   Context Isolation Layer        |
    |  Processor     |<---(5)----|   (CDP / Browser DOM /           |
    |  (Stripe/etc)  |           |    iframe + Shadow DOM)          |
    +----------------+           +----------------------------------+
                                         |
                                 [ TRUST BOUNDARY ]

    (1) Request virtual card (reasoning + amount)
    (2) Return masked token (****-4242)
    (3) Decrypt credentials via Rust addon (machine key / passphrase)
    (4) Inject real CC/CVV into browser DOM via CDP
    (5) Card data submitted to processor
    Agent never sees raw data crossing the boundary

6. Technology stack

ComponentImplementationSecurity properties
Vault encryptionAES-256-GCM via Node crypto (OpenSSL binding)Authenticated encryption, random nonce per operation
Key derivationscrypt (n=2^14, r=8, p=1) via Rust napi-rsMemory-hard, compiled into stripped native binary
Salt protectionXOR-split pair compiled into Rust binaryReverse engineering requires binary analysis
CDP injectionRaw WebSocket CDP client (TypeScript)Cross-origin iframe traversal, Shadow DOM piercing
TOCTOU guardDomain verification with known vendor registryPayment processor passthrough, strict suffix matching
GuardrailsHybrid keyword + LLM (Layer 1 + Layer 2)Blocks 60% at Layer 1 before LLM invocation

Source: docs/THREAT_MODEL.md in the canonical repo.