add model of the pify library

This commit is contained in:
Erik Krogh Kristensen
2021-06-20 22:37:16 +02:00
parent f2ca2134d1
commit 2f3ea4412f
4 changed files with 111 additions and 4 deletions

View File

@@ -672,10 +672,8 @@ module Promisify {
class PromisifyAllCall extends DataFlow::CallNode {
PromisifyAllCall() {
this =
[
DataFlow::moduleMember("bluebird", "promisifyAll"),
DataFlow::moduleImport("util-promisifyall")
].getACall()
[DataFlow::moduleMember("bluebird", "promisifyAll"), DataFlow::moduleImport("pify")]
.getACall()
}
}
@@ -686,6 +684,8 @@ module Promisify {
class PromisifyCall extends DataFlow::CallNode {
PromisifyCall() {
this = DataFlow::moduleImport(["util", "bluebird"]).getAMemberCall("promisify")
or
this = DataFlow::moduleImport("pify").getACall()
}
}
}

View File

@@ -2271,6 +2271,40 @@ nodes
| other-fs-libraries.js:52:24:52:27 | path |
| other-fs-libraries.js:52:24:52:27 | path |
| other-fs-libraries.js:52:24:52:27 | path |
| other-fs-libraries.js:54:36:54:39 | path |
| other-fs-libraries.js:54:36:54:39 | path |
| other-fs-libraries.js:54:36:54:39 | path |
| other-fs-libraries.js:54:36:54:39 | path |
| other-fs-libraries.js:54:36:54:39 | path |
| other-fs-libraries.js:54:36:54:39 | path |
| other-fs-libraries.js:54:36:54:39 | path |
| other-fs-libraries.js:54:36:54:39 | path |
| other-fs-libraries.js:54:36:54:39 | path |
| other-fs-libraries.js:54:36:54:39 | path |
| other-fs-libraries.js:54:36:54:39 | path |
| other-fs-libraries.js:54:36:54:39 | path |
| other-fs-libraries.js:54:36:54:39 | path |
| other-fs-libraries.js:54:36:54:39 | path |
| other-fs-libraries.js:54:36:54:39 | path |
| other-fs-libraries.js:54:36:54:39 | path |
| other-fs-libraries.js:54:36:54:39 | path |
| other-fs-libraries.js:55:36:55:39 | path |
| other-fs-libraries.js:55:36:55:39 | path |
| other-fs-libraries.js:55:36:55:39 | path |
| other-fs-libraries.js:55:36:55:39 | path |
| other-fs-libraries.js:55:36:55:39 | path |
| other-fs-libraries.js:55:36:55:39 | path |
| other-fs-libraries.js:55:36:55:39 | path |
| other-fs-libraries.js:55:36:55:39 | path |
| other-fs-libraries.js:55:36:55:39 | path |
| other-fs-libraries.js:55:36:55:39 | path |
| other-fs-libraries.js:55:36:55:39 | path |
| other-fs-libraries.js:55:36:55:39 | path |
| other-fs-libraries.js:55:36:55:39 | path |
| other-fs-libraries.js:55:36:55:39 | path |
| other-fs-libraries.js:55:36:55:39 | path |
| other-fs-libraries.js:55:36:55:39 | path |
| other-fs-libraries.js:55:36:55:39 | path |
| prettier.js:6:11:6:28 | p |
| prettier.js:6:11:6:28 | p |
| prettier.js:6:11:6:28 | p |
@@ -6619,6 +6653,70 @@ edges
| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:52:24:52:27 | path |
| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:52:24:52:27 | path |
| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:52:24:52:27 | path |
| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:54:36:54:39 | path |
| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:54:36:54:39 | path |
| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:54:36:54:39 | path |
| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:54:36:54:39 | path |
| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:54:36:54:39 | path |
| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:54:36:54:39 | path |
| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:54:36:54:39 | path |
| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:54:36:54:39 | path |
| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:54:36:54:39 | path |
| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:54:36:54:39 | path |
| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:54:36:54:39 | path |
| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:54:36:54:39 | path |
| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:54:36:54:39 | path |
| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:54:36:54:39 | path |
| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:54:36:54:39 | path |
| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:54:36:54:39 | path |
| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:54:36:54:39 | path |
| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:54:36:54:39 | path |
| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:54:36:54:39 | path |
| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:54:36:54:39 | path |
| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:54:36:54:39 | path |
| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:54:36:54:39 | path |
| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:54:36:54:39 | path |
| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:54:36:54:39 | path |
| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:54:36:54:39 | path |
| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:54:36:54:39 | path |
| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:54:36:54:39 | path |
| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:54:36:54:39 | path |
| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:54:36:54:39 | path |
| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:54:36:54:39 | path |
| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:54:36:54:39 | path |
| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:54:36:54:39 | path |
| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:55:36:55:39 | path |
| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:55:36:55:39 | path |
| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:55:36:55:39 | path |
| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:55:36:55:39 | path |
| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:55:36:55:39 | path |
| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:55:36:55:39 | path |
| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:55:36:55:39 | path |
| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:55:36:55:39 | path |
| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:55:36:55:39 | path |
| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:55:36:55:39 | path |
| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:55:36:55:39 | path |
| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:55:36:55:39 | path |
| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:55:36:55:39 | path |
| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:55:36:55:39 | path |
| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:55:36:55:39 | path |
| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:55:36:55:39 | path |
| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:55:36:55:39 | path |
| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:55:36:55:39 | path |
| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:55:36:55:39 | path |
| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:55:36:55:39 | path |
| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:55:36:55:39 | path |
| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:55:36:55:39 | path |
| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:55:36:55:39 | path |
| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:55:36:55:39 | path |
| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:55:36:55:39 | path |
| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:55:36:55:39 | path |
| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:55:36:55:39 | path |
| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:55:36:55:39 | path |
| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:55:36:55:39 | path |
| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:55:36:55:39 | path |
| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:55:36:55:39 | path |
| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:55:36:55:39 | path |
| other-fs-libraries.js:49:14:49:37 | url.par ... , true) | other-fs-libraries.js:49:14:49:43 | url.par ... ).query |
| other-fs-libraries.js:49:14:49:37 | url.par ... , true) | other-fs-libraries.js:49:14:49:43 | url.par ... ).query |
| other-fs-libraries.js:49:14:49:37 | url.par ... , true) | other-fs-libraries.js:49:14:49:43 | url.par ... ).query |
@@ -8352,6 +8450,8 @@ edges
| other-fs-libraries.js:42:53:42:56 | path | other-fs-libraries.js:38:24:38:30 | req.url | other-fs-libraries.js:42:53:42:56 | path | This path depends on $@. | other-fs-libraries.js:38:24:38:30 | req.url | a user-provided value |
| other-fs-libraries.js:51:19:51:22 | path | other-fs-libraries.js:49:24:49:30 | req.url | other-fs-libraries.js:51:19:51:22 | path | This path depends on $@. | other-fs-libraries.js:49:24:49:30 | req.url | a user-provided value |
| other-fs-libraries.js:52:24:52:27 | path | other-fs-libraries.js:49:24:49:30 | req.url | other-fs-libraries.js:52:24:52:27 | path | This path depends on $@. | other-fs-libraries.js:49:24:49:30 | req.url | a user-provided value |
| other-fs-libraries.js:54:36:54:39 | path | other-fs-libraries.js:49:24:49:30 | req.url | other-fs-libraries.js:54:36:54:39 | path | This path depends on $@. | other-fs-libraries.js:49:24:49:30 | req.url | a user-provided value |
| other-fs-libraries.js:55:36:55:39 | path | other-fs-libraries.js:49:24:49:30 | req.url | other-fs-libraries.js:55:36:55:39 | path | This path depends on $@. | other-fs-libraries.js:49:24:49:30 | req.url | a user-provided value |
| prettier.js:7:28:7:28 | p | prettier.js:6:13:6:13 | p | prettier.js:7:28:7:28 | p | This path depends on $@. | prettier.js:6:13:6:13 | p | a user-provided value |
| prettier.js:11:44:11:44 | p | prettier.js:6:13:6:13 | p | prettier.js:11:44:11:44 | p | This path depends on $@. | prettier.js:6:13:6:13 | p | a user-provided value |
| pupeteer.js:9:28:9:34 | tainted | pupeteer.js:5:28:5:53 | parseTo ... t).name | pupeteer.js:9:28:9:34 | tainted | This path depends on $@. | pupeteer.js:5:28:5:53 | parseTo ... t).name | a user-provided value |

View File

@@ -50,4 +50,7 @@ http.createServer(function(req, res) {
fs.readFileSync(path); // NOT OK
asyncFS.readFileSync(path); // NOT OK
require("pify")(fs.readFileSync)(path); // NOT OK
require("pify")(fs).readFileSync(path); // NOT OK
});