Cross-site scripting persists because context, parser, and framework edges are complex. Treat every user-influenced string as untrusted until it is strictly encoded for the exact sink and guarded by runtime policy (CSP/Trusted Types).
Attack Surface
Types
Reflected, stored, and DOM-based XSS across web/mobile/desktop shells
Contexts
HTML, attribute, URL, JS, CSS, SVG/MathML, Markdown, PDF
Craft payloads - Minimal payloads per context with encoding/whitespace/casing variants
Multi-channel - Test across REST, GraphQL, WebSocket, SSE, service workers
Validation
Provide minimal payload and context (sink type) with before/after DOM or network evidence
Demonstrate cross-browser execution where relevant or explain parser-specific behavior
Show bypass of stated defenses (sanitizer settings, CSP/Trusted Types) with proof
Quantify impact beyond alert: data accessed, action performed, persistence achieved
False Positives
Reflected content safely encoded in the exact context
CSP with nonces/hashes and no inline/event handlers
Trusted Types enforced on sinks; DOMPurify in strict mode with URI allowlists
Scriptable contexts disabled (no HTML pass-through, safe URL schemes enforced)
Impact
Session hijacking and credential theft
Account takeover via token exfiltration
CSRF chaining for state-changing actions
Malware distribution and phishing
Persistent compromise via service workers
Pro Tips
Start with context classification, not payload brute force
Use DOM instrumentation to log sink usage; it reveals unexpected flows
Keep a small, curated payload set per context and iterate with encodings
Validate defenses by configuration inspection and negative tests
Prefer impact-driven PoCs (exfiltration, CSRF chain) over alert boxes
Treat SVG/MathML as first-class active content; test separately
Re-run tests under different transports and render paths (SSR vs CSR vs hydration)
Test CSP/Trusted Types as features: attempt to violate policy and record the violation reports
Summary
Context + sink decide execution. Encode for the exact context, verify at runtime with CSP/Trusted Types, and validate every alternative render path. Small payloads with strong evidence beat payload catalogs.
How to use it
Copy the folder
Take asdfgh1445/strix•xss 测试 from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
Check the name does not clash
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.