Skip to content

fix: prevent stored XSS in reviews with DOMPurify and a CSP header - #62

Open
Mohammademad1907 wants to merge 1 commit into
Advanced-Computer-Lab-2026:masterfrom
Mohammademad1907:fix/stored-xss
Open

Mohammademad1907 wants to merge 1 commit into
Advanced-Computer-Lab-2026:masterfrom
Mohammademad1907:fix/stored-xss

Conversation

@Mohammademad1907

Copy link
Copy Markdown
  • Sanitize review HTML with DOMPurify (allow-list of formatting tags, safe link schemes only) before dangerouslySetInnerHTML renders it
  • Send a strict Content-Security-Policy via helmet (script-src 'self', no inline script)
  • Add the jest test suite, configs and CI workflow generated by the .vscode setup scripts

- Sanitize review HTML with DOMPurify (allow-list of formatting tags, safe link schemes only) before dangerouslySetInnerHTML renders it
- Send a strict Content-Security-Policy via helmet (script-src 'self', no inline script)
- Add the jest test suite, configs and CI workflow generated by the .vscode setup scripts

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant