← Code Review learning pathCode Review · Module 5 of 8
Reviewing for security and safety
Spot risky patterns before they ship.
📖 Key ideas
- Never trust input from users, files or other services: check that it is validated on the server.
- Look for secrets such as API keys or passwords in code or config; they belong in a secret store.
- Database queries must use parameters, never string-joined user input.
- Check that every new endpoint checks who the user is and whether they may see that exact record.
- Watch for personal data in logs, error messages and analytics.
💡 Real-life example: A security reviewer is like the person checking locks before a shop closes: most doors are fine, but one open door is enough for a theft.
Input validationChecking that data has the expected type, size and format
SecretPassword, key or token that must stay private
Parameterised queryQuery where user data is passed separately from the SQL
AuthorisationChecking whether this user may do this action