Fix XSS vulnerabilities in Java sources

Proprietary

Wraps tainted arguments flowing into HTML output sinks with an HTML-escape helper. Reuses FindXssVulnerability's taint spec so the fix's source/sink/sanitizer coverage stays in sync with the detector, except that Spring handler parameters are not escaped. The escape helper is picked per JavaProject based on which dependency is declared (direct or transitive) in the project's Maven or Gradle build, preferring Spring HtmlUtils (org.springframework:spring-web), then OWASP Encode (org.owasp.encoder:encoder), then Commons Text (org.apache.commons:commons-text), then deprecated Commons Lang3 (org.apache.commons:commons-lang3). Projects with no recognised helper dependency are skipped; arguments already wrapped in a recognised sanitizer are also skipped. For detection without remediation, use FindXssVulnerability directly.

org.openrewrite.analysis.java.security.FixXssVulnerabilityJava
mod run . --recipe=org.openrewrite.analysis.java.security.FixXssVulnerabilityJava

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