@@ -7,20 +7,35 @@ import semmle.javascript.frameworks.HTTP
7
7
import semmle.javascript.security.dataflow.DOM
8
8
private import semmle.javascript.internal.CachedStages
9
9
10
- /** A data flow source of remote user input. */
11
10
cached
12
- abstract class RemoteFlowSource extends DataFlow :: Node {
13
- /** Gets a human-readable string that describes the type of this remote flow source . */
11
+ private module Cached {
12
+ /** A data flow source of remote user input . */
14
13
cached
15
- abstract string getSourceType ( ) ;
14
+ abstract class RemoteFlowSource extends DataFlow:: Node {
15
+ /** Gets a human-readable string that describes the type of this remote flow source. */
16
+ cached
17
+ abstract string getSourceType ( ) ;
18
+
19
+ /**
20
+ * Holds if this can be a user-controlled object, such as a JSON object parsed from user-controlled data.
21
+ */
22
+ cached
23
+ predicate isUserControlledObject ( ) { none ( ) }
24
+ }
16
25
17
26
/**
18
- * Holds if this can be a user-controlled object, such as a JSON object parsed from user-controlled data .
27
+ * A source of remote input in a web browser environment .
19
28
*/
20
29
cached
21
- predicate isUserControlledObject ( ) { none ( ) }
30
+ abstract class ClientSideRemoteFlowSource extends RemoteFlowSource {
31
+ /** Gets a string indicating what part of the browser environment this was derived from. */
32
+ cached
33
+ abstract ClientSideRemoteFlowKind getKind ( ) ;
34
+ }
22
35
}
23
36
37
+ import Cached
38
+
24
39
/**
25
40
* A type of remote flow source that is specific to the browser environment.
26
41
*/
@@ -64,14 +79,6 @@ class ClientSideRemoteFlowKind extends string {
64
79
predicate isWindowName ( ) { this = "name" }
65
80
}
66
81
67
- /**
68
- * A source of remote input in a web browser environment.
69
- */
70
- abstract class ClientSideRemoteFlowSource extends RemoteFlowSource {
71
- /** Gets a string indicating what part of the browser environment this was derived from. */
72
- abstract ClientSideRemoteFlowKind getKind ( ) ;
73
- }
74
-
75
82
/**
76
83
* A specification of a remote flow source in a JSON file included in the database.
77
84
*
0 commit comments