mirror of
https://github.com/github/codeql.git
synced 2026-05-14 11:19:27 +02:00
Recognize legacy @now/node type aliases
Extends the Vercel serverless handler detection to also match the deprecated Zeit-era @now/node package with NowRequest/NowResponse types. Per-review feedback from asgerf, these aliases still appear in real-world code. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -32,8 +32,8 @@ module VercelNode {
|
||||
this = any(Module m).getAnExportedValue("default").getAFunctionValue() and
|
||||
req = this.getParameter(0) and
|
||||
res = this.getParameter(1) and
|
||||
req.hasUnderlyingType("@vercel/node", "VercelRequest") and
|
||||
res.hasUnderlyingType("@vercel/node", "VercelResponse")
|
||||
req.hasUnderlyingType(["@vercel/node", "@now/node"], ["NowRequest", "VercelRequest"]) and
|
||||
res.hasUnderlyingType(["@vercel/node", "@now/node"], ["NowResponse", "VercelResponse"])
|
||||
}
|
||||
|
||||
/** Gets the parameter that contains the request object. */
|
||||
|
||||
Reference in New Issue
Block a user