/viperclaw:viper-payment-stripe-pcifrom viperclaw
Audits payment processing code for Stripe/PayPal integrations. Reviews server-side price calculation, integer minor-unit math, double-entry ledgers, and PCI-DSS compliance.
Ships in viperclaw. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
viper-payment-stripe-pci)flowchart LR
Order["Client Checkout (item_id, qty > 0)"] --> Math["Server DB Price in Integer Minor Units"] --> Hook["Verified Webhook HMAC + Idempotency Key"] --> Ledger["FOR UPDATE Refund & Balance Invariants"]
viperclaw taint . --db .viperclaw/graph.db
stripe.checkout.Session.create, PaymentIntent.create, float(, amount, price, quantity, discount, refund.unit_amount, price, currency, or discount_percent from client request parameters; accept only item_id and quantity, validate quantity > 0 (blocking negative-quantity credit bugs!), and look up the price from the server database.Decimal Arithmetic: Never use IEEE-754 floating-point (float in Python, number float math in JS) for money (0.1 + 0.2 == 0.30000000000000004). Store and compute all monetary values as integer minor units (cents/satoshis/wei) or fixed-precision Decimal with explicit ROUND_HALF_EVEN / ROUND_FLOOR.checkout.session.completed, payment_intent.succeeded, charge.dispute.created) can arrive out of order or multiple times. Verify stripe.Webhook.construct_event signature, check payment_status == "paid", and enforce an atomic WHERE status = 'PENDING' state transition.SUM(refunds.amount) + new_refund <= order.captured_amount) are checked inside a SELECT ... FOR UPDATE transaction so concurrent refund requests cannot exceed the original payment.Stripe Elements, Braintree Hosted Fields).# ❌ VULNERABLE: Uses float math, trusts client price, and lacks negative quantity check
total = float(req.json["price"]) * int(req.json["quantity"])
stripe.PaymentIntent.create(amount=int(total * 100), currency="usd")
# ✅ HARDENED: Positive integer quantity, DB price in integer cents, and idempotency key
qty = int(req.json["quantity"])
if qty <= 0 or qty > 100:
raise ValueError("Invalid quantity")
product = db.get_product(req.json["product_id"])
amount_cents = product.price_cents * qty
stripe.PaymentIntent.create(
amount=amount_cents,
currency=product.currency,
idempotency_key=f"order:{order.id}",
)
PCI-DSS v4.0, Stripe Security Guide, CWE-682, CWE-840| Severity Tier | Baseline CVSS v3.1 Vector | Qualifying Security Impact |
|---|---|---|
| CRITICAL (9.0–10.0) | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H | Unauthenticated remote code execution, cross-tenant authentication or isolation gap, or direct theft of funds/keys. |
| HIGH (7.0–8.9) | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N | Authenticated privilege escalation, unauthorized sensitive data exposure, or single-request service outage. |
| MEDIUM (4.0–6.9) | CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N | Scoped information disclosure, non-admin state mutation, or configuration weakness requiring user interaction. |
| LOW (0.1–3.9) | CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:L/I:N/A:N | Defense-in-depth hardening gap requiring high precondition complexity and minimal direct impact. |
viperclaw taint . --db .viperclaw/graph.db and viperclaw verify to record the verified state in .viperclaw/graph.db.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
payment-processing, stripe, paypal, pci-dss, financial-audit, ledger
npx claudepluginhub zahidoverflow/viperclaw --plugin viperclaw72 skills in this plugin
/viper-agent-skill-supplychainAI Agent Skill, Plugin & MCP Config Supply-Chain Auditor (modeled on NVIDIA SkillSpector & OWASP Agentic Skills Top 10). Audits SKILL.md bundles and MCP JSON configs./viper-ai-llm-guardrailsAI, LLM & MCP Application Security & Guardrails Auditor (OWASP LLM Top 10). Reviews prompt boundaries, RAG data isolation, tool-call authorization, and output sanitization./viper-api-gateway-apigee-kongAPI Gateway, BFF & Rate-Tier Policy Auditor (Kong, AWS API Gateway, Apigee, Envoy Gateway). Reviews JWT authorizers, backend origin lockdown, and route-level quotas./viper-auth-oauth-jwtAuthentication, OAuth 2.0 / OIDC & JWT Security Auditor. Reviews token verification, algorithm allowlisting, claim validation, and OAuth redirect_uri configurations./viper-aws-iam-cloud-auditAWS IAM, STS, S3, KMS & Lambda Security Auditor (modeled on Prowler, Parliament & CloudSplaining). Reviews iam:PassRole escalation, STS ExternalId, S3 policies, and IMDSv2./viper-bola-idorObject & Function-Level Authorization (BOLA / BFLA) Audit Skill. Reviews resource access controls, tenant scoping, and ownership checks across API endpoints and controllers.Other plugins' skills for the same job