Skip to content

Commit 10cd632

Browse files
committed
Add missing QLDocs
1 parent 8ec5b5b commit 10cd632

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ class PackageArchiveMimeTypeLiteral extends StringLiteral {
2323
PackageArchiveMimeTypeLiteral() { this.getValue() = "application/vnd.android.package-archive" }
2424
}
2525

26+
/** The `android.content.Intent.ACTION_INSTALL_PACKAGE` constant. */
2627
class InstallPackageAction extends Expr {
2728
InstallPackageAction() {
2829
this.(StringLiteral).getValue() = "android.intent.action.INSTALL_PACKAGE"
@@ -110,13 +111,20 @@ class ApkConfiguration extends DataFlow::Configuration {
110111
}
111112
}
112113

114+
/** The `setAction` method of the `android.content.Intent` class. */
113115
class SetActionMethod extends Method {
114116
SetActionMethod() {
115117
this.hasName("setAction") and
116118
this.getDeclaringType() instanceof TypeIntent
117119
}
118120
}
119121

122+
/**
123+
* A dataflow configuration tracking the flow from the `android.content.Intent.ACTION_INSTALL_PACKAGE`
124+
* constant to either the constructor of an intent or the `setAction` method of an intent.
125+
*
126+
* This is used to track if an intent is used to install an APK.
127+
*/
120128
private class InstallPackageActionConfiguration extends TaintTracking3::Configuration {
121129
InstallPackageActionConfiguration() { this = "InstallPackageActionConfiguration" }
122130

0 commit comments

Comments
 (0)