CompTIA Security+ (SY0-601) — Question 285

A security analyst is assisting a team of developers with best practices for coding. The security analyst would like to defend against the use of SQL injection attacks. Which of the following should the security analyst recommend first?

Answer options

Correct answer: B

Explanation

Input validation is the most effective first line of defense against SQL injection attacks, as it ensures that only properly formatted data is processed by the application. Tokenization, code signing, and secure cookies serve different security purposes and do not directly address the validation of user input, which is crucial for preventing SQL injection vulnerabilities.