fix(ext): remove inline script (CSP violation) + CI enforcement (Closes #189)#193
Closed
gHashTag wants to merge 1 commit into
Closed
fix(ext): remove inline script (CSP violation) + CI enforcement (Closes #189)#193gHashTag wants to merge 1 commit into
gHashTag wants to merge 1 commit into
Conversation
65 tasks
…check (Closes #189) - Remove inline <script type='module'> from sidepanel.html (CSP violation) - Use external dist/bootstrap.js with <script src=...> only - Add CI check: grep for inline <script> in HTML files - 5 tests pass, clippy = 0 on wasm32 target
686217a to
9fb8b05
Compare
Owner
Author
|
Superseded by PR #195 (same fix, handles bg-sw.js stale file) |
This was referenced Apr 21, 2026
Closed
7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes the CSP violation in
extension/sidepanel.htmlthat causes Chrome to block the extension with "Executing inline script violates CSP directive 'script-src self'".Changes
extension/sidepanel.html<script type="module">→ use<script src="dist/bootstrap.js" type="module">.github/workflows/ci.yml<script>in HTML filesRoot Cause
The previous PR merged inline
<script type="module">withimport init from './dist/wasm/trios_ext.js'directly insidesidepanel.html. Chrome MV3 CSP blocks inline scripts → white screen.Fix
<script src="dist/bootstrap.js" type="module">dist/bootstrap.jsis a 3-line init stub (the only.jsallowed outsidedist/wasm/)grepcheckVerification
Closes #189
Refs #156