Skip to content

Commit ba95d46

Browse files
Apply suggestions from code review
Co-authored-by: Tony Torralba <[email protected]>
1 parent 6dac86b commit ba95d46

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
lgtm,codescanning
2-
* The query "Leaking sensitive information through an implicit intent" (`java/android/sensitive-communication`) has been promoted from experimental to the main query pack. Its results will now appear by default. The query was originally [submitted as an experimental query by @luchua-bc.](https://github.com/github/codeql/pull/4512)
2+
* The query "Leaking sensitive information through an implicit Intent" (`java/android/sensitive-communication`) has been promoted from experimental to the main query pack. Its results will now appear by default. The query was originally [submitted as an experimental query by @luchua-bc.](https://github.com/github/codeql/pull/4512)

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ private predicate isSensitiveBroadcastSink(DataFlow::Node sendBroadcastCallArg)
102102
}
103103

104104
/**
105-
* Holds if `arg` as an argument to a use of a `startActivity` or `startService` method that sends an intent to another application.
105+
* Holds if `arg` is an argument in a use of a `startActivity` or `startService` method that sends an Intent to another application.
106106
*/
107107
private predicate isStartActivityOrServiceSink(DataFlow::Node arg) {
108108
exists(MethodAccess ma, string name | ma.getMethod().hasName(name) |
@@ -147,7 +147,7 @@ private predicate isCleanIntent(Expr intent) {
147147
}
148148

149149
/**
150-
* Taint configuration tracking flow from variables containing sensitive information to broadcast intents.
150+
* Taint configuration tracking flow from variables containing sensitive information to broadcast Intents.
151151
*/
152152
class SensitiveCommunicationConfig extends TaintTracking::Configuration {
153153
SensitiveCommunicationConfig() { this = "Sensitive Communication Configuration" }

java/ql/src/Security/CWE/CWE-927/SensitiveCommunication.qhelp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,20 @@
22
<qhelp>
33

44
<overview>
5-
<p>When an implicit intent is used with a method such as <code>startActivity</code>, <code>startService</code>, or <code>sendBroadcast</code>, it may be read by other applications on the device.</p>
6-
<p>This means that sensitive data in these intents may be leaked.</p>
5+
<p>When an implicit Intent is used with a method such as <code>startActivity</code>, <code>startService</code>, or <code>sendBroadcast</code>, it may be read by other applications on the device.</p>
6+
<p>This means that sensitive data in these Intents may be leaked.</p>
77
</overview>
88

99
<recommendation>
1010
<p>
11-
For <code>sendBroadcast</code> methods, a receiver permission may be specified so that only applications with a certain permission may receive the intent;
11+
For <code>sendBroadcast</code> methods, a receiver permission may be specified so that only applications with a certain permission may receive the Intent;
1212
or a <code>LocalBroadcastManager</code> may be used.
13-
Otherwise, ensure that intents containing sensitive data have an explicit receiver class set.
13+
Otherwise, ensure that Intents containing sensitive data have an explicit receiver class set.
1414
</p>
1515
</recommendation>
1616

1717
<example>
18-
<p>The following example shows two ways of broadcasting intents. In the 'BAD' case, no "receiver permission" is specified. In the 'GOOD' case, "receiver permission" or "receiver application" is specified.</p>
18+
<p>The following example shows two ways of broadcasting Intents. In the 'BAD' case, no "receiver permission" is specified. In the 'GOOD' case, "receiver permission" or "receiver application" is specified.</p>
1919
<sample src="SensitiveCommunication.java" />
2020
</example>
2121

java/ql/src/Security/CWE/CWE-927/SensitiveCommunication.ql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
2-
* @name Leaking sensitive information through an implicit intent
3-
* @description An Android application uses implicit intents containing sensitive data
2+
* @name Leaking sensitive information through an implicit Intent
3+
* @description An Android application uses implicit Intents containing sensitive data
44
* in a way that exposes it to arbitrary applications on the device.
55
* @kind path-problem
66
* @problem.severity warning

0 commit comments

Comments
 (0)