Repolode
songjianyang

songjianyang/xss-audit

An AI agent skill that runs a 14-layer static XSS audit over React, TypeScript, and JavaScript codebases and writes a report.

Stars
556
Forks
149
Open issues
0
Last commit
14 days ago

What is it?

xss-audit is a skill for AI coding agents that performs a static cross-site scripting (XSS) review of React, TypeScript, and JavaScript projects. It walks through 14 check layers covering DOM sinks such as innerHTML and dangerouslySetInnerHTML, URL and navigation handling, JSON serialized into script tags, prototype pollution chains, postMessage and other untrusted sources, SVG and MathML, Markdown pipelines and sanitizer bypasses such as mXSS, CSS injection, framework template bindings, and Trusted Types and CSP configuration.

The skill is invoked with a slash or dollar command, optionally with a path to limit the scope. Its output is a file named xss-audit-report.md that lists audited paths and exclusions, an executive summary with severity counts, high, medium, and low findings with file locations and evidence, a separate manual-review section for unconfirmed data flows, and a per-layer summary that separates pattern matches from confirmed vulnerabilities.

Search matches are treated as leads rather than confirmed bugs, and the project notes that static analysis can yield both false positives and false negatives.

Key features

  • 01Covers 14 layers of XSS checks, from DOM sinks to framework template bindings
  • 02Targets React, TypeScript, and JavaScript codebases
  • 03Includes SVG, MathML, CSS injection, and mXSS sanitizer bypass checks
  • 04Checks prototype pollution chains and untrusted postMessage data flows
  • 05Generates xss-audit-report.md with severity counts and per-finding evidence

Use cases

  • Auditing a front-end codebase for XSS before a release
  • Reviewing a bug bounty target's JavaScript for injection sinks
  • Triaging sanitizer and Markdown rendering pipelines for mXSS risks
  • Checking whether Trusted Types and CSP settings close off DOM injection paths

Quick start

  1. 1

    Copy the skill directory into your agent's skills directory

  2. 2

    Run the audit on a path in your agent

    /xss-audit src/

Things to know

  • Static analysis only, so it can produce false positives and false negatives.
  • Generated reports may contain sensitive paths, source code, or credentials and should be reviewed before sharing.

In collections

Topics

FAQ

What is xss-audit?
An AI agent skill that runs a 14-layer static XSS audit over React, TypeScript, and JavaScript codebases and writes a report. xss-audit is a skill for AI coding agents that performs a static cross-site scripting (XSS) review of React, TypeScript, and JavaScript projects. It walks through 14 check layers covering DOM sinks such as innerHTML and dangerouslySetInnerHTML, URL and navigation handling, JSON serialized into script tags, prototype pollution chains, postMessage and other untrusted sources, SVG and MathML, Markdown pipelines and sanitizer bypasses such as mXSS, CSS injection, framework template bindings, and Trusted Types and CSP configuration.
Is xss-audit free to use? What license does it have?
xss-audit is open source under the MIT license. Check the license terms before using it in commercial products.
Is xss-audit still maintained?
Actively maintained. The last commit to xss-audit was on Oct 24, 2026.
What can I use xss-audit for?
Auditing a front-end codebase for XSS before a release Reviewing a bug bounty target's JavaScript for injection sinks Triaging sanitizer and Markdown rendering pipelines for mXSS risks Checking whether Trusted Types and CSP settings close off DOM injection paths
How do I install xss-audit?
Copy the skill directory into your agent's skills directory Run the audit on a path in your agent: /xss-audit src/
Where can I get xss-audit?
The source code and installation instructions are on GitHub: https://github.com/songjianyang/xss-audit

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects

A collection of concise, topic-specific OWASP guides offering practical good security practices for developers building applications.

Security#application-security#owasp#security-best-practices
33.9K+115 this week4.7KJavaScriptCC-BY-SA-4.0Updated 2 days ago