The essential habits
- Turn on multi-factor authentication everywhere, and prefer passkeys where available
- Keep API keys and passwords in environment variables or a secrets manager, never in Git
- Validate and sanitise all input, and use parameterised database queries
- Update dependencies regularly and remove ones you do not use
- Give every account and service only the access it needs
Common web attacks to understand
- SQL injection: attacker input changes a database query
- Cross-site scripting (XSS): attacker scripts run in other users' browsers
- Broken access control: users reach data that is not theirs
- Phishing: people are tricked into giving up credentials
Securing AI-generated code
AI assistants often produce working but insecure code: hard-coded keys, missing authorisation checks and unvalidated input. Review generated code for these issues before you deploy, and ask the AI to explain any security-sensitive section.
Ready to go deeper? Take the Cybersecurity Basics course and finish with a certificate.