After a Founder Lost $19K to a Fake-Paid Hack, I Had 2 AIs Audit All 8 of My Repos (And Patched 1,096 Tests)
TL;DR: AI coding agents make shipping 8 products fast — which also makes shipping subtle payment and authorization bugs fast. On Day 2 of the 100-day challenge, before collecting dollar #1, we froze feature work and ran an adversarial two-AI security audit across every repo. Below is the sanitized engineering checklist we enforced and locked behind 1,096 automated tests.
1. Why "Fake-Paid" Exploits Keep Hitting Fast-Shipped Indie Apps
Every few months another indie founder posts a painful post-mortem: their app fulfilled thousands of dollars of paid credits, downloads, or concierge orders without a single settled charge hitting their processor. In almost every case, the root cause isn't an exotic zero-day — it's one of four mundane shortcuts that sneak into vibe-coded or rapidly scaffolded payment flows:
- Trusting the browser return URL: Marking an order as paid when the user hits
/success?session_id=...without verifying authoritative settlement status on the server. - Missing or sloppy webhook signature checks: Parsing JSON before verifying the raw request body signature, skipping timestamp replay windows, or falling back to permissive dev mode when a signing secret is unset.
- Unchecked amount, currency, or SKU integrity: Accepting a valid webhook event for a $1 test product (or a different currency) and unlocking a $199 deliverable because the handler only checked
event.type === "checkout.completed". - Non-idempotent fulfillment & IDOR leaks: Replaying the same webhook event to double-credit an account, or allowing sequential/predictable order IDs to download another customer's private deliverable.
2. Why We Used Two Independent AIs Instead of One
Asking the same model that wrote a route to "check if it's secure" has a well-known failure mode: it shares the exact same assumptions and blind spots that produced the code. On Day 2 we split the audit into an adversarial two-model loop across all 8 repositories:
- Reviewer A (Red-Team Threat Modeler): Read-only access to routes, webhook handlers, auth middleware, database migrations, and upload parsers. Its only job was to write concrete exploit hypotheses — forged webhooks, tampered totals, replayed event IDs, cross-tenant IDORs, path traversal, and malformed file uploads.
- Reviewer B (Patch & Test Engineer): Verified every hypothesis against actual runtime code, wrote minimal defensive patches (fail-closed defaults, transactional locks, constant-time checks), and converted every confirmed risk into a deterministic automated test that fails if the guard is ever removed.
- Human Final Gate: Every diff was reviewed, all 8 test suites were executed cleanly end-to-end, and zero secrets, internal endpoints, or permissive fallbacks survived into production.
Sanitization Rule
To follow responsible operational hygiene, this field note deliberately omits internal infrastructure details, hostnames, private schemas, and exploit payloads. Only defensive architectural patterns and aggregate verification counts are published.
3. The 5 Hardening Rules Enforced Across All 8 Repos
Whether a repo is a $199 B2B concierge service (cam.auturance.com, punch.auturance.com), an EU e-invoice validator (erechnungviewer.com), or a consumer holiday app (decomytree.fun), every money-touching or file-handling surface now obeys the same five non-negotiable invariants:
- Invariant 1 — Fail-Closed Server-Authoritative Webhooks: Fulfillment never triggers from client redirects. Webhook endpoints read the exact raw byte payload, verify the cryptographic signature using constant-time comparison, enforce strict timestamp tolerance, and hard-fail at startup or request time if signing keys are missing in production.
- Invariant 2 — Transactional Idempotency Keys: Every processed payment event ID is recorded inside the same atomic database transaction that transitions the order state (
pending → paid). Duplicate deliveries or concurrent webhook bursts hit a unique constraint and return200 OKwithout double-granting access. - Invariant 3 — Server-Side Price & Currency Binding: Checkout sessions and webhook handlers match settled minor-unit amounts, ISO currency codes, and canonical SKU identifiers against server-side pricing tables — never trusting client-submitted prices, discounts, or tier flags.
- Invariant 4 — Strict Tenant & Deliverable Isolation: Order status checks, upload URLs, and private report downloads require unguessable cryptographically signed tokens or authenticated owner checks. Uploaded PDFs, XMLs, and spreadsheets are size-bounded, MIME/structure validated, and rejected on XXE/zip-bomb patterns.
- Invariant 5 — Regression-Locked Test Suites: Every security invariant has matching negative tests (forged signature →
400/401, wrong amount → rejected, replayed event → no-op, cross-tenant lookup →403/404) so future agent PRs cannot silently regress security.
4. Audit Scorecard (Day 2 Verification)
| Audit Dimension | Before Audit | After Dual-AI Patch |
|---|---|---|
| Repositories Audited | Fast-shipped individually | 8 / 8 full-stack repos hardened |
| Review Topology | Single-agent self-check | 2 independent AI models + human gate |
| Client-Trusted Payment States | Unverified assumptions in drafts | 0 (100% server-authoritative) |
| Automated Test Coverage | Baseline happy-path checks | 1,096 passing tests (incl. negative security cases) |
Does passing 1,096 tests guarantee invulnerability? Never. Security is an ongoing discipline, not a trophy. But locking these five invariants before revenue #1 means we can spend Days 3 through 100 on customer acquisition and delivery instead of waking up to a $19K fake-paid disaster.
Run This Exact Audit or Workflow Build on Your Repo
If you're shipping fast with AI and want a 48-hour dual-AI security & automation audit ($199 flat) — or a custom B2B AI workflow deployed in 2 weeks ($1,500–$3,000) — you can hire my exact workflow directly.
Hire My AI Workflow ($199–$3K)