Chapter 1: Secure Coding Fundamentals
Understanding secure coding principles is one of the foundations of being a security minded ASP.NET Core developer. Applying these concepts in practice by writing secure code will help your web applications improve their security posture.
This introductory chapter is all about basic secure coding patterns that every ASP.NET Core developer must know. Learning about these defensive techniques will help you mitigate security vulnerabilities in code, and with these recipes, you will be able to understand how to implement proper input validation by using whitelisting, perform input sanitization, and how to escape output and protect data.
In this chapter, we're going to cover the following recipes:
- Enabling whitelist input validation using validation attributes
- Whitelist validation using the
FluentValidation
library - Syntactic and semantic validation
- Input sanitizing
- Input sanitization using the
HTMLSanitizer
library...