MadMantra

Trust & Security

Last updated: May 2026. Public summary of our security posture. For specifics not covered here, email hello@madmantra.com.

Architecture in one minute

MadMantra runs each customer's deployed business app on its own infrastructure — a dedicated Render service with a dedicated Neon Postgres database. The platform (where logins, billing, and orchestration live) is a separate API that talks to its own DB. No customer's deployed code has access to any other customer's data, and the platform never ships its credentials into a customer service.

Authentication & sessions

  • Passwordless login via Google OAuth or email magic-link. We never store passwords.
  • Magic-link tokens delivered via URL fragment (not query string) so they don't leak through Referer headers, server access logs, or email Safe-Links pre-fetchers.
  • Google OAuth tokens verified server-side: audience, issuer, and email_verified all checked.
  • Session tokens stored in HttpOnly + Secure + SameSite=Lax cookies. JavaScript on the page cannot read them — an XSS bug on the dashboard cannot steal a session.
  • State-changing API calls require a double-submit CSRF token; cross-origin attackers cannot forge them.
  • JWT signing algorithm pinned to HS256.

Multi-tenant isolation

  • Every authenticated API route runs through middleware that re-verifies the requesting user owns the company they're acting on.
  • Every database query for company-scoped data is filtered by the company ID server-side. AI agents cannot pass an arbitrary company ID — the orchestrator injects the trusted value at dispatch.
  • API responses for company details return an explicit allowlist of safe fields. Infrastructure secrets (database connection strings, third-party account IDs) are never returned to the client.
  • Postgres row-level security is on our published roadmap as additional defense-in-depth.

Data protection

  • All traffic in transit over TLS 1.2+ (HSTS preload enforced).
  • All data at rest encrypted by our cloud providers (Neon, Cloudflare R2, Render).
  • Secrets stored in Render environment variables (encrypted at rest). No secret is ever committed to source control.
  • Cross-company learnings extracted from agent runs are anonymized — they contain no company names, customer data, or personally identifying information.

Application security

  • Prompt-injection defense: untrusted external content (fetched URLs, inbound emails) is wrapped in structural delimiters that instruct the AI to treat it as data, not commands. HTML emitted by AI agents into landing pages and outbound emails is sanitized before storage — script tags, event handlers, and dangerous URL schemes are stripped.
  • SSRF defense: every outbound HTTP fetch goes through a shared safe-fetch helper that blocks private and link-local IPs (including IPv4-mapped IPv6), re-validates every redirect hop, and caps response size + timeout.
  • Webhook signatures: Stripe, Resend, WhatsApp Cloud API, and our internal webhooks all verify cryptographic signatures with constant-time comparison.
  • Rate limiting: per-IP and platform-wide limits on every public endpoint. Magic-link sends are also rate-limited per-recipient to prevent inbox spam.
  • Clickjacking: X-Frame-Options + CSP frame-ancestors enforced on every page.
  • Content sanitization: attachment downloads use a MIME-type allowlist and CRLF-stripped filenames to prevent response-header injection.

Money paths

  • Withdrawals are validated server-side and use an atomic database update — concurrent requests cannot double-spend.
  • Stripe webhook payloads are idempotent — replayed events cannot double-credit a balance.
  • Subscription status, balance, and credits cannot be modified by the customer via the API — only via verified Stripe webhooks.

Sub-processors

We use a small set of vetted service providers. The full, current list with what each one processes lives at /sub-processors.

Reporting a vulnerability

See our responsible disclosure policy. Short version: email hello@madmantra.com with steps to reproduce; we'll respond within 5 business days and won't take legal action against good-faith research.

What's on the roadmap

We're transparent about what we haven't built yet. Active items: Postgres row-level security as defense-in-depth against future code bugs, a customer-visible audit log, automated secret rotation, per-tenant rate limits, and SOC 2 Type 1 (when an enterprise customer requires it). SSO/SAML via WorkOS is available on request for enterprise contracts.

Compliance posture

  • GDPR: we honor access, correction, and deletion requests within 30 days. Email hello@madmantra.com.
  • CAN-SPAM: every commercial email we send on a customer's behalf includes the required postal address and one-click unsubscribe.
  • SOC 2 / ISO 27001: not yet certified. Available on the enterprise sales path.
  • HIPAA / PCI-DSS: the platform is not designed to process PHI or store raw card data. Payment processing is handled entirely by Stripe (PCI-DSS Level 1 certified); we never see card numbers.

Contact

For security, privacy, GDPR, or anything else — email hello@madmantra.com.