mirror of
https://github.com/github/codeql.git
synced 2026-04-29 10:45:15 +02:00
Merge pull request #19854 from Napalys/js/sinon
JS: Explicitly Mark `Sinon` Package as Non RegExp
This commit is contained in:
4
javascript/ql/lib/change-notes/2025-06-20-sinon.md
Normal file
4
javascript/ql/lib/change-notes/2025-06-20-sinon.md
Normal file
@@ -0,0 +1,4 @@
|
||||
---
|
||||
category: minorAnalysis
|
||||
---
|
||||
* Calls to `sinon.match()` are no longer incorrectly identified as regular expression operations.
|
||||
@@ -998,6 +998,8 @@ private predicate isUsedAsNonMatchObject(DataFlow::MethodCallNode call) {
|
||||
or
|
||||
// Result is obviously unused
|
||||
call.asExpr() = any(ExprStmt stmt).getExpr()
|
||||
or
|
||||
call = API::moduleImport("sinon").getMember("match").getACall()
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user