Skip to content

Commit 0dcb554

Browse files
committed
Swift: Add a LocalFlowSource and FlowSource class.
1 parent c5285ac commit 0dcb554

File tree

1 file changed

+17
-3
lines changed

1 file changed

+17
-3
lines changed

swift/ql/lib/codeql/swift/dataflow/FlowSources.qll

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,26 @@
55
private import ExternalFlow
66
private import internal.DataFlowPublic
77

8-
/** A data flow source of remote user input. */
9-
abstract class RemoteFlowSource extends Node {
10-
/** Gets a string that describes the type of this remote flow source. */
8+
/**
9+
* A data flow source of user input, whether local or remote.
10+
*/
11+
abstract class FlowSource extends Node {
12+
/** Gets a string that describes the type of this flow source. */
1113
abstract string getSourceType();
1214
}
1315

16+
/**
17+
* A data flow source of local user input, that is, user input from the same
18+
* device as the code is running on.
19+
*/
20+
abstract class LocalFlowSource extends FlowSource { }
21+
22+
/**
23+
* A data flow source of remote user input. In this context, 'remote' means
24+
* either across a network or from another application that is not trusted.
25+
*/
26+
abstract class RemoteFlowSource extends FlowSource { }
27+
1428
/**
1529
* A data flow source of remote user input that is defined through 'models as data'.
1630
*/

0 commit comments

Comments
 (0)