mirror of
https://github.com/github/codeql.git
synced 2026-04-29 18:55:14 +02:00
Update javascript/ql/src/Security/CWE-730/ServerCrash.ql
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com>
This commit is contained in:
committed by
GitHub
parent
d591c519a8
commit
12b985be87
@@ -40,6 +40,7 @@ Function invokedByRouteHandler(HTTP::RouteHandler rh) {
|
||||
// follow the immediate call graph
|
||||
exists(DataFlow::InvokeNode invk |
|
||||
result = invk.getACallee() and
|
||||
// purposely not checking for `getEnclosingTryCatchStmt`. An async callback called from inside a try-catch can still crash the server.
|
||||
invk.getEnclosingFunction() = invokedByRouteHandler(rh)
|
||||
)
|
||||
// if new edges are added here, the `edges` predicate should be updated accordingly
|
||||
|
||||
Reference in New Issue
Block a user