A small advice from a PENTESTER
retained text
Hey there everyone, I will be quick and direct. First happy to see everyone here trying to build a SaaS websites and congrats for everyone who made it even when the profits was only 1$ that means a lot for you, I know that because I was there. Now it's been almost a 2 years and a half helping people secure their SaaS projects and unfortunately all my clients had thee same basic bugs. So I will try to share some here and please check your SaaS projects before scaling it up, one of my clients lost his full database because he leaked his env variables. Let's begin, I know many here are not real devs and that's not a big deal, follow what I will share next and you will be okay: \- If you're using supabase which I think 90% of the SaaS websites using it, make sure to tell/force your agent to check the RLS permissions, like talk to him and explain your idea "for example I want only user A to see his conversation, some mistakes can lead to user A read/update a user B information which is a big problem, Imagine you're a user and at the same time the admin, someone just easily signup and change his role to yours and take the control of your website" \- Don't call your supabase from the client side, when building your project force the agent to make the backend as the only entry point to contact your databse, this will help your protect your supabase by not leaking the supabase base url or the public anon key. Supabase call them public because your team can see them, they never said you can let anyone see your keys because simply a hacker can enumerate your supabase tables, RPC functions, trigger automatic signup/signin etc..... \- In your backend try to implement a secure middlewares/guards, add a hard rate limiting specially to the signup and signin page, add cloudflare/google captcha to reduce bots from hammering your endpoints \- In forms try to use DTOs client and server side, this will help you have a builtin form validation "you can search more about this to understand what I mean by this" \- When offering a free trial make sure you charge the user a 1$, some people can use pre built BINs to bypass the stripe free trial Sorry I can't make the post too long, I've shared those simple ideas because when I find these in any website 100% I can get in, be safe and try to make a agent critic another agent output, means if you built a feature by antigravity argon model, make claude opus critic it. try to keep your thread short, means a feature per session to avoid hallucination. Stay safe, anyone needs help drop it in the comments or send me a DM
document fetched 2026-11-03 00:29 · canonical https://reddit.com/r/SaaS/comments/1xlwt8o/a_small_advice_from_a_pentester