Vibe Coding Securely
You described an app, an AI tool wrote it, and it works. That is a genuinely new and wonderful thing, and it means a lot of people are now shipping real software to real users without ever having learned the one topic those tools quietly skip: how not to get owned. This book is for you. It assumes no security background, no computer science degree, and no prior idea of what a “SQL injection” is. It assumes only that you have built something with an AI tool and would like to put it on the internet without handing strangers your users’ data.
Here is the whole idea, and it fits in a sentence. The AI can write the code, but you own what ships, so you learn to attack your own app as you build it, fix what breaks, and prove each fix with a check that could have come out the other way. That last part is what makes this different from a list of scary warnings. You will not take my word that something is dangerous. You will make the bad thing happen with your own hands, watch a check catch it, apply the fix, and watch the same check go quiet. By the end that loop is a small, ordinary habit rather than a frightening gate at the end.
What “secure enough” means
I want to be honest about the ceiling, because security writing usually is not. This book will not make your app unhackable, and it is not a complete security education. What it does is cover the specific handful of holes that AI coding tools actually produce, over and over, which happen to be the same handful behind most real break-ins of small apps: a secret shipped to the browser, a login that trusts the browser, a database that hands one user another user’s data, input that becomes code, an AI feature with too much reach, the leftovers that ship by accident, and not knowing what to do when something goes wrong anyway.
Getting those right will not make you a security engineer. It will put your app ahead of most of what is currently deployed, which is a lower bar than it should be and a real one. Where this book stops short of something bigger, it says so plainly, in a note I have labelled “Straight talk” so you can spot the honest limits. You will always know what you have covered and what you have not.
Meet Vibe Notes
You learn this by doing it to a real app, not by reading about it. That app is Vibe Notes, a small notes-and-links app built the way an AI tool would build it, which means built with the classic weaknesses baked in the way those tools actually produce them: plausible code from a plausible prompt, not cartoon mistakes. It is a real, running app, and it lives in a public repository you can clone and follow along with.
Each chapter plants its focus on one weak spot. You check out the app at the start of the chapter with the hole open, you attack it and see it break for real, you apply the fix, and you prove the fix with a command the book calls a check. Those checks are the heart of it. Each one hits the running app and reports FOUND while the hole is open and BLOCKED once it is closed, so every fix in this book comes with a receipt you ran yourself. Git tags mark the start and the fixed state of every chapter, so if you ever get lost you are one command away from a known-good point.
Straight talk. You do not have to code along to get value here. You can read the chapters, or get the PDF, and come away understanding the holes and the habit. But if you can run the practice app, following along is where the lesson stops being words and becomes something your hands remember. The setup in chapter 1 takes a bare machine all the way to the app running, with per-system instructions and nothing assumed.
How to read it
Read the chapters in order. They build on each other the way the app does: the session you add in chapter 3 is what makes the fix in chapter 8 possible, and the “input is data, not code” idea from chapter 5 is what returns, wearing new clothes, when you add an AI feature in chapter 6. Chapter 1 is pure setup and mental model, and every later chapter leans on it, so do not skip it.
Everything runs locally and free. Even the AI feature uses a small model that runs on your own machine, so there is no account to make and no key for a beginner to leak while learning not to leak keys. The last chapter turns the method back on the whole app by having an AI review the code it helped write, and scores how much you can trust it. Then there is a single page to keep by your desk: a checklist you can walk before every deploy, each line a chapter in miniature.
You built the app. Let us make sure you can ship it. Start with chapter 1.