@@ -43,35 +43,47 @@ import Cached
4343
4444/**
4545 * A type of remote flow source that is specific to the browser environment.
46+ *
47+ * The underlying string also corresponds to a source kind.
4648 */
4749class ClientSideRemoteFlowKind extends string {
4850 ClientSideRemoteFlowKind ( ) {
49- this = [ "query" , "fragment" , "path" , "url" , "name" , "message-event" ]
51+ this =
52+ [
53+ "browser" , "browser-url-query" , "browser-url-fragment" , "browser-url-path" , "browser-url" ,
54+ "browser-window-name" , "browser-message-event"
55+ ]
5056 }
5157
5258 /**
53- * Holds if this is the `query` kind, describing sources derived from the query parameters of the browser URL,
59+ * Holds if this is the `browser` kind, indicating a remote source in a browser context, that does not fit into one
60+ * of the more specific kinds.
61+ */
62+ predicate isGenericBrowserSourceKind ( ) { this = "browser" }
63+
64+ /**
65+ * Holds if this is the `browser-url-query` kind, describing sources derived from the query parameters of the browser URL,
5466 * such as `location.search`.
5567 */
56- predicate isQuery ( ) { this = "query" }
68+ predicate isQuery ( ) { this = "browser-url- query" }
5769
5870 /**
59- * Holds if this is the `frgament ` kind, describing sources derived from the fragment part of the browser URL,
71+ * Holds if this is the `browser-url-fragment ` kind, describing sources derived from the fragment part of the browser URL,
6072 * such as `location.hash`.
6173 */
62- predicate isFragment ( ) { this = "fragment" }
74+ predicate isFragment ( ) { this = "browser-url- fragment" }
6375
6476 /**
65- * Holds if this is the `path` kind, describing sources derived from the pathname of the browser URL,
77+ * Holds if this is the `browser-url- path` kind, describing sources derived from the pathname of the browser URL,
6678 * such as `location.pathname`.
6779 */
68- predicate isPath ( ) { this = "path" }
80+ predicate isPath ( ) { this = "browser-url- path" }
6981
7082 /**
71- * Holds if this is the `url` kind, describing sources derived from the browser URL,
83+ * Holds if this is the `browser- url` kind, describing sources derived from the browser URL,
7284 * where the untrusted part of the URL is prefixed by trusted data, such as the scheme and hostname.
7385 */
74- predicate isUrl ( ) { this = "url" }
86+ predicate isUrl ( ) { this = "browser- url" }
7587
7688 /** Holds if this is the `query` or `fragment` kind. */
7789 predicate isQueryOrFragment ( ) { this .isQuery ( ) or this .isFragment ( ) }
@@ -83,13 +95,13 @@ class ClientSideRemoteFlowKind extends string {
8395 predicate isPathOrUrl ( ) { this .isPath ( ) or this .isUrl ( ) }
8496
8597 /** Holds if this is the `name` kind, describing sources derived from the window name, such as `window.name`. */
86- predicate isWindowName ( ) { this = "name" }
98+ predicate isWindowName ( ) { this = "browser-window- name" }
8799
88100 /**
89- * Holds if this is the `message-event` kind, describing sources derived from cross-window message passing,
101+ * Holds if this is the `browser- message-event` kind, describing sources derived from cross-window message passing,
90102 * such as `event` in `window.onmessage = event => {...}`.
91103 */
92- predicate isMessageEvent ( ) { this = "message-event" }
104+ predicate isMessageEvent ( ) { this = "browser- message-event" }
93105}
94106
95107/**
0 commit comments