Skip to content

Commit aa5dd7b

Browse files
committed
Java: mass enable diff-informed data flow + none() overrides
An auto-generated patch that enables diff-informed data flow in the obvious cases. Builds on github#18346 and github/codeql-patch#88
1 parent fb0f12b commit aa5dd7b

7 files changed

+18
-0
lines changed

java/ql/lib/semmle/code/java/security/ArbitraryApkInstallationQuery.qll

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ module ApkInstallationConfig implements DataFlow::ConfigSig {
2323
)
2424
)
2525
}
26+
27+
predicate observeDiffInformedIncrementalMode() { any() }
28+
29+
Location getASelectedSourceLocation(DataFlow::Node sink) { none() }
2630
}
2731

2832
module ApkInstallationFlow = DataFlow::Global<ApkInstallationConfig>;

java/ql/lib/semmle/code/java/security/HardcodedCredentialsApiCallQuery.qll

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ module HardcodedCredentialApiCallConfig implements DataFlow::ConfigSig {
4949
predicate isBarrier(DataFlow::Node n) {
5050
n.asExpr().(MethodCall).getMethod() instanceof MethodSystemGetenv
5151
}
52+
53+
predicate observeDiffInformedIncrementalMode() { any() }
5254
}
5355

5456
/**

java/ql/lib/semmle/code/java/security/HardcodedCredentialsSourceCallQuery.qll

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ module HardcodedCredentialSourceCallConfig implements DataFlow::ConfigSig {
1414
predicate isSource(DataFlow::Node n) { n.asExpr() instanceof HardcodedExpr }
1515

1616
predicate isSink(DataFlow::Node n) { n.asExpr() instanceof FinalCredentialsSourceSink }
17+
18+
predicate observeDiffInformedIncrementalMode() { any() }
1719
}
1820

1921
/**

java/ql/lib/semmle/code/java/security/HttpsUrlsQuery.qll

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ module HttpStringToUrlOpenMethodFlowConfig implements DataFlow::ConfigSig {
1919
}
2020

2121
predicate isBarrier(DataFlow::Node node) { node instanceof SimpleTypeSanitizer }
22+
23+
predicate observeDiffInformedIncrementalMode() { any() }
2224
}
2325

2426
/**

java/ql/lib/semmle/code/java/security/InsecureBasicAuthQuery.qll

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ module BasicAuthFlowConfig implements DataFlow::ConfigSig {
1717
predicate isAdditionalFlowStep(DataFlow::Node node1, DataFlow::Node node2) {
1818
any(HttpUrlsAdditionalTaintStep c).step(node1, node2)
1919
}
20+
21+
predicate observeDiffInformedIncrementalMode() { any() }
2022
}
2123

2224
/**

java/ql/lib/semmle/code/java/security/SensitiveUiQuery.qll

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ private module NotificationTrackingConfig implements DataFlow::ConfigSig {
1919
}
2020

2121
predicate isBarrierIn(DataFlow::Node node) { isSource(node) }
22+
23+
predicate observeDiffInformedIncrementalMode() { any() }
2224
}
2325

2426
/** Taint tracking flow for sensitive data flowing to system notifications. */
@@ -75,6 +77,8 @@ private module TextFieldTrackingConfig implements DataFlow::ConfigSig {
7577
predicate isBarrier(DataFlow::Node node) { node instanceof SimpleTypeSanitizer }
7678

7779
predicate isBarrierIn(DataFlow::Node node) { isSource(node) }
80+
81+
predicate observeDiffInformedIncrementalMode() { any() }
7882
}
7983

8084
/** A local flow step that also flows through access to fields containing `View`s */

java/ql/lib/semmle/code/java/security/UnsafeAndroidAccessQuery.qll

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ module FetchUntrustedResourceConfig implements DataFlow::ConfigSig {
1515
predicate isSink(DataFlow::Node sink) { sink instanceof UrlResourceSink }
1616

1717
predicate isBarrier(DataFlow::Node sanitizer) { sanitizer instanceof RequestForgerySanitizer }
18+
19+
predicate observeDiffInformedIncrementalMode() { any() }
1820
}
1921

2022
/**

0 commit comments

Comments
 (0)