Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6de2b93

Browse files
committed
Java: Add SpringWebRequest to RemoteTaintedMethod
1 parent 4300bc8 commit 6de2b93

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

java/ql/src/semmle/code/java/dataflow/FlowSources.qll

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,18 @@ private class RemoteTaintedMethod extends Method {
216216
this instanceof HttpServletRequestGetRequestURIMethod or
217217
this instanceof HttpServletRequestGetRequestURLMethod or
218218
this instanceof HttpServletRequestGetRemoteUserMethod or
219+
exists(SpringWebRequest swr |
220+
this = swr.getAMethod() |
221+
this.hasName("getDescription") or
222+
this.hasName("getHeader") or
223+
this.hasName("getHeaderNames") or
224+
this.hasName("getHeaderValues") or
225+
this.hasName("getParameter") or
226+
this.hasName("getParameterMap") or
227+
this.hasName("getParameterNames") or
228+
this.hasName("getParameterValues")
229+
// TODO consider getRemoteUser
230+
) or
219231
this instanceof ServletRequestGetBodyMethod or
220232
this instanceof CookieGetValueMethod or
221233
this instanceof CookieGetNameMethod or

0 commit comments

Comments
 (0)