// The Risks

What's actually broken in your vibe-coded app.

Drawn from hundreds of audits Cloud Security Partners has run on AI-generated codebases. Ranked by how often attackers exploit them — not by how scary they sound.

01

Exposed secrets and keys

Critical

AI assistants confidently inline service-role keys, OpenAI tokens, and database passwords into client-side code or commit them to git. Once it's in a commit, it's in the history forever — and bots scrape public repos within minutes.

Fix

Use environment variables and a secret manager. Rotate every key that's ever been committed. Add a pre-commit hook (gitleaks, trufflehog) to catch the next one.

02

Missing row-level security

Critical

AI-generated schemas almost always skip Row-Level Security. Without it, any authenticated user can read or modify every row in every table — including other users' data, payment info, and admin records.

Fix

Enable RLS on every table from day one. Default to deny. Write explicit policies tied to auth.uid(). Audit with a tool that simulates queries as different users.

03

Broken authentication and authorization

Critical

Client-side admin checks (`if (user.role === 'admin')` in React) are trivially bypassed. Role flags in localStorage. Password reset tokens that never expire. JWTs validated only on the frontend.

Fix

Store roles in a separate table. Check authorization server-side, on every protected request. Never trust the client. Never store roles on the user/profile row.

04

Classic web vulnerabilities, regenerated

High

Models reproduce SQL injection, IDOR, XSS, and SSRF patterns from their training data. They'll happily build a search box that interpolates user input into a raw SQL string.

Fix

Use parameterized queries and ORMs. Validate and sanitize every input with Zod or a schema validator. Escape output. Pen-test before launch.

05

Over-privileged integrations

High

Stripe, Slack, Google, and webhook integrations get wired up with full admin scopes 'because the docs example used them.' One compromised key, total tenant takeover.

Fix

Grant least privilege. Scope OAuth tokens. Use restricted API keys. Rotate on a schedule and on every team change.

06

Unsigned webhooks and public endpoints

High

Webhook handlers that don't verify signatures. /api/admin routes left unauthenticated. Cron-job endpoints anyone can hit to trigger payments or emails.

Fix

Verify every webhook signature with HMAC. Authenticate every endpoint by default. Treat any URL an attacker can guess as hostile.

07

No rate limiting, no abuse protection

Medium

Login forms with no throttling get credential-stuffed in hours. AI endpoints with no rate limit turn into the attacker's free GPU. Email-sending endpoints become spam relays.

Fix

Rate limit at the edge. Add CAPTCHA on auth flows. Cap per-user spend on AI features. Alert on anomalies.

08

Zero observability

Medium

No logs, no alerts, no audit trail. When the breach happens — and it will — you have no way to know what was taken, by whom, or how to evict them.

Fix

Log authentication events, admin actions, and data exports. Pipe to a SIEM or at minimum a queryable log store. Set alerts on impossible-travel logins and bulk exports.

09

Misconfigured cloud and storage

Medium

Public storage buckets. World-readable databases. CORS set to `*` because it 'fixed the error.' Edge functions running with admin credentials they don't need.

Fix

Default everything to private. Tighten CORS to known origins. Audit IAM with the principle of least privilege. Use a cloud posture scanner.

Cloud Security Partners

Ship the vibe. Keep the perimeter.

Our engineers review AI-generated codebases the way attackers will — line by line, integration by integration. Then we hand you the fix list, ranked by what actually matters.