From 6de2b93f3a03022c25bda20a08b9658cf779edea Mon Sep 17 00:00:00 2001 From: "lcartey@github.com" Date: Fri, 15 May 2020 17:24:02 +0100 Subject: [PATCH] Java: Add SpringWebRequest to RemoteTaintedMethod --- .../ql/src/semmle/code/java/dataflow/FlowSources.qll | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/java/ql/src/semmle/code/java/dataflow/FlowSources.qll b/java/ql/src/semmle/code/java/dataflow/FlowSources.qll index f0237dae214..12c96430250 100644 --- a/java/ql/src/semmle/code/java/dataflow/FlowSources.qll +++ b/java/ql/src/semmle/code/java/dataflow/FlowSources.qll @@ -216,6 +216,18 @@ private class RemoteTaintedMethod extends Method { this instanceof HttpServletRequestGetRequestURIMethod or this instanceof HttpServletRequestGetRequestURLMethod or this instanceof HttpServletRequestGetRemoteUserMethod or + exists(SpringWebRequest swr | + this = swr.getAMethod() | + this.hasName("getDescription") or + this.hasName("getHeader") or + this.hasName("getHeaderNames") or + this.hasName("getHeaderValues") or + this.hasName("getParameter") or + this.hasName("getParameterMap") or + this.hasName("getParameterNames") or + this.hasName("getParameterValues") + // TODO consider getRemoteUser + ) or this instanceof ServletRequestGetBodyMethod or this instanceof CookieGetValueMethod or this instanceof CookieGetNameMethod or