Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a673610

Browse files
committed
Adapt query not to depend on TaintTracking::FunctionModel
1 parent c8407ba commit a673610

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

go/ql/src/Security/CWE-352/ConstantOauth2State.ql

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,10 @@ class PrivateUrlFlowsToAuthCodeUrlCall extends DataFlow::Configuration {
106106
TaintTracking::referenceStep(pred, succ)
107107
or
108108
// Propagate across Sprintf and similar calls
109-
any(Fmt::AppenderOrSprinter s).taintStep(pred, succ)
109+
exists(DataFlow::CallNode cn |
110+
cn.getACalleeIncludingExternals().asFunction() instanceof Fmt::AppenderOrSprinter |
111+
pred = cn.getAnArgument() and succ = cn.getResult()
112+
)
110113
}
111114

112115
predicate isSinkCall(DataFlow::Node sink, DataFlow::CallNode call) {

0 commit comments

Comments
 (0)