SECURE-SOFTWARE-DESIGN practice question 1 of 25
The product team has been tasked with updating the user interface (UI). They will change the layout and also add restrictions to field lengths and what data will be accepted. Which secure coding practice is this?
Full set: 118 questionsDomain Secure Software Design Principles and Practices
The practice of adding restrictions to field lengths and the types of data accepted is known as input validation. This is a critical secure coding practice that ensures data submitted by a user conforms to predefined rules before it is processed by the application. By enforcing constraints on data length, format, and content at the user interface (UI), developers can prevent a wide range of vulnerabilities, including buffer overflows, cross-site scripting (XSS), and SQL injection, which often rely on submitting malformed or malicious input.
B. Access control determines a user's permissions to access resources or perform actions, not the validity of the data they enter.
C. Communication security focuses on protecting data during its transmission over a network (e.g., using TLS/SSL), not on validating it at the point of entry.
D. Data protection is a broad term encompassing all measures to secure data; input validation is a specific technique within this larger category, making it the more precise answer.
1. OWASP Foundation. "Input Validation Cheat Sheet." OWASP Cheat Sheet Series. The document states, "Input validation is performed to ensure only properly formed data is entering the workflow... it is critical to check that the supplied data is of the correct type, length, format, and within range before it is processed." This directly aligns with the scenario of restricting field lengths and accepted data.
2. National Institute of Standards and Technology (NIST). (2020). Special Publication 800-53, Revision 5: Security and Privacy Controls for Information Systems and Organizations. Section: System and Information Integrity (SI), Control SI-10: Information Input Validation. This control mandates organizations to "validate information input to the system to ensure that it is determined to be valid" and includes checks for data type and length as part of the validation process.
3. Viega, J., & McGraw, G. (2002). Building Secure Software: How to Avoid Security Problems the Right Way. Addison-Wesley. In Chapter 5, "Handling Input," the authors emphasize that "all input is evil until proven otherwise" and detail the necessity of validating input for length, character set, and format to prevent security flaws. (p. 81-85).
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 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…
- Question 7Which threat modeling step identifies the assets that need to be protected?
