add [INCONSISTENCY] comment in CodeInjection test

This commit is contained in:
Erik Krogh Kristensen
2020-07-08 09:48:12 +02:00
parent 442ee8d1cc
commit 664c5e64b4

View File

@@ -14,7 +14,7 @@ app.post("/documents/find", (req, res) => {
MongoClient.connect("mongodb://localhost:27017/test", (err, db) => {
let doc = db.collection("doc");
doc.find(query); // NOT OK, but that is flagged by js/sql-injection
doc.find(query); // NOT OK, but that is flagged by js/sql-injection [INCONSISTENCY]
doc.find({ $where: req.body.query }); // NOT OK
doc.find({ $where: "name = " + req.body.name }); // NOT OK
});