mirror of
https://github.com/github/codeql.git
synced 2025-12-21 11:16:30 +01:00
Use CSV models
This commit is contained in:
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
import java
|
import java
|
||||||
private import semmle.code.java.dataflow.DataFlow
|
private import semmle.code.java.dataflow.DataFlow
|
||||||
|
private import semmle.code.java.dataflow.ExternalFlow
|
||||||
private import semmle.code.java.frameworks.android.Intent
|
private import semmle.code.java.frameworks.android.Intent
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -28,19 +29,5 @@ class IntentRedirectionAdditionalTaintStep extends Unit {
|
|||||||
|
|
||||||
/** Default sink for Intent redirection vulnerabilities. */
|
/** Default sink for Intent redirection vulnerabilities. */
|
||||||
private class DefaultIntentRedirectionSink extends IntentRedirectionSink {
|
private class DefaultIntentRedirectionSink extends IntentRedirectionSink {
|
||||||
DefaultIntentRedirectionSink() {
|
DefaultIntentRedirectionSink() { sinkNode(this, "intent-start") }
|
||||||
exists(MethodAccess ma, Method m |
|
|
||||||
ma.getMethod() = m and
|
|
||||||
this.asExpr() = ma.getAnArgument() and
|
|
||||||
(
|
|
||||||
this.asExpr().getType() instanceof TypeIntent
|
|
||||||
or
|
|
||||||
this.asExpr().getType().(Array).getComponentType() instanceof TypeIntent
|
|
||||||
)
|
|
||||||
|
|
|
||||||
m instanceof StartActivityMethod or
|
|
||||||
m instanceof StartServiceMethod or
|
|
||||||
m instanceof SendBroadcastMethod
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,7 +18,6 @@ public class AndroidIntentRedirectionTest extends Activity {
|
|||||||
startActivityAsUser(intent, null); // $ hasAndroidIntentRedirection
|
startActivityAsUser(intent, null); // $ hasAndroidIntentRedirection
|
||||||
startActivityAsUser(intent, null, null); // $ hasAndroidIntentRedirection
|
startActivityAsUser(intent, null, null); // $ hasAndroidIntentRedirection
|
||||||
startActivityAsCaller(intent, null, false, 0); // $ hasAndroidIntentRedirection
|
startActivityAsCaller(intent, null, false, 0); // $ hasAndroidIntentRedirection
|
||||||
startActivityAsUserFromFragment(null, intent, 0, null, null); // $ hasAndroidIntentRedirection
|
|
||||||
startActivityForResult(intent, 0); // $ hasAndroidIntentRedirection
|
startActivityForResult(intent, 0); // $ hasAndroidIntentRedirection
|
||||||
startActivityForResult(intent, 0, null); // $ hasAndroidIntentRedirection
|
startActivityForResult(intent, 0, null); // $ hasAndroidIntentRedirection
|
||||||
startActivityForResult(null, intent, 0, null); // $ hasAndroidIntentRedirection
|
startActivityForResult(null, intent, 0, null); // $ hasAndroidIntentRedirection
|
||||||
|
|||||||
Reference in New Issue
Block a user