| Threat | Mitigation |
|---|---|
| LLM spends beyond its mandate | Budget ceiling set by host (ToolRouter.budget_ceiling); per-vertical auto_buy_cap; totals above cap require human approval |
| LLM bypasses the gate | Checkout paths only exist on TransactionalAgent; tools can only request. The gate is deterministic code, not a prompt |
| Prompt-injected "approved=yes" | Approvals never come from model output. confirm/Approver results must originate outside the LLM context; webhook approvals are HMAC-signed (X-Txn-Agent-Signature) and must be verified by the receiver |
| Stale price/stock bait | Mandatory revalidate immediately before checkout; >2% drift from quote forces confirmation |
| Stuck/duplicate orders | Content-derived idempotency keys; safe retries return the original receipt |
| Card data leakage | Only opaque payment tokens (tok_...) cross the boundary; the vault protocol keeps PSP integration outside the agent |
| Silent failures | Append-only audit log records every search, gate decision, approval, and order |
| Unvetted merchants | approved_merchants routes unknown merchants to B2B_REVIEW instead of buying |
| Broken approval channel | All approvers fail closed — network errors, malformed replies, or timeouts count as denial |
| Purchase resumes after a crash | Runs interrupted by a restart surface as interrupted and are never silently resumed; reconcile in-flight charges with the PSP (PaymentIntent ids are in the audit trail) |
- No real payments.
DemoVaultis a stub; integrate your PSP's tokenization or delegated-payments flow before production. Never pass raw card data to a connector. - No authentication/authorization. The host app owns user identity, sessions, and
who may set
PolicyConfig. - No encryption at rest. Audit files are plaintext JSONL — ship them to storage your
compliance team approves, or extend
AuditLogwith your own sink. - No anti-fraud. The gate encodes your purchasing policy; velocity checks and
fraud scoring belong in your
Approveror PSP.
- Replace
DemoVaultwith a PSP token vault; assert tokens match your PSP's format. - Replace
MockConnectors with real merchant APIs; keeprevalidatecheap (<2s). - Set explicit
PolicyConfigvalues per vertical — do not ship defaults. - Configure
approved_merchantsfor B2B verticals. - Wire
WebhookApproverwithAPPROVAL_WEBHOOK_SECRET; verify the HMAC header on the receiving service before acting on{"approved": true}. - Point
AuditLogat durable storage; alert on gateREJECT/FAILEDspikes. - Keep the LLM's tool set limited to
TOOL_SCHEMAS; never expose a tool that can mutatePolicyConfigor the budget ceiling at runtime. - Set
always_confirmfor any vertical where returns are hard (flights, custom parts). - Review
max_price_drift_pct— for volatile markets, lower it or tighten the cap. - Stripe: use a restricted key with only
payment_intentswrite scope; keep PM ids in secret config. Charge amounts are asserted against the gated cart total. - Ops console: the
/opspage is an unauthenticated shell; all data flows throughX-API-Key-authenticated endpoints. For production, give operators role-scoped credentials separate from tenant API keys and serve/opsbehind SSO.
Please report vulnerabilities privately via SECURITY.md contact (or open a draft security advisory on GitHub) rather than a public issue.