mirror of
https://github.com/github/codeql.git
synced 2026-04-27 17:55:19 +02:00
Exclude .pipe detection which are in a test file.
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
*/
|
||||
|
||||
import javascript
|
||||
import semmle.javascript.filters.ClassifyFiles
|
||||
|
||||
/**
|
||||
* A call to the `pipe` method on a Node.js stream.
|
||||
@@ -270,6 +271,7 @@ where
|
||||
hasErrorHandlerDownstream(pipeCall) and
|
||||
not isPipeFollowedByNonStreamAccess(pipeCall) and
|
||||
not hasNonStreamSourceLikeUsage(pipeCall) and
|
||||
not hasNonNodeJsStreamSource(pipeCall)
|
||||
not hasNonNodeJsStreamSource(pipeCall) and
|
||||
not isTestFile(pipeCall.getFile())
|
||||
select pipeCall,
|
||||
"Stream pipe without error handling on the source stream. Errors won't propagate downstream and may be silently dropped."
|
||||
|
||||
Reference in New Issue
Block a user