SECURE-SOFTWARE-DESIGN practice question 18 of 25
Which secure coding best practice says to assume all incoming data should be considered untrusted and should be validated to ensure the system only accepts valid data?
Full set: 118 questionsDomain Secure Software Design Principles and Practices
Input validation is the security principle that mandates treating all data from external sources as untrusted. This practice involves implementing programmatic checks to ensure that any input is valid in terms of type, format, length, and range before it is processed by the system. The core tenet of input validation is to never trust user-supplied data, as it is a primary vector for common attacks such as SQL injection, Cross-Site Scripting (XSS), and buffer overflows. By enforcing strict data validation rules, applications can reject malicious or malformed data at the entry point, preventing it from causing harm.
A. General coding practices: This is too broad. Input validation is a specific and critical component within the larger set of general secure coding practices.
C. Session management: This practice focuses on securely handling user sessions (e.g., creating, maintaining, and destroying session tokens), not on validating the data sent within those sessions.
D. System configuration: This pertains to the secure setup and hardening of the application's environment (e.g., server, OS, database), not the application's internal logic for handling data. ---
1. OWASP Foundation. (n.d.). Input Validation Cheat Sheet. OWASP. Retrieved from https://cheatsheetseries.owasp.org/cheatsheets/InputValidationCheatSheet.html.
Reference Point: The "Introduction" section states, "The main principle of input validation is 'never trust user input'." It details that this practice is crucial for protecting against major vulnerabilities.
2. Saltzer, J. H., & Schroeder, M. D. (1975). The Protection of Information in Computer Systems. Proceedings of the IEEE, 63(9), 1278–1308. https://doi.org/10.1109/PROC.1975.9939
Reference Point: Section A, "Design Principles," Principle 8, "Complete mediation." This foundational principle implies that every access to every object must be checked, which aligns with validating every input before use. While not using the term "input validation," it establishes the core concept of not trusting prior checks.
3. National Institute of Standards and Technology (NIST). (2020). Security and Privacy Controls for Information Systems and Organizations (Special Publication 800-53, Rev. 5).
Reference Point: Section 3.18, "System and Information Integrity (SI)," Control SI-10 "Information Input Validation." This control explicitly requires organizations to "validate information input to the system to ensure that it is determined to be valid."
4. Zeller, A., & Miller, B. P. (2008). Lecture 19: Secure Programming. MIT OpenCourseWare, 6.170 Software Studio.
Reference Point: Slide 10, "Check your inputs." The lecture notes emphasize, "Any input to your program is a potential security hole... Assume all input is evil until proven otherwise." This directly supports the principle described in the question.
Keep practicing
Take the free SECURE-SOFTWARE-DESIGN practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other SECURE-SOFTWARE-DESIGN practice questions
- Question 1The product team has been tasked with updating the user interface (UI). They will change …
- Question 2Automated security testing was performed by attempting to log in to the new product with …
- Question 3What is a best practice of secure coding?
- Question 4Using a web-based common vulnerability scoring system (CVSS) calculator, a security respo…
- Question 5Which category classifies identified threats that do not have defenses in place and expos…
- Question 6Company leadership has discovered an untapped revenue stream within its customer base and…
