Skip to content

Commit b6eeac5

Browse files
committed
Update names to new naming convention
1 parent e2acc26 commit b6eeac5

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

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

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,31 +9,31 @@ private import semmle.code.java.security.ArbitraryApkInstallation
99
* A dataflow configuration for flow from an external source of an APK to the
1010
* `setData[AndType][AndNormalize]` method of an intent.
1111
*/
12-
private module ApkConf implements DataFlow::ConfigSig {
12+
private module ApkInstallationConfiguration implements DataFlow::ConfigSig {
1313
predicate isSource(DataFlow::Node node) { node instanceof ExternalApkSource }
1414

1515
predicate isSink(DataFlow::Node node) {
1616
exists(MethodAccess ma |
1717
ma.getMethod() instanceof SetDataMethod and
1818
ma.getArgument(0) = node.asExpr() and
1919
(
20-
PackageArchiveMimeTypeConfiguration::hasFlowToExpr(ma.getQualifier())
20+
PackageArchiveMimeTypeFlow::hasFlowToExpr(ma.getQualifier())
2121
or
22-
InstallPackageActionConfiguration::hasFlowToExpr(ma.getQualifier())
22+
InstallPackageActionFlow::hasFlowToExpr(ma.getQualifier())
2323
)
2424
)
2525
}
2626
}
2727

28-
module ApkConfiguration = DataFlow::Make<ApkConf>;
28+
module ApkInstallationFlow = DataFlow::Make<ApkInstallationConfiguration>;
2929

3030
/**
3131
* A dataflow configuration tracking the flow from the `android.content.Intent.ACTION_INSTALL_PACKAGE`
3232
* constant to either the constructor of an intent or the `setAction` method of an intent.
3333
*
3434
* This is used to track if an intent is used to install an APK.
3535
*/
36-
private module InstallPackageActionConfig implements DataFlow::StateConfigSig {
36+
private module InstallPackageActionConfiguration implements DataFlow::StateConfigSig {
3737
class FlowState = string;
3838

3939
predicate isSource(DataFlow::Node source, FlowState state) {
@@ -69,15 +69,15 @@ private module InstallPackageActionConfig implements DataFlow::StateConfigSig {
6969
predicate isBarrier(DataFlow::Node node, FlowState state) { none() }
7070
}
7171

72-
private module InstallPackageActionConfiguration =
73-
TaintTracking::MakeWithState<InstallPackageActionConfig>;
72+
private module InstallPackageActionFlow =
73+
TaintTracking::MakeWithState<InstallPackageActionConfiguration>;
7474

7575
/**
7676
* A dataflow configuration tracking the flow of the Android APK MIME type to
7777
* the `setType` or `setTypeAndNormalize` method of an intent, followed by a call
7878
* to `setData[AndType][AndNormalize]`.
7979
*/
80-
private module PackageArchiveMimeTypeConfig implements DataFlow::StateConfigSig {
80+
private module PackageArchiveMimeTypeConfiguration implements DataFlow::StateConfigSig {
8181
class FlowState = string;
8282

8383
predicate isSource(DataFlow::Node node, FlowState state) {
@@ -111,5 +111,5 @@ private module PackageArchiveMimeTypeConfig implements DataFlow::StateConfigSig
111111
predicate isBarrier(DataFlow::Node node, FlowState state) { none() }
112112
}
113113

114-
private module PackageArchiveMimeTypeConfiguration =
115-
TaintTracking::MakeWithState<PackageArchiveMimeTypeConfig>;
114+
private module PackageArchiveMimeTypeFlow =
115+
TaintTracking::MakeWithState<PackageArchiveMimeTypeConfiguration>;

java/ql/src/Security/CWE/CWE-094/ArbitraryApkInstallation.ql

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212

1313
import java
1414
import semmle.code.java.security.ArbitraryApkInstallationQuery
15-
import ApkConfiguration::PathGraph
15+
import ApkInstallationFlow::PathGraph
1616

17-
from ApkConfiguration::PathNode source, ApkConfiguration::PathNode sink
18-
where ApkConfiguration::hasFlowPath(source, sink)
17+
from ApkInstallationFlow::PathNode source, ApkInstallationFlow::PathNode sink
18+
where ApkInstallationFlow::hasFlowPath(source, sink)
1919
select sink.getNode(), source, sink, "Arbitrary Android APK installation."

java/ql/test/query-tests/security/CWE-094/ApkInstallationTest.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class HasApkInstallationTest extends InlineExpectationsTest {
1010

1111
override predicate hasActualResult(Location location, string element, string tag, string value) {
1212
tag = "hasApkInstallation" and
13-
exists(DataFlow::Node sink | ApkConfiguration::hasFlowTo(sink) |
13+
exists(DataFlow::Node sink | ApkInstallationFlow::hasFlowTo(sink) |
1414
sink.getLocation() = location and
1515
element = sink.toString() and
1616
value = ""

0 commit comments

Comments
 (0)