Skip to content

Commit 58ad97c

Browse files
committed
Java: Add manual overlay annotations
1 parent 052023e commit 58ad97c

File tree

9 files changed

+9
-0
lines changed

9 files changed

+9
-0
lines changed

java/ql/lib/semmle/code/java/dispatch/VirtualDispatch.qll

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ Callable exactCallable(Call c) {
3636
private predicate implCount(MethodCall m, int c) { strictcount(viableImpl(m)) = c }
3737

3838
/** Gets a viable implementation of the target of the given `Call`. */
39+
overlay[local]
3940
Callable viableCallable(Call c) {
4041
result = viableImpl(c)
4142
or

java/ql/src/experimental/Security/CWE/CWE-020/Log4jJndiInjection.ql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import semmle.code.java.dataflow.ExternalFlow
2222
private import semmle.code.java.security.Sanitizers
2323
import Log4jInjectionFlow::PathGraph
2424

25+
overlay[local?]
2526
deprecated private class ActivateModels extends ActiveExperimentalModels {
2627
ActivateModels() { this = "log4j-injection" }
2728
}

java/ql/src/experimental/Security/CWE/CWE-036/OpenStream.ql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import semmle.code.java.dataflow.FlowSources
1717
import semmle.code.java.dataflow.ExternalFlow
1818
import RemoteUrlToOpenStreamFlow::PathGraph
1919

20+
overlay[local?]
2021
deprecated private class ActivateModels extends ActiveExperimentalModels {
2122
ActivateModels() { this = "openstream-called-on-tainted-url" }
2223
}

java/ql/src/experimental/Security/CWE/CWE-073/FilePathInjection.ql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import semmle.code.java.security.PathSanitizer
2222
private import semmle.code.java.security.Sanitizers
2323
import InjectFilePathFlow::PathGraph
2424

25+
overlay[local?]
2526
deprecated private class ActivateModels extends ActiveExperimentalModels {
2627
ActivateModels() { this = "file-path-injection" }
2728
}

java/ql/src/experimental/Security/CWE/CWE-078/ExecTainted.ql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import semmle.code.java.security.CommandLineQuery
1818
import InputToArgumentToExecFlow::PathGraph
1919
private import semmle.code.java.dataflow.ExternalFlow
2020

21+
overlay[local?]
2122
deprecated private class ActivateModels extends ActiveExperimentalModels {
2223
ActivateModels() { this = "jsch-os-injection" }
2324
}

java/ql/src/experimental/Security/CWE/CWE-200/AndroidWebResourceResponse.qll

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ private import semmle.code.java.dataflow.ExternalFlow
77
private import semmle.code.java.dataflow.FlowSteps
88
private import semmle.code.java.frameworks.android.WebView
99

10+
overlay[local?]
1011
private class ActivateModels extends ActiveExperimentalModels {
1112
ActivateModels() { this = "android-web-resource-response" }
1213
}

java/ql/src/experimental/Security/CWE/CWE-400/ThreadResourceAbuse.qll

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import semmle.code.java.arithmetic.Overflow
88
import semmle.code.java.dataflow.FlowSteps
99
import semmle.code.java.controlflow.Guards
1010

11+
overlay[local?]
1112
private class ActivateModels extends ActiveExperimentalModels {
1213
ActivateModels() { this = "thread-resource-abuse" }
1314
}

java/ql/src/experimental/Security/CWE/CWE-625/PermissiveDotRegexQuery.qll

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import semmle.code.java.controlflow.Guards
99
import semmle.code.java.security.UrlRedirect
1010
import Regex
1111

12+
overlay[local?]
1213
private class ActivateModels extends ActiveExperimentalModels {
1314
ActivateModels() { this = "permissive-dot-regex-query" }
1415
}

shared/dataflow/codeql/dataflow/internal/DataFlowImplCommon.qll

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,7 @@ module MakeImplCommon<LocationSig Location, InputSig<Location> Lang> {
291291
* to `lambdaCall`, if any. That is, `lastCall` is able to target the enclosing
292292
* callable of `lambdaCall`.
293293
*/
294+
overlay[global]
294295
pragma[nomagic]
295296
predicate revLambdaFlow(
296297
Call lambdaCall, LambdaCallKind kind, Node node, Type t, boolean toReturn, boolean toJump,

0 commit comments

Comments
 (0)