Fix XSS vulnerabilities

Proprietary

Aggregates the cross-site scripting (CWE-79) fixes. Covers Java sources that flow user-controlled values into HTML output sinks (via FixXssVulnerabilityJava, which consumes the same taint spec as FindXssVulnerability), JSP scriptlets that read directly from request parameters or headers, and Thymeleaf templates that use the unescaped th:utext attribute.

org.openrewrite.java.security.xss.FixXssVulnerability
mod run . --recipe=org.openrewrite.java.security.xss.FixXssVulnerability

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.

Recipe list

It runs these recipes, in this order.

  1. Fix XSS vulnerabilities in Java sources
  2. Replace XSS-prone JSP scriptlets with <c:out>
  3. Replace th:utext with th:text in Thymeleaf templates