Auth & Web Security
Intermediate · 13 missions · about 4 hours
AI writes code that works on the happy path and falls over the moment someone attacks it. Learn how real attacks work (XSS, CSRF, IDOR, injection, brute force) and how to defend against them: hashing, sessions, JWTs, headers, rate limits and threat modeling. You finish by running a security review that finds and fixes six vulnerabilities in an AI-written endpoint.
Missions
- Password hashing, properly: Why SHA-256 is wrong, what salts do, and which algorithms to trust.
- Sessions vs JWTs: decode and check a token: Read a JWT with base64url, check its claims, and know why that is not verification.
- Session cookies done right: HttpOnly, Secure, SameSite, random ids and server-side expiry.
- CSRF: when the browser attacks for them: Why cookies get sent from evil sites, and the defenses that stop it.
- XSS: fix the AI's comment renderer: User text was being parsed as HTML. Make it text, and lock down links.
- Access control: fix the AI's invoice API: Change the id in the URL, see someone else’s invoice. Close that door.
- The OWASP Top 10, mapped to real code: The ten risk categories every web developer should recognize on sight.
- Input validation against attackers: Open redirects, path traversal, prototype pollution and SQL identifiers.
- Rate limiting with token buckets: Stop brute force and runaway costs with a testable limiter.
- Security headers and a CSP builder: Turn on the browser’s built-in protections for every response.
- Secrets management: Where keys live, how they leak, and what to do in the first hour.
- Threat modeling with AI: Use STRIDE and a structured prompt to find attacks before attackers do.
- Boss: security review of an AI-written endpoint: Six vulnerabilities in one handler. Find them, fix them, prove it.
Part of: Indie SaaS Founder career path, Backend & Cloud Engineer career path