plotly / plotly/plotly.js

Improve CSP Documentation & Consider Full CSP Compliance in Plotly.js

Open
#7,349 2 comments 0 reactions 1 assignee View on GitHub

@emilykl is already working on this.

Since Jan 29, 2025.

cs documentation feature P1
Dominant language
JavaScript
Stars
18.3k
Forks
2k
Avg merge
2d 12h
Merged PRs (30d)
28

Description

Title: Improve CSP Documentation & Consider Full CSP Compliance in Plotly.js
Description

Plotly.js provides a strict CSP bundle for users with strong Content Security Policies (CSP), but clear documentation is missing on:

  • What’s included/excluded in the strict bundle
  • Known limitations and workarounds

Enterprise customers and community users (e.g., this forum post) have requested better CSP support and clarity. The strict bundle exists (plotly-strict.js), but its usage is not well-documented.


Proposed Actions
  1. Document the strict bundle’s capabilities, limitations, and integration steps.
  2. Provide examples for CSP-compliant usage in Dash & JS.
  3. Evaluate full CSP compliance for Plotly.js instead of maintaining a separate bundle.
    • Internal enterprise customers have requested a fully CSP-compliant version.
    • Can the main plotly.js bundle be refactored to remove eval and inline scripts?

Why This Matters
  • CSP restrictions block adoption in security-sensitive environments.
  • Clear documentation would prevent confusion and production roadblocks.
  • Growing demand from enterprises & community users for strict CSP support.

Can the team consider making the main bundle fully CSP-compliant? Are there technical challenges or funding requirements for this? 🚀

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.