Use dedicated instance of DataFlow

This commit is contained in:
Tony Torralba
2022-01-17 16:24:39 +01:00
parent aef63f69b0
commit d9d9ad7d63
3 changed files with 4677 additions and 2 deletions

View File

@@ -0,0 +1,19 @@
/**
* Provides classes for performing local (intra-procedural) and
* global (inter-procedural) data flow analyses (for internal use only).
*
* This copy of the library is exclusively for use by `OnActivityResultSource.qll` and
* related libraries. Configurations computed using this instance of the library
* are in scope whenever `java.qll` is imported, and are used to compute among
* other things `RemoteFlowSource`s.
*/
import java
/**
* Provides classes for performing local (intra-procedural) and
* global (inter-procedural) data flow analyses (for internal use only).
*/
module DataFlowForOnActivityResult {
import semmle.code.java.dataflow.internal.DataFlowImplForOnActivityResult
}

View File

@@ -2,7 +2,7 @@
import java
private import semmle.code.java.dataflow.DataFlow
private import semmle.code.java.dataflow.DataFlow5
private import semmle.code.java.dataflow.internal.DataFlowForOnActivityResult
private import semmle.code.java.frameworks.android.Android
private import semmle.code.java.frameworks.android.Fragment
private import semmle.code.java.frameworks.android.Intent
@@ -59,7 +59,7 @@ class OnActivityResultIncomingIntent extends DataFlow::Node {
/**
* A data flow configuration for implicit intents being used in `startActivityForResult`.
*/
private class ImplicitStartActivityForResultConf extends DataFlow5::Configuration {
private class ImplicitStartActivityForResultConf extends DataFlowForOnActivityResult::Configuration {
ImplicitStartActivityForResultConf() { this = "ImplicitStartActivityForResultConf" }
override predicate isSource(DataFlow::Node source) {