Skip to content

Commit 208bcd4

Browse files
committed
JS: Make type-tracking predicates private
1 parent 7bfad8c commit 208bcd4

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

javascript/ql/src/semmle/javascript/frameworks/Firebase.qll

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ module Firebase {
5959
}
6060

6161
/** Gets a node that refers to a `Reference` object, such as `firebase.database().ref()`. */
62-
DataFlow::SourceNode ref(DataFlow::TypeTracker t) {
62+
private DataFlow::SourceNode ref(DataFlow::TypeTracker t) {
6363
t.start() and
6464
(
6565
exists (string name | result = database().getAMethodCall(name) |
@@ -91,7 +91,7 @@ module Firebase {
9191
}
9292

9393
/** Gets a node that refers to a `Query` or `Reference` object. */
94-
DataFlow::SourceNode query(DataFlow::TypeTracker t) {
94+
private DataFlow::SourceNode query(DataFlow::TypeTracker t) {
9595
t.start() and
9696
(
9797
result = ref(t) // a Reference can be used as a Query
@@ -134,7 +134,7 @@ module Firebase {
134134
/**
135135
* Gets a node that is passed as the callback to a `Reference.transaction` call.
136136
*/
137-
DataFlow::SourceNode transactionCallback(DataFlow::TypeBackTracker t) {
137+
private DataFlow::SourceNode transactionCallback(DataFlow::TypeBackTracker t) {
138138
t.start() and
139139
result = ref().getAMethodCall("transaction").getArgument(0).getALocalSource()
140140
or
@@ -157,7 +157,7 @@ module Firebase {
157157
*/
158158
module CloudFunctions {
159159
/** Gets a reference to the Cloud Functions namespace. */
160-
DataFlow::SourceNode namespace(DataFlow::TypeTracker t) {
160+
private DataFlow::SourceNode namespace(DataFlow::TypeTracker t) {
161161
t.start() and
162162
result = DataFlow::moduleImport("firebase-functions")
163163
or
@@ -172,7 +172,7 @@ module Firebase {
172172
}
173173

174174
/** Gets a reference to a Cloud Functions database object. */
175-
DataFlow::SourceNode database(DataFlow::TypeTracker t) {
175+
private DataFlow::SourceNode database(DataFlow::TypeTracker t) {
176176
t.start() and
177177
result = namespace().getAPropertyRead("database")
178178
or
@@ -187,7 +187,7 @@ module Firebase {
187187
}
188188

189189
/** Gets a data flow node holding a `RefBuilder` object. */
190-
DataFlow::SourceNode refBuilder(DataFlow::TypeTracker t) {
190+
private DataFlow::SourceNode refBuilder(DataFlow::TypeTracker t) {
191191
t.start() and
192192
result = database().getAMethodCall("ref")
193193
or
@@ -220,7 +220,7 @@ module Firebase {
220220
/**
221221
* Gets a value that will be invoked with a `DataSnapshot` value as its first parameter.
222222
*/
223-
DataFlow::SourceNode snapshotCallback(DataFlow::TypeBackTracker t) {
223+
private DataFlow::SourceNode snapshotCallback(DataFlow::TypeBackTracker t) {
224224
t.start() and
225225
(
226226
result = any(Database::QueryListenCall call).getCallbackNode().getALocalSource()
@@ -244,7 +244,7 @@ module Firebase {
244244
* Gets a node that refers to a `DataSnapshot` value or a promise or `Change`
245245
* object containing `DataSnapshot`s.
246246
*/
247-
DataFlow::SourceNode snapshot(DataFlow::TypeTracker t) {
247+
private DataFlow::SourceNode snapshot(DataFlow::TypeTracker t) {
248248
t.start() and
249249
(
250250
result = snapshotCallback().(DataFlow::FunctionNode).getParameter(0)

0 commit comments

Comments
 (0)