diff --git a/java/ql/lib/semmle/code/java/security/ImplicitPendingIntents.qll b/java/ql/lib/semmle/code/java/security/ImplicitPendingIntents.qll index 29ab85cd8c9..42647eab815 100644 --- a/java/ql/lib/semmle/code/java/security/ImplicitPendingIntents.qll +++ b/java/ql/lib/semmle/code/java/security/ImplicitPendingIntents.qll @@ -7,11 +7,13 @@ private import semmle.code.java.frameworks.android.PendingIntent /** A source for an implicit `PendingIntent` flow. */ abstract class ImplicitPendingIntentSource extends DataFlow::Node { + /** Holds if this source has the specified `state`. */ predicate hasState(DataFlow::FlowState state) { state = "" } } /** A sink that sends an implicit and mutable `PendingIntent` to a third party. */ abstract class ImplicitPendingIntentSink extends DataFlow::Node { + /** Holds if this sink has the specified `state`. */ predicate hasState(DataFlow::FlowState state) { state = "" } } diff --git a/java/ql/src/Security/CWE/CWE-927/ImplicitPendingIntents.ql b/java/ql/src/Security/CWE/CWE-927/ImplicitPendingIntents.ql index eaa6f483486..e6aff45524d 100644 --- a/java/ql/src/Security/CWE/CWE-927/ImplicitPendingIntents.ql +++ b/java/ql/src/Security/CWE/CWE-927/ImplicitPendingIntents.ql @@ -20,5 +20,5 @@ import DataFlow::PathGraph from DataFlow::PathNode source, DataFlow::PathNode sink where any(ImplicitPendingIntentStartConf conf).hasFlowPath(source, sink) select sink.getNode(), source, sink, - "An implicit and mutable PendingIntent is created $@ and sent to an unspecified third party.", + "An implicit Intent is created $@ and sent to an unspecified third party through a PendingIntent.", source.getNode(), "here"