Files
codeql/ql/test/library-tests/semmle/go/frameworks/NoSQL/QueryString.ql
Porcupiney Hairs d0061bfd4b Golang : Add MongoDB injection support
This PR adds support for MongoDB injection to the existing SQL injection query.
This models the official Golang MongoDB driver.

A  brief summary of changes made in this query are :

1. A `NoSQL.qll` files has been created to model a `NoSQLQueryString`.

2. An entry is added in `go.qll` by default as I find these changes may be generally useful.

3. Library tests along with there expected outputs are added.

4. Query tests are added. However, I am unable to add the expected output as qltest
can't find depstubber. However, these can be easily added. I have created a separate
codeql-go database with the same files and ran the query against the same. I can see
there should be 14 correct results added from this PR.
2020-05-11 19:55:48 +05:30

6 lines
87 B
Plaintext

import go
import semmle.go.frameworks.NoSQL
from NoSQL::NoSQLQueryString qs
select qs