Skip to content

Commit 3028e5d

Browse files
committed
Rust: CallExpr -> Call.
1 parent c64f19f commit 3028e5d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

rust/ql/lib/codeql/rust/security/HardcodedCryptographicValueExtensions.qll

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,9 @@ module HardcodedCryptographicValue {
107107

108108
HeuristicSinks() {
109109
// any argument going to a parameter whose name matches a credential name
110-
exists(CallExprBase fc, Function f, int argIndex, string argName |
111-
fc.getArg(argIndex) = this.asExpr() and
112-
fc.getStaticTarget() = f and
110+
exists(Call c, Function f, int argIndex, string argName |
111+
c.getPositionalArgument(argIndex) = this.asExpr() and
112+
c.getStaticTarget() = f and
113113
f.getParam(argIndex).getPat().(IdentPat).getName().getText() = argName and
114114
(
115115
argName = "password" and kind = "password"
@@ -123,7 +123,7 @@ module HardcodedCryptographicValue {
123123
// note: matching "key" results in too many false positives
124124
) and
125125
// don't duplicate modeled sinks
126-
not exists(ModelsAsDataSinks s | s.(Node::FlowSummaryNode).getSinkElement().getCall() = fc)
126+
not exists(ModelsAsDataSinks s | s.(Node::FlowSummaryNode).getSinkElement().getCall() = c)
127127
)
128128
}
129129

0 commit comments

Comments
 (0)