Java: Convert HttpServletRequest.get* methods to CSV based flow source

This commit is contained in:
Tamas Vajk
2021-03-01 11:25:25 +01:00
parent f2448cc921
commit 09bcf878f7
2 changed files with 9 additions and 8 deletions

View File

@@ -111,7 +111,15 @@ private predicate sourceModelCsv(string row) {
"org.springframework.web.multipart;MultipartFile;true;getOriginalFilename;();;ReturnValue;remote",
"org.springframework.web.multipart;MultipartFile;true;getResource;();;ReturnValue;remote",
"org.springframework.web.multipart;MultipartFile;true;getSize;();;ReturnValue;remote",
"org.springframework.web.multipart;MultipartFile;true;isEmpty;();;ReturnValue;remote"
"org.springframework.web.multipart;MultipartFile;true;isEmpty;();;ReturnValue;remote",
// HttpServletRequest.get*
"javax.servlet.http;HttpServletRequest;false;getHeader;(String);;ReturnValue;remote",
"javax.servlet.http;HttpServletRequest;false;getHeaders;(String);;ReturnValue;remote",
"javax.servlet.http;HttpServletRequest;false;getHeaderNames;();;ReturnValue;remote",
"javax.servlet.http;HttpServletRequest;false;getPathInfo;();;ReturnValue;remote",
"javax.servlet.http;HttpServletRequest;false;getRequestURI;();;ReturnValue;remote",
"javax.servlet.http;HttpServletRequest;false;getRequestURL;();;ReturnValue;remote",
"javax.servlet.http;HttpServletRequest;false;getRemoteUser;();;ReturnValue;remote"
]
}

View File

@@ -214,13 +214,6 @@ class DatabaseInput extends LocalUserInput {
private class RemoteTaintedMethod extends Method {
RemoteTaintedMethod() {
this instanceof HttpServletRequestGetHeaderMethod or
this instanceof HttpServletRequestGetPathMethod or
this instanceof HttpServletRequestGetHeadersMethod or
this instanceof HttpServletRequestGetHeaderNamesMethod or
this instanceof HttpServletRequestGetRequestURIMethod or
this instanceof HttpServletRequestGetRequestURLMethod or
this instanceof HttpServletRequestGetRemoteUserMethod or
this instanceof PlayRequestGetMethod or
this instanceof SpringWebRequestGetMethod or
this instanceof SpringRestTemplateResponseEntityMethod or