Skip to content

Commit 86e9f15

Browse files
committed
Accept MaD sinks with kind nosql-injection
1 parent ced000a commit 86e9f15

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

go/ql/lib/semmle/go/frameworks/NoSQL.qll

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,14 @@ module NoSql {
2424
*/
2525
abstract class Range extends DataFlow::Node { }
2626

27+
private class DefaultQueryString extends Range {
28+
DefaultQueryString() {
29+
exists(DataFlow::ArgumentNode arg | sinkNode(arg, "nosql-injection") |
30+
this = arg.getACorrespondingSyntacticArgument()
31+
)
32+
}
33+
}
34+
2735
/**
2836
* Holds if method `name` of struct `Collection` from package
2937
* [go.mongodb.org/mongo-driver/mongo](https://pkg.go.dev/go.mongodb.org/mongo-driver/mongo)

0 commit comments

Comments
 (0)