Skip to content

Security

Security is the handful of things people skip: secret keys left in code, data with no access rules, forms bots can flood, and old code with known holes. Most fixes take minutes.

Do I need to worry about security for my product?

Yes, as soon as anyone can reach it. Two things matter most: secret keys stay out of your code, and access rules guard the data you save. Forms and old code come next.

If your product uses secret API keys, like an AI or payments key
Keep them in your .env file and your host’s settings. Never put one in code a browser or phone downloads.
If you save data that belongs to people
Turn on access rules for every table or collection before real data goes in. The Databases concept shows how to test them.
If you have a sign-up, sign-in or contact form
Bots can fill it with fake accounts and spam. Add a captcha, and make sure your server checks every pass.
If your site is plain pages with no forms, keys or saved data
There is less to protect. Run the check-up prompt on this page once before you put it online.

Words: API key, Captcha

What’s the fastest way to secure my product?

Paste the prompt below into your AI tool. It checks your keys, access rules, forms and dependencies, and changes nothing until you say yes.

If it finds a secret key in your code or Git history
Replace that key first. The answer “I shared a secret key by mistake. What do I do now?” lists the steps for each service.
Prompt: Security
Give this product a security check-up. Use plain words, because I may never have coded before. Don’t change anything until I say yes, and never print the value of any key.

Check these, one at a time, and tell me what you find:
1. Secret keys: search the code and the saved Git history for anything that looks like a secret key. Show file names and commits only.
2. The .env file: confirm it exists and Git ignores it. Flag any secret key whose name starts with NEXT_PUBLIC_, VITE_ or EXPO_PUBLIC_, because those reach every visitor.
3. Access rules: if I use Supabase or Firebase, check that Row Level Security or Security Rules protect every table or collection.
4. Forms: list every sign-up, sign-in, password reset and contact form. Say which have a captcha, and whether my server checks each pass.
5. Costly actions: list anything a bot could repeat to run up my bill, like calling an AI service or sending email. Say whether each has a rate limit.
6. Dependencies: run npm audit and explain what it finds. Don’t run npm audit fix --force, because it can install breaking versions.
7. GitHub: tell me whether Dependabot security updates are turned on for this repository, and where to turn them on.

Then give me a short list of fixes, most urgent first. Ask me before you install anything, sign in to anything or do anything that costs money.

This comes from https://buildladder.com/concepts/security#fastest-way. If you can open web pages, read https://buildladder.com/concepts/security.md for the current version. BuildLadder guide, tool, concept, answer and setup pages all work this way: add .md to the address.

Words: AI coding tool, Dependency, Row-level security, Rate limit

reCAPTCHA, Turnstile or hCaptcha: which captcha should I use?

It depends on what your visitors should see and which sign-in service you use. A captcha is the one part of security with a tool to pick, and it only guards forms.

If you use Clerk for sign-in
Clerk already challenges suspicious sign-ups in new apps. Your other forms still need a captcha.
QuestionGoogle reCAPTCHACloudflare TurnstilehCaptcha
What visitors seeChallenge keys show an “I’m not a robot” checkbox that can lead to picture puzzles. Score-based keys show nothing.Usually nothing. In Managed mode, some visitors tick a box. It never shows picture puzzles.On the free plan, every visitor gets a challenge, which can mean picking pictures.
Sign-in service it connects toFirebase. Firebase App Check uses reCAPTCHA to protect Firebase services.Supabase. You paste the secret key into Supabase, and Supabase checks each pass.Supabase. You paste the secret into Supabase, and Supabase checks each pass.
Testing on your computerMake a second key with localhost as its domain. Google advises keeping localhost off your live key.Cloudflare’s test keys work on localhost and always pass or fail on purpose.Real keys don’t work on localhost. Use hCaptcha’s test sitekey and secret.
How your server checks a passIt asks Google Cloud to check the pass, using an API key and your Google Cloud project ID.It sends the pass and your secret key to Cloudflare’s Siteverify API.It sends the pass and your secret to hCaptcha’s siteverify endpoint.

Swipe the table sideways to see every column.

Words: Captcha, Localhost

Should I add security now or after I put my product online?

Now, before you share the link. Only paid protection can wait.

If you’re about to save your code to GitHub for the first time
Check that .env is in .gitignore first. A key saved in Git history is hard to take back.
If your code is on GitHub
Turn on Dependabot security updates. It takes a minute and suggests fixes when a dependency has a known hole.
If your product calls an AI service or sends email
Add a rate limit to those actions. A bot repeating one request can cost you real money.

Words: Dependency, Rate limit

Are captchas and DDoS protection free?

Yes, to start. All three captchas have a free plan, and Vercel, Netlify and Cloudflare include DDoS protection.

If you worry a flood of traffic will run up your bill
Set a spending limit where your host offers one.
QuestionGoogle reCAPTCHACloudflare TurnstilehCaptcha
Free plan10,000 checks a month, across all your sites.Unlimited checks, up to 20 widgets, 10 domains each.The Basic plan is free. Every visitor gets a challenge.
When you outgrow free$8 a month for 10,001 to 100,000 checks, then $1 per 1,000. You add a billing account.Enterprise, priced by Cloudflare’s sales team.Pro is $99 a month billed yearly, or $139 month to month, with 100,000 checks included.

Swipe the table sideways to see every column.

Words: DDoS attack, Spending limit

What changes about security when my product grows?

More people means more bots, more data to protect, and more people with access to your accounts. The basics stay the same, but you check them more often.

If you add a new table, collection or form
Give it access rules or a captcha before real people use it. Run the check-up prompt again.
If a DDoS attack slows your site down
On Vercel, turn on Attack Mode, which is free on every plan and challenges every visitor for a while.
If Dependabot keeps opening update requests
Merge the security ones first. If you ignore them for a long time, Dependabot pauses its updates.
If someone joins or leaves your team
Invite people with their own accounts instead of sharing passwords. When someone leaves, make new keys for anything they could see.

Words: DDoS attack

How do captchas and DDoS protection work underneath?

A captcha runs a quick check in the visitor’s browser and adds a one-time pass to the form. Your server sends that pass with a secret key to the captcha service, which says yes or no. DDoS protection sits in front of your site and drops floods.

If your site has no server code
A page-only captcha is not enough. Your server, or a service that handles the form, must check each pass before accepting the action.
If a pass is old or used twice
Turnstile passes expire after 5 minutes and work once. reCAPTCHA and hCaptcha passes also need fresh verification. Ask your AI tool to request a fresh pass for each send.
If a rate limit kicks in
Your host counts requests from one visitor over a short time. Past the limit, it refuses them for a while, often with a 429 error.

Words: Captcha, DDoS attack, Rate limit, Request

Questions people ask

Updated Sources: Turnstile widgets, OpenAI: limits on each person’s use, Wappalyzer: websites using reCAPTCHA, Wappalyzer: websites using Cloudflare Turnstile, Wappalyzer: websites using hCaptcha, npm downloads: @marsidev/react-turnstile, last month, npm downloads: @hcaptcha/react-hcaptcha, last month, npm downloads: react-google-recaptcha, last month, Cloudflare Turnstile: get started, Cloudflare Turnstile: validate the token, Cloudflare Turnstile plans, Google reCAPTCHA: create keys, Google reCAPTCHA: tiers and prices, hCaptcha developer guide, hCaptcha pricing, Supabase: enable CAPTCHA protection, Clerk: bot protection, Firebase App Check with reCAPTCHA, Cloudflare DDoS protection, Vercel DDoS mitigation, Vercel WAF rate limiting, Netlify: secure access to sites, Netlify rate limiting, Cloudflare rate limiting rules, GitHub: Dependabot security updates, npm audit.