File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
java/ql/lib/semmle/code/java/security Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -14,25 +14,25 @@ private class OnReceiveMethod extends Method {
14
14
}
15
15
16
16
/** A configuration to detect whether the `action` of an `Intent` is checked. */
17
- private class VerifiedIntentConfig extends DataFlow:: Configuration {
18
- VerifiedIntentConfig ( ) { this = "VerifiedIntentConfig" }
19
-
20
- override predicate isSource ( DataFlow:: Node src ) {
17
+ private module VerifiedIntentConfig implements DataFlow:: ConfigSig {
18
+ predicate isSource ( DataFlow:: Node src ) {
21
19
src .asParameter ( ) = any ( OnReceiveMethod orm ) .getIntentParameter ( )
22
20
}
23
21
24
- override predicate isSink ( DataFlow:: Node sink ) {
22
+ predicate isSink ( DataFlow:: Node sink ) {
25
23
exists ( MethodAccess ma |
26
24
ma .getMethod ( ) .hasQualifiedName ( "android.content" , "Intent" , "getAction" ) and
27
25
sink .asExpr ( ) = ma .getQualifier ( )
28
26
)
29
27
}
30
28
}
31
29
30
+ private module VerifiedIntentFlow = DataFlow:: Make< VerifiedIntentConfig > ;
31
+
32
32
/** An `onReceive` method that doesn't verify the action of the intent it receives. */
33
33
private class UnverifiedOnReceiveMethod extends OnReceiveMethod {
34
34
UnverifiedOnReceiveMethod ( ) {
35
- not any ( VerifiedIntentConfig c ) . hasFlow ( DataFlow:: parameterNode ( this .getIntentParameter ( ) ) , _)
35
+ not VerifiedIntentFlow :: hasFlow ( DataFlow:: parameterNode ( this .getIntentParameter ( ) ) , _)
36
36
}
37
37
}
38
38
You can’t perform that action at this time.
0 commit comments