detecting-xss-vulnerabilities

Detect reflected, stored, and DOM XSS vulnerabilities in Spring, JSP, and Vue codebases.

Updated Jun 24, 2026
One-click install
npx skills add https://github.com/bs-koo/gx-security --skill detecting-xss-vulnerabilities-bs-koo
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: detecting-xss-vulnerabilities
Source: https://github.com/bs-koo/gx-security/tree/main/skills/detecting-xss-vulnerabilities
Command: npx skills add https://github.com/bs-koo/gx-security --skill detecting-xss-vulnerabilities-bs-koo

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve? Web applications that print user input into HTML or JavaScript contexts without escaping are exposed to Cross-Site Scripting (XSS), and manual code review across mixed Spring Boot, legacy JSP, and Vue/Nuxt frontends easily misses these sinks. This Skill statically scans source code for XSS candidates and then applies AI context verification to remove false positives and confirm real vulnerabilities. ## Core Features & Use Cases - Stack-aware scanning: Auto-detects spring-modern, jsp-legacy, and frontend (Vue/Nuxt) stacks per directory and applies matching Semgrep rules, with a grep fallback when Semgrep is unavailable. - AI false-positive filtering: Verifies each candidate against escaping patterns such as fn:escapeXml, c:out, th:text, textContent, and DOMPurify sanitization so safe code is excluded. - Four-element reporting: Every confirmed finding documents what is vulnerable, why, how it is exploited (conceptual PoC), and how to fix it, ordered by severity. - Use Case: Point it at a legacy JSP bulletin board project to find stored XSS in ${board.bbsContent} output, then cross-check the Vue frontend's v-html bindings against backend sanitization logic. ## Quick Start Ask the AI to scan your project for XSS vulnerabilities by running the scan_xss.py script against your source directory and verifying the candidates.

Frequently Asked Questions about detecting-xss-vulnerabilities

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

FAQPage Schema
How do I scan JSP and Spring code for XSS vulnerabilities?▼

Run the scan_xss.py script against your source directory to detect the stack and produce candidate findings via Semgrep or a grep fallback. Each candidate is then verified in context, checking for escaping wrappers like fn:escapeXml, c:out, and th:text before confirming a vulnerability.

What XSS patterns does this scanner detect in JSP files?▼

It detects scriptlet direct output of request parameters, unescaped EL expressions like ${param.x} and model attributes, c:out with escapeXml="false", and EL values injected into JavaScript blocks. Stored XSS in board content output is a primary target.

Does the scanner work without Semgrep installed?▼

Yes, it falls back to regex-based grep scanning when Semgrep is unavailable, though with lower precision. The fallback still catches key sinks like innerHTML assignment, v-html, th:utext, and document.write, and prints a warning about reduced recall.

Can it detect XSS in Vue and Nuxt frontend code?▼

Yes, it detects unsanitized v-html bindings, insertAdjacentHTML and outerHTML assignments, and eval or new Function usage in .vue and JS/TS files. Bindings wrapped in DOMPurify or sanitize functions are excluded as safe.

Why does the scanner report candidates instead of confirmed vulnerabilities?▼

Static pattern matching cannot tell whether a value is escaped elsewhere, so findings are candidates requiring context verification. Safe patterns like fn:escapeXml wrapping, th:text, textContent, and numeric-only JS insertion are filtered out as false positives during review.