Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Widget: support CSP nonces for injected styles

Aperta
#460 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@piyusshhjangid ci sta già lavorando.

Dal 29/10/2026.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
55/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
typescript
Ambito
frontend, security

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement
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
Lingua principale
TypeScript
Stelle
13
Fork
7
Merge medio
3h 39m
PR unite (30g)
275

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di codercops/chatcops

Tutte le issue di codercops/chatcops

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.