Skip to content

Commit 0eaad41

Browse files
committed
Add RemoteFlowSource as a valid source
1 parent 4d51e4f commit 0eaad41

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import semmle.code.java.frameworks.android.Intent
1515
import semmle.code.java.dataflow.DataFlow
1616
import semmle.code.java.dataflow.TaintTracking2
1717
import semmle.code.java.dataflow.TaintTracking3
18+
import semmle.code.java.dataflow.FlowSources
1819
private import semmle.code.java.dataflow.ExternalFlow
1920
import DataFlow::PathGraph
2021

@@ -85,7 +86,8 @@ class ExternalApkSource extends DataFlow::Node {
8586
ExternalApkSource() {
8687
sourceNode(this, "android-external-storage-dir") or
8788
this.asExpr().(MethodAccess).getMethod() instanceof UriConstructorMethod or
88-
this.asExpr().(StringLiteral).getValue().matches("file://%")
89+
this.asExpr().(StringLiteral).getValue().matches("file://%") or
90+
this instanceof RemoteFlowSource
8991
}
9092
}
9193

0 commit comments

Comments
 (0)