Find HTTP response splitting vectors
ProprietaryFinds calls to HttpServletResponse.addHeader(), setHeader(), and addCookie() which, when header values are derived from user input without CRLF sanitization, can allow HTTP response splitting attacks. Full taint-based detection requires rewrite-program-analysis; this recipe identifies the sink call sites for manual review.
org. openrewrite. java. security. search. FindHttpResponseSplittingmod run . --recipe= org. openrewrite. java. security. search. FindHttpResponseSplittingInstall 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.
- Find method usages
javax.servlet.http.HttpServletResponse addHeader(String, String) - Find method usages
javax.servlet.http.HttpServletResponse setHeader(String, String) - Find method usages
jakarta.servlet.http.HttpServletResponse addHeader(String, String) - Find method usages
jakarta.servlet.http.HttpServletResponse setHeader(String, String) - Find method usages
javax.servlet.http.HttpServletResponse addCookie(javax.servlet.http.Cookie) - Find method usages
jakarta.servlet.http.HttpServletResponse addCookie(jakarta.servlet.http.Cookie)