Widget: support CSP nonces for injected styles
Mantenedores costumam responder em até 1 dia
Avaliação
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Facilidade para iniciantes
- 55/100
- Tipo de issue
- Funcionalidade
- Clareza
- Razoavelmente clara
- Status de atividade
- Ativa
- Stack de tecnologia
- typescript
Direção de pesquisa
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.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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
- Linguagem predominante
- TypeScript
- Estrelas
- 13
- Forks
- 7
- Merge médio
- 3h 28min
- PRs com merge (30d)
- 296
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Tem um modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de codercops/chatcops
-
Core README lists old default modelsTalvez já em andamento @prakashNalla assumiu hoje. Aberta
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 90/100
codercops/chatcops#503 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
Widget: theme.tokens to set any color or size token, and the full token table in the docsTalvez já em andamento @Sreehita-here assumiu hoje. Abertahacktoberfest
codercops/chatcops#500 · 2 comentários · 1 responsável ·
Mantenedores costumam responder em até 1 dia
-
Widget: a header menu with New conversation, Download transcript and a privacy linkTalvez já em andamento @anurag2787 assumiu hoje. Abertahacktoberfest
codercops/chatcops#496 · 4 comentários · 1 responsável ·
Mantenedores costumam responder em até 1 dia
-
Widget: keep a message sent while offline, and send it when the connection is backTalvez já em andamento @Saifjafri212213 assumiu hoje. Abertahacktoberfest
codercops/chatcops#495 · 3 comentários · 1 responsável ·
Mantenedores costumam responder em até 1 dia
-
Widget: copy a completed assistant replyTalvez já em andamento @piyusshhjangid assumiu hoje. Abertahacktoberfest
codercops/chatcops#477 · 2 comentários · 1 responsável ·
Mantenedores costumam responder em até 1 dia
Todas as issues de codercops/chatcops
Issues semelhantes
-
area:cli bug P4
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
Mantenedores costumam responder em até 1 dia
-
bug from-studio
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 65/100
esengine/DeepSeek-Reasonix#14868 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
linxiv-dev/linXiv#384 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
scope:core type:security
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
Mantenedores costumam responder em até 1 dia
-
follow-redirects updateAberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 66/100
mailgun/mailgun.js#544 ·