frontend-mobile-security-xss-scan

Detects XSS vulnerabilities in React, Vue, Angular, and vanilla JavaScript code.

1|Updated Aug 17, 2025
One-click install
npx skills add https://github.com/ratnesh-maurya/mdconverter --skill frontend-mobile-security-xss-scan-ratnesh-maurya
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: frontend-mobile-security-xss-scan
Source: https://github.com/ratnesh-maurya/mdconverter/tree/main/.claude/skills/frontend-mobile-security-xss-scan
Command: npx skills add https://github.com/ratnesh-maurya/mdconverter --skill frontend-mobile-security-xss-scan-ratnesh-maurya

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Frontend codebases often contain hidden Cross-Site Scripting (XSS) vulnerabilities such as unsafe innerHTML usage, unsanitized React dangerouslySetInnerHTML, and unvalidated URL assignments that manual code review easily misses. ## Core Features & Use Cases - Static XSS Detection: Scans JavaScript and TypeScript files for dangerous patterns like innerHTML, document.write, insertAdjacentHTML, and unsafe location assignments, each mapped to CWE-79. - Framework-Specific Analysis: Detects React dangerouslySetInnerHTML without DOMPurify sanitization and Vue v-html directives rendering raw HTML. - Severity-Ranked Reports: Generates grouped vulnerability reports with file, line, severity level, description, and concrete fix recommendations. - Use Case: Before shipping a React feature that renders user-submitted content, run this scan to find every unsanitized rendering path and get DOMPurify-based remediation code for each finding. ## Quick Start Scan my src directory for XSS vulnerabilities and generate a severity-ranked report with fix recommendations.

Frequently Asked Questions about frontend-mobile-security-xss-scan

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

FAQPage Schema
How do I scan JavaScript code for XSS vulnerabilities?

Run static analysis that flags dangerous patterns like innerHTML, outerHTML, document.write, and insertAdjacentHTML when combined with user-controlled input. Each finding includes the file, line number, severity, and a fix recommendation such as using textContent or DOMPurify sanitization.

How to fix dangerouslySetInnerHTML XSS in React?

Sanitize the HTML with DOMPurify before passing it to dangerouslySetInnerHTML, for example DOMPurify.sanitize(html) inside the __html property. Where possible, avoid the API entirely and render plain text instead.

Does this XSS scanner support Vue and Angular?

Yes, it includes framework-specific detection for Vue v-html directives that render raw HTML and notes Angular's built-in sanitization. React and vanilla JavaScript patterns receive the most detailed coverage.

What tools complement manual XSS code scanning?

The skill recommends eslint-plugin-security for lint-time detection and Semgrep with the p/xss ruleset for pattern-based scanning. These integrate into CI pipelines alongside the custom scanner logic.

What are the limitations of static XSS detection?

Static pattern matching can miss data-flow-dependent vulnerabilities where tainted input crosses multiple functions, and it may produce false positives when sanitization happens elsewhere. It detects user input via heuristics like props, state, and query keywords rather than full taint tracking.