Skip to content

fix(security): allow HTTPS stylesheets in output iframe CSP#1496

Merged
rgbkrk merged 1 commit intomainfrom
fix/csp-allow-https-stylesheets
Apr 5, 2026
Merged

fix(security): allow HTTPS stylesheets in output iframe CSP#1496
rgbkrk merged 1 commit intomainfrom
fix/csp-allow-https-stylesheets

Conversation

@rgbkrk
Copy link
Copy Markdown
Member

@rgbkrk rgbkrk commented Apr 5, 2026

Summary

  • Adds https: to the style-src CSP directive in the isolated output iframe
  • Unblocks folium and other libraries that load CSS from CDNs (jsdelivr, cdnjs, etc.)
  • Consistent with script-src which already allows https:
  • Iframes remain sandboxed without allow-same-origin — no security posture change

Addresses #1494

Test plan

  • Folium map renders correctly (tiles + styled controls)
  • Existing outputs still render (Vega, Plotly, matplotlib, widgets)
  • No allow-same-origin in sandbox (CI test)

Add `https:` to the `style-src` CSP directive for isolated output
iframes. This unblocks libraries like folium that load CSS from CDNs
(jsdelivr, cdnjs, etc.). The `script-src` directive already allows
`https:`, so this makes the policy consistent — stylesheets pose
far less risk than scripts, and the iframes are already sandboxed
without `allow-same-origin`.

Addresses #1494
@github-actions github-actions bot added the frontend Webview, React, TypeScript UI label Apr 5, 2026
@rgbkrk rgbkrk merged commit 2db0626 into main Apr 5, 2026
20 of 21 checks passed
@rgbkrk rgbkrk deleted the fix/csp-allow-https-stylesheets branch April 5, 2026 12:57
@blacksmith-sh
Copy link
Copy Markdown
Contributor

blacksmith-sh bot commented Apr 5, 2026

Found 2 test failures on Blacksmith runners:

Failures

Test View Logs
TestMultiClientSync/test_async_shared_kernel_execution View Logs
TestTerminalEmulation/test_progress_bar_simulation View Logs

Fix in Cursor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

frontend Webview, React, TypeScript UI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant