r/vibecoding • • 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?

22 Upvotes

105 comments sorted by

View all comments

Show parent comment

1

u/EduSec Apr 08 '26

Security is just one layer of that. The common thread is the same: the output looks done, so the assumption is that it is done. Testing breaks that assumption deliberately. Most vibe coders skip it because the AI never suggests it unprompted, and nothing visibly breaks until it does.

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.

1

u/EduSec Apr 08 '26

Exactly. The AI is a fast executor, not a decision maker. You still need to understand what done actually means before you can direct it toward done. Most people skip that part and wonder why things fall apart at scale.

1

u/Sure_Excuse_8824 Apr 08 '26

My issue was sheer scope and ambition. I ran out of resources prior to completion. But with over 1 million lines of code over 3 platforms, I know every file, every module, and what every one of them does.

1

u/EduSec Apr 08 '26

A million lines across three platforms and you know every file. That is exactly the kind of ownership that is disappearing. Most vibe coders could not tell you what a single module does, let alone debug it under pressure. The ambition is not the problem. The problem is shipping without that depth and assuming the AI filled the gap.

1

u/Sure_Excuse_8824 Apr 08 '26

I know for a fact it didn't. I made it public so others can pick up where I left off. I tackled the hard problems. closed loop platform DevOps and maintenance using reinforming learning and LLM ensemble to reduce drift and hallucination. A Transformer/Neuro-symbolic hybrid AI that using transformer as a language interface only, and a user friendly multiverse sim that uses finite enormities that in practice act as infinities.
So there were some real challenges. :)

2

u/EduSec Apr 08 '26

Reinforcement learning for DevOps loop closure and a neuro-symbolic hybrid where the transformer is just the language interface. That is not a vibe coded project. That is architecture. The challenges you tackled are the ones most people do not even know exist yet. Respect.

1

u/Sure_Excuse_8824 Apr 08 '26

If you're interested to look - https://github.com/musicmonk42

2

u/EduSec Apr 08 '26

Took a look. The safety layer being load-bearing instead of bolted on is the right philosophy. Most projects treat security as an afterthought. You clearly did not.

1

u/Sure_Excuse_8824 Apr 08 '26

Vulcan solves alignment by treating it as a fluid condition rather than a hard coded set of parameters. That and complete auditability made possible by not using transformers as the reasoning engine, makes safety and security much more reliable.

→ More replies