File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
java/ql/src/Security/CWE/CWE-094 Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff 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. */
2627class 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. */
113115class 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+ */
120128private class InstallPackageActionConfiguration extends TaintTracking3:: Configuration {
121129 InstallPackageActionConfiguration ( ) { this = "InstallPackageActionConfiguration" }
122130
You can’t perform that action at this time.
0 commit comments