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 {
1414}
1515
1616/** 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 ) {
2119 src .asParameter ( ) = any ( OnReceiveMethod orm ) .getIntentParameter ( )
2220 }
2321
24- override predicate isSink ( DataFlow:: Node sink ) {
22+ predicate isSink ( DataFlow:: Node sink ) {
2523 exists ( MethodAccess ma |
2624 ma .getMethod ( ) .hasQualifiedName ( "android.content" , "Intent" , "getAction" ) and
2725 sink .asExpr ( ) = ma .getQualifier ( )
2826 )
2927 }
3028}
3129
30+ private module VerifiedIntentFlow = DataFlow:: Make< VerifiedIntentConfig > ;
31+
3232/** An `onReceive` method that doesn't verify the action of the intent it receives. */
3333private class UnverifiedOnReceiveMethod extends OnReceiveMethod {
3434 UnverifiedOnReceiveMethod ( ) {
35- not any ( VerifiedIntentConfig c ) . hasFlow ( DataFlow:: parameterNode ( this .getIntentParameter ( ) ) , _)
35+ not VerifiedIntentFlow :: hasFlow ( DataFlow:: parameterNode ( this .getIntentParameter ( ) ) , _)
3636 }
3737}
3838
You can’t perform that action at this time.
0 commit comments