Web security, taught by building

Write code that holds up when someone is attacking it.

GuardCoder is a practical course on web security. Each lesson explains how an attack works, shows the vulnerable code, and then walks you through the fix.

9lessons
2tracks
Hands-onlabs in your own local environment

What you will learn

Every lesson ends with takeaways you can apply to your next project.

  • Model threats and trust boundaries before you write a line of code
  • Stop SQL injection with parameterised queries and safe identifiers
  • Prevent XSS with context-aware encoding, safe DOM APIs and sanitising
  • Protect sessions, cookies and forms against CSRF
  • Hash passwords, design login and reset flows, and enforce authorisation
  • Deploy security headers, a strict Content Security Policy and secure dependencies

Learn responsibly

The labs run against applications you control on your own machine. The goal is to recognise these weaknesses in your own code and fix them. Never test a system you do not own or have explicit permission to test.