mirror of
https://github.com/github/codeql.git
synced 2026-05-02 12:15:17 +02:00
Use InlineFlowTest for local and remote flow tests
This commit is contained in:
@@ -4,34 +4,39 @@ import android.app.Activity;
|
||||
|
||||
public class IntentSources extends Activity {
|
||||
|
||||
private static void sink(Object o) {}
|
||||
|
||||
public void test() throws java.io.IOException {
|
||||
|
||||
String trouble = this.getIntent().getStringExtra("key");
|
||||
Runtime.getRuntime().exec(trouble);
|
||||
sink(trouble); // $hasRemoteTaintFlow
|
||||
|
||||
}
|
||||
|
||||
public void test2() throws java.io.IOException {
|
||||
|
||||
String trouble = getIntent().getStringExtra("key");
|
||||
Runtime.getRuntime().exec(trouble);
|
||||
sink(trouble); // $hasRemoteTaintFlow
|
||||
|
||||
}
|
||||
|
||||
public void test3() throws java.io.IOException {
|
||||
|
||||
String trouble = getIntent().getExtras().getString("key");
|
||||
Runtime.getRuntime().exec(trouble);
|
||||
sink(trouble); // $hasRemoteTaintFlow
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
class OtherClass {
|
||||
|
||||
private static void sink(Object o) {}
|
||||
|
||||
public void test(IntentSources is) throws java.io.IOException {
|
||||
String trouble = is.getIntent().getStringExtra("key");
|
||||
Runtime.getRuntime().exec(trouble);
|
||||
sink(trouble); // $hasRemoteTaintFlow
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user