We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
.pipe
1 parent 5bb29b6 commit f8f5d8fCopy full SHA for f8f5d8f
javascript/ql/src/Quality/UnhandledStreamPipe.ql
@@ -12,6 +12,7 @@
12
*/
13
14
import javascript
15
+import semmle.javascript.filters.ClassifyFiles
16
17
/**
18
* A call to the `pipe` method on a Node.js stream.
@@ -270,6 +271,7 @@ where
270
271
hasErrorHandlerDownstream(pipeCall) and
272
not isPipeFollowedByNonStreamAccess(pipeCall) and
273
not hasNonStreamSourceLikeUsage(pipeCall) and
- not hasNonNodeJsStreamSource(pipeCall)
274
+ not hasNonNodeJsStreamSource(pipeCall) and
275
+ not isTestFile(pipeCall.getFile())
276
select pipeCall,
277
"Stream pipe without error handling on the source stream. Errors won't propagate downstream and may be silently dropped."
0 commit comments