Widget: support CSP nonces for injected styles
維護者通常 1 天內回覆
@piyusshhjangid 已經在處理了。
開始於 2026年10月29日。
評估
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 新手友好度
- 55/100
- Issue 類型
- 功能
- 描述清晰度
- 基本清楚
- 活躍度
- 活躍
- 技術堆疊
- typescript
研究方向
Start by locating the loader and the code that creates styles for the chat panel and lazy pre-chat form; the issue does not name files or tests. Trace how script-tag installs can read the script nonce and how ESM configuration is defined, then inspect existing widget tests. Done means every created style element accepts the host nonce, nonce-based tests cover the loader, panel, and lazy pre-chat styles, and behavior without a nonce remains unchanged.
由索引模型根據 Issue 內容生成。
描述
What problem would this solve?
The widget injects <style> elements into its shadow roots for the launcher, chat panel, and pre-chat form. On sites with a strict Content Security Policy that blocks inline styles, those styles can be rejected, leaving the widget unstyled or unusable. This affects both the initial loader and styles added when the pre-chat form loads.
What would you like to happen?
Let the widget apply a host-provided CSP nonce to every style element it creates. For script-tag installs, it could use the nonce on the ChatCops script; ESM users should have a configuration option to provide one. Document the setup and add tests covering the loader, panel, and lazy pre-chat styles under a nonce-based policy. Keep the existing behavior unchanged when no nonce is configured.
Contributing
- I'd like to work on this myself
- 主要語言
- TypeScript
- 星號
- 13
- 分支
- 7
- 平均合併
- 3 小時 39 分鐘
- 30 天內合併 PR
- 275
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
codercops/chatcops 的其他 Issue
-
Widget: fetch signed-in visitor tokens when a session is requested可能已有人在做 @piyusshhjangid 今天認領。 未關閉enhancement
難度 3/5 1-2 天 新手友好度 63/100
codercops/chatcops#461 · 2 則留言 ·
維護者通常 1 天內回覆
-
Server: validate `rateLimit.windowMs` before creating the limiter可能已有人在做 @ashutoshpalhare 今天認領。 未關閉
codercops/chatcops#452 · 1 則留言 · 已指派 1 人 ·
維護者通常 1 天內回覆
-
Widget: a "New reply" button when the visitor has scrolled up可能已有人在做 @srujankaleru2007 於 1 天前認領。 未關閉enhancement hacktoberfest widget
codercops/chatcops#420 · 3 則留言 · 已指派 1 人 ·
維護者通常 1 天內回覆
-
chatcops test: --url to test a deployed server可能已有人在做 @srujankaleru2007 於 1 天前認領。 未關閉enhancement hacktoberfest testing
codercops/chatcops#419 · 3 則留言 · 已指派 1 人 ·
維護者通常 1 天內回覆
-
chatcops test: GitHub Actions reporter可能已有人在做 @mohithreddydonala37 於 1 天前認領。 未關閉enhancement hacktoberfest testing
codercops/chatcops#417 · 3 則留言 · 已指派 1 人 ·
維護者通常 1 天內回覆
查看 codercops/chatcops 的全部 Issue
相似的 Issue
-
b:minor bug
難度 2/5 1-3 小時 新手友好度 76/100
software-mansion/argent#1698 ·
維護者通常 1 天內回覆
-
e2e-failure ready-to-code
難度 2/5 1-3 小時 新手友好度 72/100
redhat-developer/rhdh-plugin-export-overlays#4624 · 1 則留言 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 82/100
better-auth/better-auth#12132 · 1 個 reaction ·
維護者通常 1 天內回覆
-
automation missing-model model-sync provider:tinfoil
難度 2/5 1-3 小時 新手友好度 68/100
anomalyco/models.dev#12053 ·
維護者通常 1 天內回覆
-
o8 next debug build aborts on Glass to Dark appearance switch (nil identifier messaged before check)未關閉bug
難度 2/5 1-3 小時 新手友好度 78/100
hurttlocker/o8#5112 ·