Skip to content

Commit f554f85

Browse files
committed
JS: handle 'firebase-admin' package
1 parent e0c06cb commit f554f85

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

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

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,14 @@ module Firebase {
44

55
/** Gets a reference to the firebase API object. */
66
private DataFlow::SourceNode firebase(DataFlow::TypeTracker t) {
7-
result = DataFlow::moduleImport("firebase/app") and t.start()
8-
or
9-
result = DataFlow::globalVarRef("firebase") and t.start()
7+
t.start() and
8+
(
9+
result = DataFlow::moduleImport("firebase/app")
10+
or
11+
result = DataFlow::moduleImport("firebase-admin")
12+
or
13+
result = DataFlow::globalVarRef("firebase")
14+
)
1015
or
1116
exists (DataFlow::TypeTracker t2 |
1217
result = firebase(t2).track(t2, t)

0 commit comments

Comments
 (0)