VibeDict
← Community
📌 Guide💡 Tips

5 Security Basics Every Beginner Must Follow

Most hacks happen because people simply didn't know

When services built with vibe coding get hacked, it's usually because of very basic mistakes.

1. Put API keys in environment variables

If you write them directly in your code, they can be stolen the moment the code goes up on GitHub. If a key has been exposed, get a new one right away.

2. Do important calculations on the server

If payment amounts, points, or admin status are decided only in the browser, users can tamper with them.

3. Use proven tools for login

Don't build your own password storage — use tools like Auth.js, Better Auth, Clerk, or Supabase Auth.

4. Keep other people's data private

Be sure to ask: "Make it so users can only edit and delete their own posts." Adding blocking rules in the database (RLS) makes it even safer.

5. Check that packages the AI recommends are real

There are malicious packages that target names the AI makes up. Check the download count and repository on the npm website.

🤖 Copy this prompt

Check my project's security. Focus on mistakes beginners often make.

- Secret keys written directly in the code
- Places that are checked only in the browser and not on the server (payments, permissions)
- Data that logged-out users or other people can access
- Places that put user-entered text straight onto the page (XSS)

Show the problems you find in order of risk, and explain in simple words why each one is dangerous.

Terms in this post