ajinabraham/njsscan

Faulty node_nosqli_injection ??

designamx opened this issue · 3 comments

hi,

I have been having findings about nosqli injections, I tried following the rule without luck, this is the version I am using njsscan-0.2.9

This is the finding

image

This is the code:

image

As you can see, I'm using mongo-sanitize and then const emailClean = sanitize(req.body.email)
I'm following this rule
https://github.com/ajinabraham/njsscan/blob/master/njsscan/rules/semantic_grep/database/nosql_find_injection.yaml

Can you please share copyable code instead of screenshot?
I think it's because of signature using Promise.
A normal example like this works as expected https://semgrep.dev/s/7n32

sure, I just replaced your code with mine
https://semgrep.dev/s/AyQ2

We are also seeing the similar issue on our project!! Is there any update on the issue?