Skip to content

Commit 5ca2221

Browse files
author
Stephan Brandauer
committed
remove some of the biggest frameworks from application mode consideration
1 parent db77c6b commit 5ca2221

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

java/ql/src/Telemetry/AutomodelApplicationModeCharacteristics.qll

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,29 @@ private class ArgumentToLocalCall extends CharacteristicsImpl::UninterestingToMo
277277
}
278278
}
279279

280+
/**
281+
* A characteristic that avoids modeling endpoint that are passed to frameworks
282+
* in application mode.
283+
*
284+
* It's much more economical to use framework mode for those.
285+
*/
286+
private class SkipFrameworkModeling extends CharacteristicsImpl::UninterestingToModelCharacteristic {
287+
SkipFrameworkModeling() { this = "skip modeling of large frameworks" }
288+
289+
override predicate appliesToEndpoint(Endpoint e) {
290+
ApplicationCandidatesImpl::getCallable(e)
291+
.getDeclaringType()
292+
.getPackage()
293+
.getName()
294+
.matches([
295+
"com.google%", //
296+
"java.%", //
297+
"javax.%", //
298+
"org.apache%", //
299+
])
300+
}
301+
}
302+
280303
/**
281304
* A Characteristic that marks endpoints as uninteresting to model, according to the Java ModelExclusions module.
282305
*/

0 commit comments

Comments
 (0)