How do I keep my app secure?
Treat all input as hostile, check permissions on every request, protect logins and secrets, and review AI-written code for the classic attacks before it ships.
Most breaches come from a short list of mistakes. Guard against each one:
- Injection: never build SQL or HTML by gluing in user text. Use parameterized queries, and insert text into pages as text, which prevents cross-site scripting (XSS).
- Broken access control: check that the signed-in user owns the record they ask for. Changing an id in the URL must not reveal someone else's data.
- Passwords: store them only as slow, salted hashes made with an algorithm designed for passwords.
- Sessions: use random session ids in cookies marked HttpOnly, Secure and SameSite, and expire them on the server.
- CSRF: make sure other websites can't trigger actions with your users' cookies.
- Brute force: rate-limit logins and other expensive endpoints.
- Secrets: keep keys on the server, never in browser code or Git.
- Headers: turn on the browser's built-in protections with security headers.
AI code tends to work on the happy path and fail under attack, so ask it to threat-model a feature, then verify every fix yourself.
Vumbli's Auth & Web Security track explains each attack and defense, has you fix AI-written XSS and access-control bugs, and ends with a security review that finds and fixes six vulnerabilities in one endpoint.
Start with these missions
- Password hashing, properly (Auth & Web Security)
- Sessions vs JWTs: decode and check a token (Auth & Web Security)
- Session cookies done right (Auth & Web Security)
Tracks that teach it
More questions, answered by building