Skip to content

Commit e0311e2

Browse files
committed
Java: convert ImproperIntentVerification test to .qlref
It's a non-path query, so the InlineExpectationsTest postprocessor doesn't do anything.
1 parent aac4f63 commit e0311e2

File tree

4 files changed

+8
-21
lines changed

4 files changed

+8
-21
lines changed

java/ql/test/query-tests/security/CWE-925/BootReceiverXml.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
class BootReceiverXml extends BroadcastReceiver {
77
void doStuff(Intent intent) {}
88

9-
@Override
10-
public void onReceive(Context ctx, Intent intent) { // $hasResult
9+
@Override
10+
public void onReceive(Context ctx, Intent intent) { // $ Alert
1111
doStuff(intent);
1212
}
13-
}
13+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
| BootReceiverXml.java:10:17:10:25 | onReceive | This reciever doesn't verify intents it receives, and $@ to receive $@. | AndroidManifest.xml:3:9:7:20 | receiver | it is registered | AndroidManifest.xml:5:17:5:79 | action | the system action action |

java/ql/test/query-tests/security/CWE-925/ImproperIntentVerification.ql

Lines changed: 0 additions & 18 deletions
This file was deleted.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
query: Security/CWE/CWE-925/ImproperIntentVerification.ql
2+
postprocess:
3+
- utils/test/PrettyPrintModels.ql
4+
- utils/test/InlineExpectationsTestQuery.ql

0 commit comments

Comments
 (0)