I’ve been working on an exciting new chatbot project lately. While looking over my notes from last week, I noticed a reminder I left myself to check for security bugs and vulnerabilities.
I teamed up with AI to dig into the project and evaluate my setup. Here is how I double-checked my work to get some peace of mind:
1. Hunting for Leaked Keys
First, I wanted to make sure my secret database keys hadn't accidentally leaked into my public GitHub code. I used a handy trick by pressing the "." key on GitHub to open the web editor. From there, I ran a global project search for any restricted service strings or secret prefixes.
The Result: The repository was completely clean. Only the safe, public-facing anonymous keys were in the frontend code.
2. Checking the Supabase RLS Policy
Next, I jumped into my Supabase dashboard to look at my Row-Level Security (RLS) settings. When you are prototyping quickly, it is easy to accidentally give a table open access just to get it working.
The Fix: I verified that my chat logging table was set to a strict "Insert-Only" public policy. This means users can submit their chat text to the database, but they cannot read, update, or delete anyone else's data.
Wrapping Up
It is a great feeling to check off that security item and know the database is handled responsibly. Building with AI lets you move incredibly fast, but taking the time to audit the backend is where the real learning happens.
How do you guys like to double-check your work or audit your database settings when you're building? Let me know in the comments!
Top comments (0)