Skill 8.5.3

Secure coding practices

Key Concepts

Key practices include input validation on the server side (preferably allowlisting expected formats), output encoding appropriate to the context, parameterised queries or prepared statements, secure authentication and session handling, least privilege, proper error handling that does not reveal details, use of vetted cryptographic libraries and keeping secrets out of code.

Guidance includes the OWASP Application Security Verification Standard (ASVS), SEI CERT coding standards and NIST's Secure Software Development Framework (SP 800-218). Practices are enforced through training, code review and automated testing.