mirror of
https://github.com/github/codeql.git
synced 2026-04-23 07:45:17 +02:00
Replaced fuzzy NonNodeStream MaD to a ql predicate to deal easier with submodules
This commit is contained in:
@@ -1,6 +0,0 @@
|
||||
extensions:
|
||||
- addsTo:
|
||||
pack: codeql/javascript-all
|
||||
extensible: typeModel
|
||||
data:
|
||||
- ["NonNodeStream", "arktype", "Fuzzy"]
|
||||
@@ -1,6 +0,0 @@
|
||||
extensions:
|
||||
- addsTo:
|
||||
pack: codeql/javascript-all
|
||||
extensible: typeModel
|
||||
data:
|
||||
- ["NonNodeStream", "execa", "Fuzzy"]
|
||||
@@ -1,6 +0,0 @@
|
||||
extensions:
|
||||
- addsTo:
|
||||
pack: codeql/javascript-all
|
||||
extensible: typeModel
|
||||
data:
|
||||
- ["NonNodeStream", "highland", "Fuzzy"]
|
||||
@@ -1,8 +0,0 @@
|
||||
extensions:
|
||||
- addsTo:
|
||||
pack: codeql/javascript-all
|
||||
extensible: typeModel
|
||||
data:
|
||||
- ["NonNodeStream", "rxjs", "Fuzzy"]
|
||||
- ["NonNodeStream", "rxjs/operators", "Fuzzy"]
|
||||
- ["NonNodeStream", "rxjs/testing", "Fuzzy"]
|
||||
@@ -1,6 +0,0 @@
|
||||
extensions:
|
||||
- addsTo:
|
||||
pack: codeql/javascript-all
|
||||
extensible: typeModel
|
||||
data:
|
||||
- ["NonNodeStream", "@strapi/utils", "Fuzzy"]
|
||||
@@ -35,7 +35,26 @@ class PipeCall extends DataFlow::MethodCallNode {
|
||||
* This is used to exclude pipe calls on non-stream objects from analysis.
|
||||
*/
|
||||
DataFlow::Node getNonNodeJsStreamType() {
|
||||
result = ModelOutput::getATypeNode("NonNodeStream").asSource()
|
||||
result = getNonStreamApi().getAValueReachableFromSource()
|
||||
}
|
||||
|
||||
//highland, arktype execa
|
||||
API::Node getNonStreamApi() {
|
||||
exists(string moduleName |
|
||||
moduleName
|
||||
.regexpMatch([
|
||||
"rxjs(|/.*)", "@strapi(|/.*)", "highland(|/.*)", "execa(|/.*)", "arktype(|/.*)"
|
||||
]) and
|
||||
result = API::moduleImport(moduleName)
|
||||
)
|
||||
or
|
||||
result = getNonStreamApi().getAMember()
|
||||
or
|
||||
result = getNonStreamApi().getAParameter().getAParameter()
|
||||
or
|
||||
result = getNonStreamApi().getReturn()
|
||||
or
|
||||
result = getNonStreamApi().getPromised()
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -16,5 +16,5 @@ function f(){
|
||||
z(source.pipe(null)).toBe(expected,y,);
|
||||
});
|
||||
|
||||
z.option$.pipe(pluck("x")) // $SPURIOUS:Alert
|
||||
z.option$.pipe(pluck("x"))
|
||||
}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
| rxjsStreams.js:19:3:19:28 | z.optio ... k("x")) | Stream pipe without error handling on the source stream. Errors won't propagate downstream and may be silently dropped. |
|
||||
| test.js:4:5:4:28 | stream. ... nation) | Stream pipe without error handling on the source stream. Errors won't propagate downstream and may be silently dropped. |
|
||||
| test.js:19:5:19:17 | s2.pipe(dest) | Stream pipe without error handling on the source stream. Errors won't propagate downstream and may be silently dropped. |
|
||||
| test.js:45:5:45:30 | stream2 ... ation2) | 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