Preparing Practice Exam…
Please wait a moment while the system generates the exam questions, answers, and study session.
Please wait a moment while the system generates the exam questions, answers, and study session.
CompTIA Security+ · CompTIA
Select one answer.
Written by other learners. Comments can disagree with the marked answer — check the official documentation when in doubt.
Input validation ✅ ensures that user-supplied input is checked and sanitized before being processed or displayed. Implementing input validation and output encoding is the primary mitigation against XSS. Code signing verifies the integrity and authenticity of code but does not protect against XSS vulnerabilities in a web form.
Penetration test = Input
A security team is reviewing the findings in a report that was delivered after a third party performed a penetration test. One of the findings indicated that a web application form field is vulnerable to cross-site scripting. Which of the following application security techniques should the security analyst recommend the developer implement to prevent this vulnerability? A. Secure cookies B. Version control C. Input validation D. Code signing