Skip to content

Commit 9050594

Browse files
committed
Generally define lower-numbered data-flow configs in terms of higher-numbered ones
Since usually we have DataFlow3::Configurations that stand alone, DataFlow2::Configurations that depend on them, and finally DataFlow::Configurations that produce a top-level query result (for example), qll files where the reverse pattern holds will usually not be concurrently importable due to dataflow configuration recursion prevention.
1 parent 27d87e9 commit 9050594

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

java/ql/lib/semmle/code/java/frameworks/SnakeYaml.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class Yaml extends RefType {
3030
Yaml() { this.getAnAncestor().hasQualifiedName("org.yaml.snakeyaml", "Yaml") }
3131
}
3232

33-
private class SafeYamlConstructionFlowConfig extends DataFlow2::Configuration {
33+
private class SafeYamlConstructionFlowConfig extends DataFlow3::Configuration {
3434
SafeYamlConstructionFlowConfig() { this = "SnakeYaml::SafeYamlConstructionFlowConfig" }
3535

3636
override predicate isSource(DataFlow::Node src) {
@@ -65,7 +65,7 @@ private class SnakeYamlParse extends MethodAccess {
6565
}
6666
}
6767

68-
private class SafeYamlFlowConfig extends DataFlow3::Configuration {
68+
private class SafeYamlFlowConfig extends DataFlow2::Configuration {
6969
SafeYamlFlowConfig() { this = "SnakeYaml::SafeYamlFlowConfig" }
7070

7171
override predicate isSource(DataFlow::Node src) { src.asExpr() instanceof SafeYaml }

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
import java
44
import semmle.code.java.dataflow.FlowSources
5-
import semmle.code.java.dataflow.DataFlow3
5+
import semmle.code.java.dataflow.DataFlow2
66
import semmle.code.java.dataflow.TaintTracking
7-
import semmle.code.java.dataflow.TaintTracking2
7+
import semmle.code.java.dataflow.TaintTracking3
88
import semmle.code.java.security.AndroidIntentRedirection
99

1010
/**
@@ -38,7 +38,7 @@ private class OriginalIntentSanitizer extends IntentRedirectionSanitizer {
3838
* Data flow configuration used to discard incoming Intents
3939
* flowing directly to sinks that start Android components.
4040
*/
41-
private class SameIntentBeingRelaunchedConfiguration extends DataFlow3::Configuration {
41+
private class SameIntentBeingRelaunchedConfiguration extends DataFlow2::Configuration {
4242
SameIntentBeingRelaunchedConfiguration() { this = "SameIntentBeingRelaunchedConfiguration" }
4343

4444
override predicate isSource(DataFlow::Node source) { source instanceof RemoteFlowSource }
@@ -74,7 +74,7 @@ private class IntentWithTaintedComponent extends DataFlow::Node {
7474
/**
7575
* A taint tracking configuration for tainted data flowing to an `Intent`'s component.
7676
*/
77-
private class TaintedIntentComponentConf extends TaintTracking2::Configuration {
77+
private class TaintedIntentComponentConf extends TaintTracking3::Configuration {
7878
TaintedIntentComponentConf() { this = "TaintedIntentComponentConf" }
7979

8080
override predicate isSource(DataFlow::Node source) { source instanceof RemoteFlowSource }

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import java
44
import semmle.code.java.frameworks.JAXB
55
import semmle.code.java.dataflow.DataFlow
6-
import semmle.code.java.dataflow.DataFlow2
76
import semmle.code.java.security.CleartextStorageQuery
87
import semmle.code.java.security.CleartextStoragePropertiesQuery
98

@@ -74,7 +73,7 @@ private Expr getInstanceInput(DataFlow::Node instance, RefType t) {
7473
)
7574
}
7675

77-
private class ClassStoreFlowConfig extends DataFlow2::Configuration {
76+
private class ClassStoreFlowConfig extends DataFlow::Configuration {
7877
ClassStoreFlowConfig() { this = "ClassStoreFlowConfig" }
7978

8079
override predicate isSource(DataFlow::Node src) { src.asExpr() instanceof ClassStore }

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import java
44
private import semmle.code.java.dataflow.DataFlow4
55
private import semmle.code.java.dataflow.TaintTracking
6+
private import semmle.code.java.dataflow.TaintTracking2
67
private import semmle.code.java.security.SensitiveActions
78

89
/** A sink representing persistent storage that saves data in clear text. */
@@ -39,7 +40,7 @@ abstract class Storable extends Call {
3940
abstract Expr getAStore();
4041
}
4142

42-
private class SensitiveSourceFlowConfig extends TaintTracking::Configuration {
43+
private class SensitiveSourceFlowConfig extends TaintTracking2::Configuration {
4344
SensitiveSourceFlowConfig() { this = "SensitiveSourceFlowConfig" }
4445

4546
override predicate isSource(DataFlow::Node src) { src.asExpr() instanceof SensitiveExpr }

0 commit comments

Comments
 (0)