- Home
- All questions
- Question 151
CompTIA Security+ study material · question 151 of 611
What role does a Content Security Policy play in defending against cross-site scripting?
Show the answer
Answer: D. It is a defence in depth that limits which script sources the browser will execute
A policy reduces what an injection can do if one slips through; it does not remove the need to encode output.
Source: OWASP Cross Site Scripting Prevention Cheat Sheet (OWASP) — OWASP Cross Site Scripting Prevention Cheat Sheet › Content Security Policy