Skip to content

Commit 47c851e

Browse files
committed
Consider more startService methods
1 parent 12059a8 commit 47c851e

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

java/ql/lib/semmle/code/java/security/ImplicitPendingIntents.qll

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ private class DefaultIntentRedirectionSinkModel extends SinkModelCsv {
5151
"android.content;Context;true;startActivityFromChild;;;Argument[1];intent-start",
5252
"android.content;Context;true;startActivityFromFragment;;;Argument[1];intent-start",
5353
"android.content;Context;true;startActivityIfNeeded;;;Argument[0];intent-start",
54+
"android.content;Context;true;startForegroundService;;;Argument[0];intent-start",
5455
"android.content;Context;true;startService;;;Argument[0];intent-start",
5556
"android.content;Context;true;startServiceAsUser;;;Argument[0];intent-start",
5657
"android.content;Context;true;sendBroadcast;;;Argument[0];intent-start",

java/ql/lib/semmle/code/java/security/ImplicitPendingIntentsQuery.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ private class SendPendingIntent extends DataFlow::Node {
6464
not exists(MethodAccess ma, Method m |
6565
ma.getMethod() = m and
6666
m.getDeclaringType().getASupertype*() instanceof TypeContext and
67-
m.hasName("startService") and
67+
m.getName().matches("start%Service%") and
6868
this.asExpr() = ma.getArgument(0)
6969
)
7070
or

0 commit comments

Comments
 (0)