@@ -33,30 +33,28 @@ where
33
33
// intersect with strong types, but user controlled or weak types deserialization usages
34
34
(
35
35
exists (
36
- DataFlow:: PathNode weakTypeCreation , DataFlow:: PathNode weakTypeUsage ,
36
+ DataFlow:: Node weakTypeCreation , DataFlow:: Node weakTypeUsage ,
37
37
WeakTypeCreationToUsageTrackingConfig weakTypeDeserializerTracking
38
38
|
39
- weakTypeDeserializerTracking .hasFlowPath ( weakTypeCreation , weakTypeUsage ) and
40
- weakTypeUsage .getNode ( ) .asExpr ( ) .getParent ( ) =
41
- deserializeCallArg .getNode ( ) .asExpr ( ) .getParent ( )
39
+ weakTypeDeserializerTracking .hasFlow ( weakTypeCreation , weakTypeUsage ) and
40
+ weakTypeUsage .asExpr ( ) .getParent ( ) = deserializeCallArg .getNode ( ) .asExpr ( ) .getParent ( )
42
41
)
43
42
or
44
43
exists (
45
- TaintToObjectTypeTrackingConfig userControlledTypeTracking ,
46
- DataFlow:: PathNode taintedTypeUsage , DataFlow :: PathNode userInput2
44
+ TaintToObjectTypeTrackingConfig userControlledTypeTracking , DataFlow :: Node taintedTypeUsage ,
45
+ DataFlow:: Node userInput2
47
46
|
48
- userControlledTypeTracking .hasFlowPath ( userInput2 , taintedTypeUsage ) and
49
- taintedTypeUsage .getNode ( ) .asExpr ( ) .getParent ( ) =
50
- deserializeCallArg .getNode ( ) .asExpr ( ) .getParent ( )
47
+ userControlledTypeTracking .hasFlow ( userInput2 , taintedTypeUsage ) and
48
+ taintedTypeUsage .asExpr ( ) .getParent ( ) = deserializeCallArg .getNode ( ) .asExpr ( ) .getParent ( )
51
49
)
52
50
) and
53
51
// exclude deserialization flows with safe instances (i.e. JavaScriptSerializer without resolver)
54
52
not exists (
55
- SafeConstructorTrackingConfig safeConstructorTracking , DataFlow:: PathNode safeCreation ,
56
- DataFlow:: PathNode safeTypeUsage
53
+ SafeConstructorTrackingConfig safeConstructorTracking , DataFlow:: Node safeCreation ,
54
+ DataFlow:: Node safeTypeUsage
57
55
|
58
- safeConstructorTracking .hasFlowPath ( safeCreation , safeTypeUsage ) and
59
- safeTypeUsage .getNode ( ) . asExpr ( ) .getParent ( ) = deserializeCallArg .getNode ( ) .asExpr ( ) .getParent ( )
56
+ safeConstructorTracking .hasFlow ( safeCreation , safeTypeUsage ) and
57
+ safeTypeUsage .asExpr ( ) .getParent ( ) = deserializeCallArg .getNode ( ) .asExpr ( ) .getParent ( )
60
58
)
61
59
or
62
60
// no type check needed - straightforward taint -> sink
0 commit comments