fix: prevent XSS vulnerability using rehype-sanitize#398
fix: prevent XSS vulnerability using rehype-sanitize#398Ankana-Sadhukhan wants to merge 1 commit into
Conversation
- Install rehype-sanitize package - Add rehypeSanitize plugin to ReactMarkdown component - Automatically strips dangerous HTML (script tags, event handlers) - Protects users' API keys from malicious LLM outputs Fixes: XSS vulnerability in agent output rendering
|
@Ankana-Sadhukhan is attempting to deploy a commit to the aditthyass' projects Team on Vercel. A member of the Team first needs to authorize it. |
|
Hey @Ankana-Sadhukhan! 👋
|
|
hey @Ankana-Sadhukhan! 👋 |
|
hey @Ankana-Sadhukhan! 👋 |
|
Hi @AditthyaSS, I have updated the PR title according to the project guidelines and linked the PR to Issue #373 using "Closes #373". Kindly review it and let me know if any further changes are required. Thank you! |
Fixes: XSS vulnerability in agent output rendering
Closes #373
What does this PR do?
Adds HTML sanitization to the markdown output renderer so malicious LLM responses cannot execute scripts or event handlers in the browser.
Type of change
Checklist
For every PR:
npm run devFor new agent PRs:
src/agents/definitions/with the agent configidis lowercase and uses kebab-case (likemy-agent-name)Anything else I should know?
No UI changes were made. This PR only hardens markdown rendering against malicious HTML and event-handler injection.