Security Guides

65 step-by-step guides for fixing security vulnerabilities in vibe-coded apps. Each guide includes code examples, common mistakes to avoid, and verification steps.

Bolt.new

3 guides

Cursor

2 guides

Firebase

8 guides

How to Secure Your Firebase Studio App

8 steps

Firebase Studio scaffolding often ships with permissive rules and Admin SDK usage patterns that need review. Per-scaffold hardening for Gemini-generated Firebase apps.

How to Secure Your Firebase App

8 steps

Each Firebase service (Firestore, Realtime Database, Cloud Storage, Cloud Functions, Hosting) needs its own security config. Per-service rules examples and Admin SDK isolation patterns.

How to Fix API Key Exposure in Firebase Studio Apps

6 steps

Firebase Studio-generated code sometimes ships Admin SDK credentials to the client. Audit Gemini-generated files, rotate exposed keys, migrate admin operations to Cloud Functions.

How to Fix Firebase API Key Exposure

6 steps

Firebase client API keys are public by design (security lives in Rules), but Admin SDK credentials must never reach the browser. How to audit which kind you have and contain any leaks.

How to Add Security Rules to Firebase

7 steps

Replace Firebase test-mode rules with production rules: enforce request.auth.uid == resource.data.userId, use Emulator Suite to validate, handle Storage rules, and deploy via CLI.

How to Add Security Rules to Firebase Studio Apps

6 steps

Firebase Studio scaffolds with permissive rules by default. Migrate to production rules with ownership checks for Firestore and Storage, verify with firebase emulators:exec.

How to Deploy Firebase Apps Securely

6 steps

Before hitting firebase deploy: replace test-mode Rules, verify Admin SDK stays server-side, run Emulator Suite checks, and enforce production-only environment variables.

How to Add Authentication to Firebase Studio Apps

7 steps

Wire Firebase Authentication into Gemini-generated Firebase Studio apps: set up Email/Password or OAuth providers, update Security Rules to require auth.uid, and protect Cloud Functions.

Lovable

5 guides

Netlify

3 guides

Replit

3 guides

Supabase

4 guides

Vercel

3 guides

Windsurf

3 guides

v0

3 guides

API Keys & Secrets

3 guides

Authentication

3 guides

Deployment

1 guides

General Security

15 guides

How to Secure Your Railway App

7 steps

Railway's service model exposes unique hardening points: per-service env vars, private networking between services, TCP proxy auth, and image-based deployment risks.

How to Add Rate Limiting

6 steps

Implement rate limiting that survives production traffic: in-memory counter for small apps, Redis-backed sliding window for distributed ones, per-user identifiers, and 429-response design.

How to Secure API Endpoints

6 steps

Production API hardening: JWT or session auth on every route, rate limiting by user/IP, Zod/Joi input validation, and response shape normalization to prevent info leaks.

How to Secure File Uploads

5 steps

File uploads need layered defense: extension + magic-number validation, size caps, AV scanning for user-facing files, isolated storage buckets, and never serve from the same origin.

How to Secure JWT Tokens

5 steps

JWT hardening: explicitly allowlist HS256 or RS256 (reject alg:none), rotate signing keys quarterly, keep access tokens under 15 minutes, and never store refresh tokens in localStorage.

How to Fix Mixed Content Warnings

6 steps

Resolve "Mixed Content" browser warnings: find HTTP assets on HTTPS pages, use upgrade-insecure-requests CSP directive, migrate CDN URLs, and verify after with browser DevTools.

How to Implement Content Security Policy

5 steps

CSP done properly: pick nonce-based or hash-based script allowlisting, deploy in Report-Only mode first, collect violation reports, then enforce. Per-framework integration patterns.

How to Secure Cookies

6 steps

Configure cookies that resist session hijacking: HttpOnly blocks JS access, Secure enforces HTTPS, SameSite controls cross-site sending, Partitioned isolates third-party contexts.

How to Secure Database Connections

6 steps

Lock down database access: force TLS 1.2+, use connection pools to limit exposure, rotate credentials on a schedule, and verify pg_hba.conf / MongoDB Atlas rules block unauthorized ranges.

Security Audit Checklist

8 steps

Complete pre-launch audit: auth flows, database access controls, secret handling, headers, CORS, CSRF, session handling, rate limiting, dependency hygiene, and monitoring — all in one list.

How to Secure Third-Party Dependencies

6 steps

Supply chain hygiene: automated vulnerability scanning with npm audit / Snyk, pin versions with exact lockfiles, generate SBOMs for compliance, and watch for suspicious package renames.

How to Implement HTTPS Correctly

6 steps

Beyond "add Let's Encrypt": configure HSTS with preload, disable TLS 1.0/1.1, tune cipher suites, fix mixed content, and understand when certificate pinning makes sense (rarely).

How to Prevent Clickjacking

5 steps

Block iframe-based attacks: CSP frame-ancestors (modern), X-Frame-Options (legacy), sandbox attribute for legitimate embeds, and why JavaScript framebusting alone is bypassable.

How to Protect Against Brute Force Attacks

6 steps

Multi-layer defense: per-IP and per-account rate limiting, progressive delays, account lockout thresholds, invisible CAPTCHAs for suspicious traffic, and credential-stuffing detection.

How to Secure WebSocket Connections

6 steps

WebSockets skip CORS — validate Origin manually on upgrade. Authenticate with a JWT in the upgrade query string, rate-limit per connection, validate every incoming message with Zod/Joi.

Security Headers

3 guides

Vulnerability Fixes

3 guides

Find What Needs Fixing

Run an automated scan to identify which guides are relevant to your app. Get a prioritized list of issues with direct links to fix instructions.

Get Starter Scan