Xss

From zakirkun/ice-tea · View interactive version

Xss is an AI agent skill from the GitHub repository zakirkun/ice-tea. Detects DOM-based XSS vulnerabilities by tracing user input to dangerous sinks like innerHTML, eval, and document.write. Use when reviewing JavaScript or TypeScript for XSS risks, unsafe DOM manipulation, or security audit.

How to use this skill

Skill file

Cross-Site Scripting (XSS)

Scans frontend code for dangerous DOM manipulations where user-controlled input reaches execution sinks. See patterns.yaml for detection rules.

Detection Workflow

  1. Identify sources — URL parameters (location.search, location.hash), form inputs, postMessage data
  2. Trace to sinks — innerHTML, outerHTML, document.write(), eval(), setTimeout(string)
  3. Check sanitization — verify DOMPurify or equivalent sits between source and sink
  4. Report — file, line, sink type, source, and suggested fix

Vulnerable

element.innerHTML = userInput;
document.write(location.search);

Safe

element.textContent = userInput;
element.innerHTML = DOMPurify.sanitize(userInput);
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.