File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
csharp/ql/lib/semmle/code/csharp/security/auth Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change 33 */
44
55import csharp
6+ private import semmle.code.csharp.frameworks.system.Web
67private import semmle.code.csharp.frameworks.microsoft.AspNetCore
78
89/**
@@ -32,7 +33,15 @@ private module AuthCookieNameConfig implements DataFlow::ConfigSig {
3233
3334 predicate isSource ( DataFlow:: Node source ) { isAuthVariable ( source .asExpr ( ) ) }
3435
35- predicate isSink ( DataFlow:: Node sink ) { exists ( Call c | sink .asExpr ( ) = c .getAnArgument ( ) ) }
36+ predicate isSink ( DataFlow:: Node sink ) {
37+ exists ( Call c |
38+ sink .asExpr ( ) = c .getAnArgument ( ) and
39+ (
40+ c .getTarget ( ) = any ( MicrosoftAspNetCoreHttpResponseCookies cls ) .getAppendMethod ( ) or
41+ c .( ObjectCreation ) .getType ( ) instanceof SystemWebHttpCookie
42+ )
43+ )
44+ }
3645}
3746
3847/**
You can’t perform that action at this time.
0 commit comments