Vibe Coding Security Checklist: 12 Checks Before You Ship
Vibe coding security: AI agents write working code that isn't always safe. A checklist for vibe-coded apps: secrets, database rules, auth, dependencies, data.
On this page · 6 sections
The short answer#
AI-built apps often work but skip security basics. Before shipping, check that no secrets sit in client code or the repo, database access rules are on and tested with only the public key, every endpoint checks the caller, inputs are validated, dependencies are known, and you keep only needed data. Put these rules in CLAUDE.md.
Not a security audit. For apps handling payments, health or personal data, get a professional review.
Why do vibe-coded apps have security gaps?#
The agent optimizes for "it works". Security failures don't show up when you click around: an exposed key or an open database table works perfectly — for everyone. Security vendors have published several scans of AI-built apps finding exactly these issues; their numbers vary, but the patterns repeat.
The vibe coding security checklist#
Secrets
- No API keys, tokens or passwords in client code (web bundle, app binary). Search the build output.
- No secrets committed to the repo. Use environment variables and a secrets manager.
Data access 3. Database access rules are on (e.g. Row Level Security in Supabase / Postgres). 4. Test with only the public/anon key: can you read or write someone else's data? You shouldn't. 5. Every API endpoint checks who is calling and what they may access.
Input and auth 6. Inputs are validated on the server, not only in the UI. 7. Auth uses a proven provider; no home-made password storage. 8. Rate limits on sign-in and expensive endpoints.
Dependencies 9. You know every dependency the agent added and why. Remove unused ones. 10. Dependencies come from the official registry, with names you verified (watch for look-alike packages).
Data you keep 11. Collect only what the app needs. Local-first apps avoid much of this risk entirely. 12. Logs don't contain personal data or tokens.
Make the agent follow the rules#
Add them to CLAUDE.md or AGENTS.md:
## Security rules
- Never put secrets in client code or commit them.
- Every table needs access rules; test with the anon key.
- Validate input on the server. Ask before adding a dependency.
Then ask: "Review the app against the security rules in CLAUDE.md. For each, show the file and line that proves it."
Fewer moving parts, fewer holes#
The simplest secure app is one that doesn't need a server or an account for its core job. If your niche's users already complain about forced accounts, a local-first design is both a positioning and a security win. ShotMatic shows you whether that complaint exists in your niche.
Check your niche's complaints — unlimited free lookups.
Related: CLAUDE.md and AGENTS.md templates for app projects · What is vibe coding?
Frequently asked questions
Is vibe coding safe?
The code can be as safe as any other if you review it and test the basics. The risk is shipping without looking, because the app appears to work.
What is the most common vibe coding security mistake?
Reports from security vendors repeatedly mention exposed API keys in front-end code and databases without access rules. Test both before launch.
Can I ask the AI to check security?
Yes, as a first pass: ask it to review against a checklist and show evidence. Then verify the key items yourself, especially database rules.
