@@ -73,16 +73,23 @@ abstract class AtmConfig extends string {
73
73
not exists ( this .getAReasonSinkExcluded ( candidateSink ) )
74
74
}
75
75
76
+ /**
77
+ * Gets the list of characteristics that cause `candidateSink` to be excluded as an effective sink.
78
+ */
76
79
final EndpointCharacteristics:: EndpointCharacteristic getAReasonSinkExcluded (
77
80
JS:: DataFlow:: Node candidateSink
78
81
) {
79
- // An endpoint is an effective sink if it has neither standard endpoint filter characteristics nor endpoint filter
80
- // characteristics that are specific to this sink type.
81
- // TODO: Experiment with excluding all endpoints that have a medium- or high-confidence characteristic that implies
82
- // they're not sinks for this sink type (or not sinks for any sink type), not just the EndpointFilterCharacteristics.
82
+ // An endpoint is an effective sink (sink candidate) if none of its characteristics give much indication whether or
83
+ // not it is a sink. Historically, we used endpoint filters, and scored endpoints that are filtered out neither by
84
+ // a standard endpoint filter nor by an endpoint filter specific to this sink type. To replicate this behaviour, we
85
+ // have given the endpoint filter characteristics medium confidence, and we exclude endpoints that have a
86
+ // medium-confidence characteristic that indicates that they are not sinks, either in general or for this sink type.
83
87
exists ( EndpointCharacteristics:: EndpointCharacteristic filter , float confidence |
84
88
filter .getEndpoints ( candidateSink ) and
85
89
confidence >= filter .mediumConfidence ( ) and
90
+ // TODO: Experiment with excluding all endpoints that have a medium- or high-confidence characteristic that
91
+ // implies they're not sinks, rather than using only medium-confidence characteristics, by deleting the following
92
+ // line.
86
93
confidence < filter .highConfidence ( ) and
87
94
(
88
95
// Exclude endpoints that have a characteristic that implies they're not sinks for _any_ sink type.
0 commit comments