Skip to main content

Content Security Policy Compliance

31/03/2026

To improve application security against Cross-Site Scripting (XSS), the Content Security Policy (CSP) has been updated to disallow the unsafe-inline directive for both style-src and script-src. This change is effective as of Graph Modeling (PoolParty) version 10.1.

All developers must refactor code to eliminate inline scripts and styles. This applies to all front-end assets, including JavaScript, CSS, and Velocity Templates (.vm files), for example in the context of customizing the Linked Data Frontend.

The CSP update may yield the following challenges:

  1. Inline JavaScript: Any JavaScript code written directly in HTML (e.g., onclick, <script> tags with inline code) will no longer execute.

  2. Inline Styles: Any CSS styles written directly in HTML (such as style attributes) will no longer apply.

  3. Third-party Resources: External scripts or styles not hosted on the same domain may require explicit whitelisting in the CSP.

    Note

    Google Tag Manager and Google Analytics are whitelisted. To enable it you have to place the Google Analytics initialization code inside a separate JavaScript file and reference the file in the <head> tag inside the head.vm file.

By adhering to the updated CSP, we significantly improve the security of the application. While this introduces some migration challenges, the examples provided should help you transition your code to be CSP-compliant. If you encounter any issues or require external resources to be whitelisted, please reach out to your Graphwise representative for assistance. For more information on the Content Security Policy, visit the Mozilla documentation.