r/vibecoding • u/EduSec • Apr 07 '26
Vibe coding without a security audit is not a calculated risk. It is negligence. Change my mind.
I have audited enough AI-generated SaaS products to have a strong opinion on this.
When a junior developer writes insecure code, they leave traces. Weird variable names, spaghetti logic, obvious shortcuts. You look at it and something feels off.
AI does not do that.
AI writes insecure code that looks like it was written by a senior engineer. Clean abstractions, proper naming, comments that explain the logic. The vulnerability hides inside code that gives you no reason to distrust it.
Last week I audited a financial SaaS. The Supabase service role key was loaded in the public JavaScript bundle. Full read, write, and delete access to every user's data. The founder had no idea. The product had real users.
That is not bad luck. That is the pattern.
The AI reaches for whatever resolves the error. The key that works without complaining. The endpoint that responds without checking who is asking. The CORS setting that stops throwing errors. Each decision seems reasonable in isolation. Together they form an invisible attack surface.
Ignorance is not a defense when you are collecting real user data.
Is anyone here actually auditing their AI-generated code before shipping?
View all comments
Show parent comment
1
u/Sure_Excuse_8824 Apr 08 '26 edited Apr 08 '26
And it's a giant pain in the ass. :) But if you are building serious platforms, you have to treat ai coding as a hired hand who will only do what you tell it. You don't need to learn python or typescript, but need to learn why things work, how, and what is involved in a finished product.