Content Security Policy protects what’s inside the webpage by limiting sources allowed to load content. Websites often contain third-party scripts, such as advertisements, analytics tools, widgets, or other similar data inputs, through which attackers could inject malicious code.