Skip to content

Commit 1c425a5

Browse files
committed
Change from package to endpoint.
1 parent 9b8d7df commit 1c425a5

File tree

3 files changed

+13
-11
lines changed

3 files changed

+13
-11
lines changed

java/ql/src/Telemetry/AutomodelApplicationModeExtractCandidates.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ where
6666
// modeled in a MaD model, then it doesn't belong to any additional sink types, and we don't need to reexamine it.
6767
not CharacteristicsImpl::isSink(endpoint, _, _) and
6868
meta.hasMetadata(endpoint, package, type, subtypes, name, signature, input) and
69-
automodelCandidateFilter(package) and
69+
includeAutomodelCandidate(package, type, name, signature) and
7070
// The message is the concatenation of all sink types for which this endpoint is known neither to be a sink nor to be
7171
// a non-sink, and we surface only endpoints that have at least one such sink type.
7272
message =

java/ql/src/Telemetry/AutomodelFrameworkModeExtractCandidates.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ where
3030
// modeled in a MaD model, then it doesn't belong to any additional sink types, and we don't need to reexamine it.
3131
not CharacteristicsImpl::isSink(endpoint, _, _) and
3232
meta.hasMetadata(endpoint, package, type, subtypes, name, signature, input, parameterName) and
33-
automodelCandidateFilter(package) and
33+
includeAutomodelCandidate(package, type, name, signature) and
3434
// The message is the concatenation of all sink types for which this endpoint is known neither to be a sink nor to be
3535
// a non-sink, and we surface only endpoints that have at least one such sink type.
3636
message =

java/ql/src/Telemetry/AutomodelJavaUtil.qll

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -68,20 +68,22 @@ boolean considerSubtypes(Callable callable) {
6868
}
6969

7070
/**
71-
* Holds if the given package is a candidate for automodeling.
71+
* Holds if the given package, type, name and signature is a candidate for automodeling.
7272
*
73-
* This predicate is extensible, so that different packages can be selected at runtime.
73+
* This predicate is extensible, so that different endpoints can be selected at runtime.
7474
*/
75-
extensible predicate automodelCandidatePackageFilter(string package);
75+
extensible predicate automodelCandidateFilter(
76+
string package, string type, string name, string signature
77+
);
7678

7779
/**
78-
* Holds if the given package is a candidate for automodeling.
80+
* Holds if the given package, type, name and signature is a candidate for automodeling.
7981
*
8082
* This relies on an extensible predicate, and if that is not supplied then
81-
* all packages are considered candidates.
83+
* all endpoints are considered candidates.
8284
*/
83-
bindingset[package]
84-
predicate automodelCandidateFilter(string package) {
85-
not automodelCandidatePackageFilter(_) or
86-
automodelCandidatePackageFilter(package)
85+
bindingset[package, type, name, signature]
86+
predicate includeAutomodelCandidate(string package, string type, string name, string signature) {
87+
not automodelCandidateFilter(_, _, _, _) or
88+
automodelCandidateFilter(package, type, name, signature)
8789
}

0 commit comments

Comments
 (0)