Cross-Site Scripting (XSS)
Overview
XSS vulnerabilities occur when an application includes untrusted data in a web page without proper validation or escaping.
Detection Strategy
This SKILL specifically looks for dangerous DOM manipulations in frontend code where user-controlled input might be executed as script.
Sinks:
innerHTMLassignmentdocument.write()eval()setTimeout()with string evaluation
Remediation
Use safer alternatives like textContent or innerText instead of innerHTML. Use DOMPurify if HTML insertion is strictly required.