Skip to content

Commit 4a06b81

Browse files
committed
JS: Use API graphs in CryptoJS
1 parent dec1e4d commit 4a06b81

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

javascript/ql/lib/semmle/javascript/frameworks/CryptoLibraries.qll

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -291,13 +291,13 @@ private module CryptoJS {
291291
* ```
292292
*/
293293

294-
exists(DataFlow::SourceNode mod, DataFlow::PropRead propRead |
295-
mod = DataFlow::moduleImport("crypto-js") and
296-
propRead = mod.getAPropertyRead("algo").getAPropertyRead() and
297-
this = propRead.getAMemberCall("create") and
298-
algorithmName = propRead.getPropertyName() and
299-
not isStrongPasswordHashingAlgorithm(algorithmName)
300-
)
294+
this =
295+
API::moduleImport("crypto-js")
296+
.getMember("algo")
297+
.getMember(algorithmName)
298+
.getMember("create")
299+
.getACall() and
300+
not isStrongPasswordHashingAlgorithm(algorithmName)
301301
}
302302

303303
CryptographicAlgorithm getAlgorithm() { result.matchesName(algorithmName) }

0 commit comments

Comments
 (0)