Find XPath injection vectors

Proprietary

Finds calls to XPath.evaluate() and XPath.compile() which, when the expression is built from user input, can allow XPath injection attacks. Use parameterized XPath expressions or input validation instead.

org.openrewrite.java.security.search.FindXPathInjection
mod run . --recipe=org.openrewrite.java.security.search.FindXPathInjection

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. Find method usages javax.xml.xpath.XPath evaluate(String, ..)
  2. Find method usages javax.xml.xpath.XPath compile(String)