@@ -53,7 +53,7 @@ predicate tokenFeatures(DataFlow::Node endpoint, string featureName, string feat
5353query predicate trainingEndpoints (
5454 DataFlow:: Node endpoint , EndpointType endpointClass , EndpointCharacteristic characteristic
5555) {
56- characteristic .getEndpoints ( endpoint ) and
56+ characteristic .appliesToEndpoint ( endpoint ) and
5757 // Only consider the source code for the project being analyzed.
5858 exists ( endpoint .getFile ( ) .getRelativePath ( ) ) and
5959 // Only select endpoints that can be part of a tainted flow: Constant expressions always evaluate to a constant
@@ -69,7 +69,7 @@ query predicate trainingEndpoints(
6969 not (
7070 endpointClass instanceof NegativeType and
7171 exists ( EndpointCharacteristic c |
72- c .getEndpoints ( endpoint ) and
72+ c .appliesToEndpoint ( endpoint ) and
7373 c instanceof LikelyNotASinkCharacteristic
7474 )
7575 ) and
@@ -81,8 +81,8 @@ query predicate trainingEndpoints(
8181 // If the list of characteristics includes positive indicators with high confidence for this class, select this as a
8282 // training sample belonging to the class.
8383 exists ( EndpointCharacteristic characteristic2 , float confidence |
84- characteristic2 .getEndpoints ( endpoint ) and
85- characteristic2 .getImplications ( endpointClass , true , confidence ) and
84+ characteristic2 .appliesToEndpoint ( endpoint ) and
85+ characteristic2 .hasImplications ( endpointClass , true , confidence ) and
8686 confidence >= characteristic2 .getHighConfidenceThreshold ( )
8787 ) and
8888 (
@@ -93,8 +93,8 @@ query predicate trainingEndpoints(
9393 not endpointClass instanceof NegativeType
9494 or
9595 not exists ( EndpointCharacteristic characteristic3 , float confidence3 , EndpointType posClass |
96- characteristic3 .getEndpoints ( endpoint ) and
97- characteristic3 .getImplications ( posClass , true , confidence3 ) and
96+ characteristic3 .appliesToEndpoint ( endpoint ) and
97+ characteristic3 .hasImplications ( posClass , true , confidence3 ) and
9898 confidence3 >= characteristic3 .getHighConfidenceThreshold ( ) and
9999 not posClass instanceof NegativeType
100100 )
@@ -106,8 +106,8 @@ query predicate trainingEndpoints(
106106 endpointClass instanceof NegativeType and
107107 forall ( EndpointType otherClass | not otherClass instanceof NegativeType |
108108 exists ( EndpointCharacteristic characteristic2 , float confidence |
109- characteristic2 .getEndpoints ( endpoint ) and
110- characteristic2 .getImplications ( otherClass , false , confidence ) and
109+ characteristic2 .appliesToEndpoint ( endpoint ) and
110+ characteristic2 .hasImplications ( otherClass , false , confidence ) and
111111 confidence >= characteristic2 .getHighConfidenceThreshold ( )
112112 )
113113 )
@@ -180,15 +180,15 @@ query predicate reformattedTrainingEndpoints(
180180 // The reason, or reasons, why the endpoint was labeled NotASink for this query, only for negative examples.
181181 key = "notASinkReason" and
182182 exists ( EndpointCharacteristic characteristic , EndpointType endpointClass |
183- characteristic .getEndpoints ( endpoint ) and
184- characteristic .getImplications ( endpointClass , true , _) and
183+ characteristic .appliesToEndpoint ( endpoint ) and
184+ characteristic .hasImplications ( endpointClass , true , _) and
185185 endpointClass instanceof NegativeType and
186186 value = characteristic
187187 ) and
188188 // Don't include a notASinkReason for endpoints that are also known sinks.
189189 not exists ( EndpointCharacteristic characteristic3 , float confidence3 , EndpointType posClass |
190- characteristic3 .getEndpoints ( endpoint ) and
191- characteristic3 .getImplications ( posClass , true , confidence3 ) and
190+ characteristic3 .appliesToEndpoint ( endpoint ) and
191+ characteristic3 .hasImplications ( posClass , true , confidence3 ) and
192192 confidence3 >= characteristic3 .getHighConfidenceThreshold ( ) and
193193 not posClass instanceof NegativeType
194194 ) and
0 commit comments