I do not know what do you mean when you said "Ensure CSP is effective against XSS attacks", CSP mean Content Security Policy.
Quote:Content Security Policy (CSP) is a feature that helps to prevent or minimize the risk of certain types of security threats. It consists of a series of instructions from a website to a browser, which instruct the browser to place restrictions on the things that the code comprising the site is allowed to do.
Usually you get this when you use outsource script like
<script src="https://iampsp.com/script.js"></script>
and that message warning about XSS attack , that script source can inject malicious code into your website this way.(this one way of XSS hacking).
you can learn about this concept
here