@@ -569,72 +569,3 @@ private class CannotBeTaintedCharacteristic extends CharacteristicsImpl::LikelyN
569
569
FlowSummaryImpl:: Private:: Steps:: summarySetterStep ( _, _, e .asNode ( ) , _)
570
570
}
571
571
}
572
-
573
- /**
574
- * Holds if the given endpoint has a self-contradictory combination of characteristics. Detects errors in our endpoint
575
- * characteristics. Lists the problematic characteristics and their implications for all such endpoints, together with
576
- * an error message indicating why this combination is problematic.
577
- *
578
- * Copied from
579
- * javascript/ql/experimental/adaptivethreatmodeling/test/endpoint_large_scale/ContradictoryEndpointCharacteristics.ql
580
- */
581
- predicate erroneousEndpoints (
582
- Endpoint endpoint , EndpointCharacteristic characteristic ,
583
- AutomodelEndpointTypes:: EndpointType endpointType , float confidence , string errorMessage ,
584
- boolean ignoreKnownModelingErrors
585
- ) {
586
- // An endpoint's characteristics should not include positive indicators with medium/high confidence for more than one
587
- // sink/source type (including the negative type).
588
- exists (
589
- EndpointCharacteristic characteristic2 , AutomodelEndpointTypes:: EndpointType endpointClass2 ,
590
- float confidence2
591
- |
592
- endpointType != endpointClass2 and
593
- (
594
- endpointType instanceof AutomodelEndpointTypes:: SinkType and
595
- endpointClass2 instanceof AutomodelEndpointTypes:: SinkType
596
- or
597
- endpointType instanceof AutomodelEndpointTypes:: SourceType and
598
- endpointClass2 instanceof AutomodelEndpointTypes:: SourceType
599
- ) and
600
- characteristic .appliesToEndpoint ( endpoint ) and
601
- characteristic2 .appliesToEndpoint ( endpoint ) and
602
- characteristic .hasImplications ( endpointType , true , confidence ) and
603
- characteristic2 .hasImplications ( endpointClass2 , true , confidence2 ) and
604
- confidence > SharedCharacteristics:: mediumConfidence ( ) and
605
- confidence2 > SharedCharacteristics:: mediumConfidence ( ) and
606
- (
607
- ignoreKnownModelingErrors = true and
608
- not knownOverlappingCharacteristics ( characteristic , characteristic2 )
609
- or
610
- ignoreKnownModelingErrors = false
611
- )
612
- ) and
613
- errorMessage = "Endpoint has high-confidence positive indicators for multiple classes"
614
- or
615
- // An endpoint's characteristics should not include positive indicators with medium/high confidence for some class and
616
- // also include negative indicators with medium/high confidence for this same class.
617
- exists ( EndpointCharacteristic characteristic2 , float confidence2 |
618
- characteristic .appliesToEndpoint ( endpoint ) and
619
- characteristic2 .appliesToEndpoint ( endpoint ) and
620
- characteristic .hasImplications ( endpointType , true , confidence ) and
621
- characteristic2 .hasImplications ( endpointType , false , confidence2 ) and
622
- confidence > SharedCharacteristics:: mediumConfidence ( ) and
623
- confidence2 > SharedCharacteristics:: mediumConfidence ( )
624
- ) and
625
- ignoreKnownModelingErrors = false and
626
- errorMessage = "Endpoint has high-confidence positive and negative indicators for the same class"
627
- }
628
-
629
- /**
630
- * Holds if `characteristic1` and `characteristic2` are among the pairs of currently known positive characteristics that
631
- * have some overlap in their results. This indicates a problem with the underlying Java modeling. Specifically,
632
- * `PathCreation` is prone to FPs.
633
- */
634
- private predicate knownOverlappingCharacteristics (
635
- EndpointCharacteristic characteristic1 , EndpointCharacteristic characteristic2
636
- ) {
637
- characteristic1 != characteristic2 and
638
- characteristic1 = [ "mad taint step" , "create path" , "read file" , "known non-sink" ] and
639
- characteristic2 = [ "mad taint step" , "create path" , "read file" , "known non-sink" ]
640
- }
0 commit comments