@@ -12,29 +12,29 @@ private import semmle.javascript.security.dataflow.DomBasedXssCustomizations
1212private import semmle.javascript.security.dataflow.NosqlInjectionCustomizations
1313private import semmle.javascript.security.dataflow.TaintedPathCustomizations
1414
15- abstract class ClassificationReason extends string {
16- // The name of the reason , which should describe some characteristic of the endpoint that is meaningful for
15+ abstract class EndpointCharacteristic extends string {
16+ // The name of the characteristic , which should describe some characteristic of the endpoint that is meaningful for
1717 // determining whether it's a sink and if so of which type
1818 bindingset [ this ]
19- ClassificationReason ( ) { any ( ) }
19+ EndpointCharacteristic ( ) { any ( ) }
2020
2121 // Indicators with confidence at or above this threshold are considered to be high-confidence indicators.
2222 float getHighConfidenceThreshold ( ) { result = 0.8 }
2323
2424 // Indicators with confidence at or above this threshold are considered to be medium-confidence indicators.
2525 float getMediumConfidenceThreshold ( ) { result = 0.5 }
2626
27- // The logic to identify which endpoints have this reason .
27+ // The logic to identify which endpoints have this characteristic .
2828 abstract predicate getEndpoints ( DataFlow:: Node n ) ;
2929
30- // This predicate describes what the reason tells us about an endpoint.
30+ // This predicate describes what the characteristic tells us about an endpoint.
3131 //
3232 // Params:
3333 // endpointClass: Class 0 is the negative class. Each positive int corresponds to a single sink type.
34- // isPositiveIndicator: Does this reason indicate this endpoint _is_ a member of the class, or that it _isn't_ a
35- // member of the class?
36- // confidence: A number in [0, 1], which tells us how strong an indicator this reason is for the endpoint belonging /
37- // not belonging to the given class.
34+ // isPositiveIndicator: Does this characteristic indicate this endpoint _is_ a member of the class, or that it
35+ // _isn't_ a member of the class?
36+ // confidence: A number in [0, 1], which tells us how strong an indicator this characteristic is for the endpoint
37+ // belonging / not belonging to the given class.
3838 abstract predicate getImplications (
3939 EndpointType endpointClass , boolean isPositiveIndicator , float confidence
4040 ) ;
@@ -45,8 +45,8 @@ abstract class ClassificationReason extends string {
4545 * confidence.
4646 */
4747
48- class DomBasedXssSinkReason extends ClassificationReason {
49- DomBasedXssSinkReason ( ) { this = "DomBasedXssSink" }
48+ class DomBasedXssSinkCharacteristic extends EndpointCharacteristic {
49+ DomBasedXssSinkCharacteristic ( ) { this = "DomBasedXssSink" }
5050
5151 override predicate getEndpoints ( DataFlow:: Node n ) { n instanceof DomBasedXss:: Sink }
5252
@@ -62,8 +62,8 @@ class DomBasedXssSinkReason extends ClassificationReason {
6262 * maximal confidence.
6363 */
6464
65- class TaintedPathSinkReason extends ClassificationReason {
66- TaintedPathSinkReason ( ) { this = "TaintedPathSink" }
65+ class TaintedPathSinkCharacteristic extends EndpointCharacteristic {
66+ TaintedPathSinkCharacteristic ( ) { this = "TaintedPathSink" }
6767
6868 override predicate getEndpoints ( DataFlow:: Node n ) { n instanceof TaintedPath:: Sink }
6969
@@ -79,8 +79,8 @@ class TaintedPathSinkReason extends ClassificationReason {
7979 * maximal confidence.
8080 */
8181
82- class SqlInjectionSinkReason extends ClassificationReason {
83- SqlInjectionSinkReason ( ) { this = "SqlInjectionSink" }
82+ class SqlInjectionSinkCharacteristic extends EndpointCharacteristic {
83+ SqlInjectionSinkCharacteristic ( ) { this = "SqlInjectionSink" }
8484
8585 override predicate getEndpoints ( DataFlow:: Node n ) { n instanceof SqlInjection:: Sink }
8686
@@ -98,8 +98,8 @@ class SqlInjectionSinkReason extends ClassificationReason {
9898 * with maximal confidence.
9999 */
100100
101- class NosqlInjectionSinkReason extends ClassificationReason {
102- NosqlInjectionSinkReason ( ) { this = "NosqlInjectionSink" }
101+ class NosqlInjectionSinkCharacteristic extends EndpointCharacteristic {
102+ NosqlInjectionSinkCharacteristic ( ) { this = "NosqlInjectionSink" }
103103
104104 override predicate getEndpoints ( DataFlow:: Node n ) { n instanceof NosqlInjection:: Sink }
105105
0 commit comments