Software Development SecurityMedium

CISSP Practice Question: A software development team is implementing secure coding practices to prevent common…

Published September 1, 2026 · Free daily CISSP practice question
A software development team is implementing secure coding practices to prevent common vulnerabilities. During a code review, they identify a section of the application where user inputs are not being properly sanitized, potentially leading to SQL injection attacks. Which of the following options is the BEST practice to mitigate this risk?
  1. A.Implement input validation to filter out special characters.
  2. B.Use prepared statements with parameterized queries.
  3. C.Apply encryption to all user inputs before processing.
  4. D.Utilize a web application firewall to filter malicious traffic.
Correct answer: B. Use prepared statements with parameterized queries.

Correct Answer: B. Use prepared statements with parameterized queries.

Explanation (CISSP Manager Logic):

Parameterized queries address the root cause of SQL injection by strictly separating executable code from user-supplied data. This "secure by design" approach provides a proactive, scalable control that is more reliable than reactive filtering or perimeter defenses.

By using prepared statements, you:

  • Eliminate the risk of malicious command execution at the source.
  • Standardize secure coding patterns across the development lifecycle.
  • Reduce technical debt by avoiding the maintenance of complex blacklists.

While the other options are relevant, they fall short because:

  • A: Input validation is a secondary defense that can often be bypassed by sophisticated encoding or obfuscation.
  • C: Encryption protects data confidentiality but does not prevent the database engine from executing a malicious query.
  • D: A WAF is a perimeter control that provides defense-in-depth but fails to remediate the underlying code vulnerability.

Think like a manager:

Prioritize architectural solutions that remediate vulnerabilities at their source rather than relying on external layers or easily bypassed filters.

Ready to find out if you'd pass?

5,000+ expert-calibrated questions, adaptive CAT mock exams, and gap analysis that shows exactly what to study next.

Try 5 free questions Start 7-day free trial
← Previous question All questions