CSP e cabeçalhos de isolamento no painel servido pelo Nginx

Open
#264 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
70/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
nginx

Research direction

Start by reading nginx/painel.conf and checking the inline theme script in index.html to identify the CSP hash and the API origin needed for connect-src. Add the requested CSP and isolation headers, then run the browser tests with the panel served by Nginx and check that the console has no CSP errors. Done when ZAP no longer reports rules 10038 and 90004.

Written by the indexing model from the issue text.

Description

enhancement item-do-catalogo trilha:T10

Objetivo

Pôr Content-Security-Policy e os cabeçalhos de isolamento no painel servido pelo Nginx.

Motivo

O ZAP baseline (PR #258, 10/11/2026) achou um alerta médio, "Content Security Policy (CSP) Header Not Set" (regra 10038), e um baixo, "Insufficient Site Isolation Against Spectre Vulnerability" (regra 90004, 10 ocorrências), no nginx/painel.conf. O index.html tem um script inline do tema, que pede hash na CSP. A API já manda CSP pelo helmet.

Critérios de entrega

  • Content-Security-Policy no nginx/painel.conf, com default-src 'self', o hash do script inline do tema e connect-src para a API.
  • Cross-Origin-Opener-Policy e Cross-Origin-Resource-Policy no painel.
  • Os testes no navegador seguem passando com o painel servido pelo Nginx, sem erro de CSP no console.
  • Na rodada seguinte do job zap, as regras 10038 e 90004 não aparecem.

Fora desta issue

CSP no GitHub Pages (o Pages não deixa configurar cabeçalhos; risco aceito em docs/ameacas.md).

Dominant language
JavaScript
Stars
0
Forks
0
Avg merge
15h 6m
Merged PRs (30d)
118

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from learnTECH-community/formacao-dev

All issues in learnTECH-community/formacao-dev

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.