Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

Widget: support CSP nonces for injected styles

Geschlossen
#460 2 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

@piyusshhjangid arbeitet bereits daran.

Seit 30.10.2026.

  • #473 von @piyusshhjangid — gemerged

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
55/100
Issue-Typ
Feature
Klarheit
Größtenteils klar
Aktivitätsstatus
Aktiv
Tech-Stack
typescript
Bereich
frontend, security

Rechercherichtung

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.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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
Vorherrschende Sprache
TypeScript
Sterne
13
Forks
7
Ø Merge
3 Std. 28 Min.
Gemergte PRs (30 T.)
296

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus codercops/chatcops

Alle Issues in codercops/chatcops

Ähnliche Issues

Weitere Issues zu TypeScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.