CSSLP Secure Software Implementation Practice Question
Which TWO of the following are effective strategies to prevent Cross-Site Scripting (XSS)?
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Using a Content Security Policy (CSP)
Context-aware encoding and CSP are the most effective defenses against XSS.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Relying on antivirus software
Why it's wrong here
Incorrect - AV does not block XSS.
- ✗
Disabling cookies
Why it's wrong here
Incorrect - does not prevent XSS.
- ✗
Using insecure HTML comments
Why it's wrong here
Incorrect - comments provide no security.
- ✓
Using a Content Security Policy (CSP)
Why this is correct
Correct - prevents execution of unauthorized scripts.
- ✓
Context-aware output encoding
Why this is correct
Correct - neutralizes malicious input.
About these practice questions
This CSSLP question is part of Courseiva's 198-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed August 2026 · checked against the official (ISC)² exam blueprint
This CSSLP practice question is part of Courseiva's free (ISC)² certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the CSSLP exam.