@@ -18,7 +18,7 @@ private import AutomodelJavaUtil
1818from
1919 Endpoint endpoint , string message , FrameworkModeMetadataExtractor meta , DollarAtString package ,
2020 DollarAtString type , DollarAtString subtypes , DollarAtString name , DollarAtString signature ,
21- DollarAtString input , DollarAtString parameterName
21+ DollarAtString input , DollarAtString parameterName , DollarAtString alreadyAiModeled
2222where
2323 not exists ( CharacteristicsImpl:: UninterestingToModelCharacteristic u |
2424 u .appliesToEndpoint ( endpoint )
@@ -28,20 +28,25 @@ where
2828 // label it as a sink for one of the sink types of query B, for which it's already a known sink. This would result in
2929 // overlap between our detected sinks and the pre-existing modeling. We assume that, if a sink has already been
3030 // modeled in a MaD model, then it doesn't belong to any additional sink types, and we don't need to reexamine it.
31- not CharacteristicsImpl:: isSink ( endpoint , _, _) and
31+ (
32+ not CharacteristicsImpl:: isSink ( endpoint , _, _) and alreadyAiModeled = ""
33+ or
34+ alreadyAiModeled .matches ( "%ai-%" ) and
35+ CharacteristicsImpl:: isSink ( endpoint , _, alreadyAiModeled )
36+ ) and
3237 meta .hasMetadata ( endpoint , package , type , subtypes , name , signature , input , parameterName ) and
3338 includeAutomodelCandidate ( package , type , name , signature ) and
3439 // The message is the concatenation of all sink types for which this endpoint is known neither to be a sink nor to be
3540 // a non-sink, and we surface only endpoints that have at least one such sink type.
3641 message =
3742 strictconcat ( AutomodelEndpointTypes:: SinkType sinkType |
38- not CharacteristicsImpl:: isKnownSink ( endpoint , sinkType ) and
43+ not CharacteristicsImpl:: isKnownSink ( endpoint , sinkType , _ ) and
3944 CharacteristicsImpl:: isSinkCandidate ( endpoint , sinkType )
4045 |
4146 sinkType , ", "
4247 )
4348select endpoint ,
44- message + "\nrelated locations: $@, $@." + "\nmetadata: $@, $@, $@, $@, $@, $@, $@." , //
49+ message + "\nrelated locations: $@, $@." + "\nmetadata: $@, $@, $@, $@, $@, $@, $@, $@ ." , //
4550 CharacteristicsImpl:: getRelatedLocationOrCandidate ( endpoint , MethodDoc ( ) ) , "MethodDoc" , //
4651 CharacteristicsImpl:: getRelatedLocationOrCandidate ( endpoint , ClassDoc ( ) ) , "ClassDoc" , //
4752 package , "package" , //
@@ -50,4 +55,5 @@ select endpoint,
5055 name , "name" , //
5156 signature , "signature" , //
5257 input , "input" , //
53- parameterName , "parameterName" //
58+ parameterName , "parameterName" , //
59+ alreadyAiModeled , "alreadyAiModeled"
0 commit comments