Skip to content
This repository was archived by the owner on Jan 5, 2023. It is now read-only.

Commit cc24a88

Browse files
author
Max Schaefer
committed
Rewrite a taint step to make more idiomatic use of the data-flow library.
1 parent 8cc76ed commit cc24a88

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ module NoSQL {
112112
predicate isAdditionalMongoTaintStep(DataFlow::Node pred, DataFlow::Node succ) {
113113
// Taint an entry if the `Value` is tainted
114114
exists(Write w, DataFlow::Node base, Field f | w.writesField(base, f, pred) |
115-
base = succ.getASuccessor*() and
115+
base = succ.(DataFlow::PostUpdateNode).getPreUpdateNode() and
116116
base.getType().hasQualifiedName("go.mongodb.org/mongo-driver/bson/primitive", "E") and
117117
f.getName() = "Value"
118118
)

0 commit comments

Comments
 (0)