The OWASP Cheat Sheet Series is a great resource for learning good security practices when building software.