Skip to content

Commit 5aa9b08

Browse files
committed
Fix Mongodb additional taint step
1 parent cd31f63 commit 5aa9b08

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ module NoSql {
4040
// Taint an entry if the `Value` is tainted
4141
exists(Write w, DataFlow::Node base, Field f | w.writesField(base, f, pred) |
4242
base = succ.(DataFlow::PostUpdateNode).getPreUpdateNode() and
43-
base.getType().hasQualifiedName(package("go.mongodb.org/mongo-driver", "bson/primitive"), "E") and
43+
unalias(base.getType())
44+
.hasQualifiedName(package("go.mongodb.org/mongo-driver", "bson/primitive"), "E") and
4445
f.getName() = "Value"
4546
)
4647
}

0 commit comments

Comments
 (0)