Uh oh!
There was an error while loading. Please reload this page.
[PAV-132] Mitigar DOM XSS e aplicar CSP restritiva - #245
Open
Jovinull wants to merge 1 commit into
Open
Conversation
Jovinull
requested review from
Benevanio, hltav, lima300 and nayarakarinesilva
as code ownersAugust 30, 2026 20:35
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Linear
Issue: PAV-132
Branch flow
develop.master.Objetivo
Reduzir o risco de XSS relatado no pentest, impedindo fontes e execuções não autorizadas no navegador e mantendo a documentação da API acessível com uma política específica.
Escopo
O que faz parte desta entrega:
/docsdo Swagger.O que está fora do escopo:
Resumo das alterações
Content-Security-Policye headers complementares aos frontends.SECURITY.md.Como testar
Validation
Evidências executadas:
Impacto de banco / migration
Impacto em contratos/API
Impacto de configuração / infraestrutura
Impacto de segurança
A implementação restringe fontes de conteúdo, reduz o impacto de injeções no cliente e preserva uma política controlada para o Swagger.
Impacto de dados pessoais / privacidade
Compatibilidade / dependências
Riscos
Uma CSP muito restritiva pode bloquear integrações futuras. As origens necessárias foram declaradas explicitamente e a documentação explica como incluir uma nova origem de forma controlada.
Rollback
Reverter este commit restaura os headers e o carregamento de tema anteriores, sem migração ou alteração de dados.
Checklist final
.env, certificados ou tokens.