mirror of
https://github.com/github/codeql.git
synced 2025-12-24 12:46:34 +01:00
Restrict addCookie to specific interface
This commit is contained in:
@@ -57,7 +57,9 @@ abstract class WeakRandomnessSink extends DataFlow::Node { }
|
||||
private class CookieSink extends WeakRandomnessSink {
|
||||
CookieSink() {
|
||||
this.getType() instanceof TypeCookie and
|
||||
exists(MethodAccess ma | ma.getMethod().hasName("addCookie") |
|
||||
exists(MethodAccess ma |
|
||||
ma.getMethod().hasQualifiedName("javax.servlet.http", "HttpServletResponse", "addCookie")
|
||||
|
|
||||
ma.getArgument(0) = this.asExpr()
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user