0%
Vibe44 Logo

OWASP Audit 2025 (Top 10)

Detailed breakdown of Vibe44's compliance with the OWASP Top 10 (2025) security standards, complete with implementation evidence and core code snippets.


A01 — Broken Access Control

Access control is enforced at the Row-Level Security (RLS) layer in Supabase, and URL access is heavily sanitized to prevent open-redirect vulnerabilities during payment checkouts via buildSameOriginUrl().

Implementation Reference: lib/security/redirects.ts

export function buildSameOriginUrl(
  input: string | undefined | null,
  options: SameOriginUrlOptions,
): string | null {
  const appUrl = new URL(options.baseUrl);
  const candidate = input?.trim() || options.fallbackPath;

  try {
    const resolved = new URL(candidate, appUrl);
    if (resolved.origin !== appUrl.origin) {
      return null;
    }

    const isAllowed = options.allowedPathPrefixes.some(
      (prefix) =>
        resolved.pathname === prefix ||
        resolved.pathname.startsWith(`${prefix}/`),
    );

    return isAllowed ? resolved.toString() : null;
  } catch {
    return null;
  }
}

A02 — Security Misconfiguration

We enforce environment validation at build-time using Zod schemas and run 9 comprehensive HTTP header tests to ensure Strict-Transport-Security (HSTS), Content-Security-Policy (CSP), and correct MIME handling out-of-the-box.

A03 — Supply Chain Security

Dependencies are systematically tracked. Vibe44 maintains a CycloneDX SBOM, utilizes automated Dependabot alerts, and runs npm run security:audit continuously within the CI pipeline.

A04 — Cryptographic Failures

Standard Math.random() generates predictable values. We completely replace it in server-side logic (e.g., token, referral code, and file path generation) with Node's cryptographic random bytes.

Implementation Reference: lib/security/crypto.ts

import { randomBytes } from "crypto";

export function secureRandomString(length: number = 8): string {
  const bytesNeeded = Math.ceil((length * 3) / 4);
  const bytes = randomBytes(bytesNeeded);

  let result = "";
  for (const byte of bytes) {
    result += byte.toString(36).padStart(2, "0");
    if (result.length >= length) break;
  }

  return result.substring(0, length);
}

A05 — Server-Side Request Forgery (SSRF)

Vibe44 implements deep defense-in-depth against SSRF. Before fetching provider-returned URLs (e.g., Murf AI audio files) or webhook resources, URLs are sanitized to block metadata endpoints, private IPv4/IPv6 ranges, and non-HTTP schemes.

Implementation Reference: lib/security/ssrf.ts

const BLOCKED_IPV4_PREFIXES = [
  "10.",
  "172.16.",
  "192.168.",
  "127.",
  "169.254.",
  "0.",
];
const BLOCKED_HOSTNAMES = new Set([
  "localhost",
  "0.0.0.0",
  "metadata.google.internal",
  "169.254.169.254",
]);

export function isAllowedUrl(url: string): boolean {
  try {
    const parsed = new URL(url);
    if (!["http:", "https:"].includes(parsed.protocol)) return false;

    const hostname = parsed.hostname.toLowerCase();
    if (BLOCKED_HOSTNAMES.has(hostname) || /^\d+$/.test(hostname)) return false;

    for (const prefix of BLOCKED_IPV4_PREFIXES) {
      if (hostname.startsWith(prefix)) return false;
    }
    return true;
  } catch {
    return false;
  }
}

A06 — Insecure Design

We proactively maintain a STRIDE threat model with documented abuse case scenarios, ensuring fail-closed architecture by design. For example, background job dependencies enforce fail-closed credential validation.

A07 — Authentication Failures

Vibe44 leverages a zero-trust auth middleware. Features include a dynamic password strength meter, mandatory WebAuthn boundary validation, and global MFA enforcement across all vectors (TOTP & Passkeys).

A08 — Data Integrity (XSS & Injection)

We sanitize all inline JavaScript before it is injected into the DOM. We also enforce SRI hashes on CDN scripts and heavily validate all JSON data before parsing.

Implementation Reference: lib/security/xss.ts

export function isValidInlineScript(script: string): boolean {
  if (!script || typeof script !== "string") return false;
  const trimmed = script.trim();

  if (/<\/script/i.test(trimmed)) return false;
  if (/<[a-zA-Z\/!]/.test(trimmed)) return false;
  if (/<!--|-->/.test(trimmed)) return false;

  return true;
}

A09 — Logging & Alerting

Authentication lifecycle and high-privilege access are comprehensively logged. Vibe44 maintains an append-only auth_events table utilizing logAuthEvent() with robust brute-force detection telemetry.

A10 — Exceptional Conditions

To prevent catastrophic failure scenarios or bypasses during timeouts, all critical logic explicitly fails closed. This includes production rate limiting circuits (Upstash Redis), MFA verification, payment webhook timeout handling, and graceful API shutdown.


Copyright © 2026 Vibe44. Built with ❤️ by Scale with Alap.