audit-react-xss

Audit React components for XSS vulnerabilities and generate remediation steps.

1|Updated May 2, 2026
One-click install
npx skills add https://github.com/Shankulkarni/vibe-audit --skill audit-react-xss
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: audit-react-xss
Source: https://github.com/Shankulkarni/vibe-audit/tree/main/skills/audit-react-xss
Command: npx skills add https://github.com/Shankulkarni/vibe-audit --skill audit-react-xss

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Audit React applications to uncover XSS vectors that AI-generated code can introduce, helping teams prevent client-side vulnerabilities before release.

Core Features & Use Cases

  • Detect dangerous patterns like dangerouslySetInnerHTML with unsanitized content
  • Flag unvalidated href/src attributes that can lead to URL injection
  • Recommend sanitization with DOMPurify and safe rendering practices
  • Real-world example: scanning components to replace insecure constructs

Quick Start

Run a scan on your React project to identify XSS vectors in components and get remediation steps.

Frequently Asked Questions about audit-react-xss

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I find React XSS vulnerabilities in components using dangerouslySetInnerHTML?

To find React XSS vulnerabilities, scan components rendering user-controlled content via dangerouslySetInnerHTML. The audit flags insecure constructs and provides concrete remediation steps to ensure no sanitization gaps remain.

What is the best way to prevent href injection in React applications?

Preventing href injection requires auditing unvalidated href and src attributes for URL injection vectors. The scan identifies potential DOM-based vulnerabilities and recommends applying DOMPurify sanitization to secure user-controlled inputs.

Does this XSS scan detect DOM-based vulnerabilities in React projects?

Yes, the XSS scan detects DOM-based vulnerabilities across React projects. It identifies components rendering user-controlled content through dangerous patterns and captures findings with security-focused recommendations to fix sanitization gaps.

How do I fix React components flagged for unvalidated href attributes?

To fix components flagged for unvalidated href attributes, apply the security-focused remediation steps provided by the audit. Recommendations include validating URL inputs and implementing DOMPurify sanitization before rendering content.

Why does dangerouslySetInnerHTML cause XSS vulnerabilities in React?

dangerouslySetInnerHTML causes XSS vulnerabilities by rendering raw user-controlled content directly into the DOM without sanitization. Scanning identifies these insecure constructs and recommends applying DOMPurify to sanitize inputs before rendering.

Can I scan an entire React project for DOMPurify sanitization gaps?

Yes, you can scan an entire React project for DOMPurify sanitization gaps. The audit applies checks across components to identify dangerous patterns and ensures no sanitization gaps remain before release.