From 95987724773aed10a41d99eff43b87425e571ee0 Mon Sep 17 00:00:00 2001 From: Geoffrey White <40627776+geoffw0@users.noreply.github.com> Date: Wed, 12 Nov 2025 14:37:45 +0000 Subject: [PATCH] Update rust/ql/examples/snippets/simple_constant_password.ql Co-authored-by: Tom Hvitved --- rust/ql/examples/snippets/simple_constant_password.ql | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/rust/ql/examples/snippets/simple_constant_password.ql b/rust/ql/examples/snippets/simple_constant_password.ql index 202029994f4..1f0e0a8e101 100644 --- a/rust/ql/examples/snippets/simple_constant_password.ql +++ b/rust/ql/examples/snippets/simple_constant_password.ql @@ -30,9 +30,10 @@ module ConstantPasswordConfig implements DataFlow::ConfigSig { predicate isSink(DataFlow::Node node) { // `node` is an argument whose corresponding parameter name matches the pattern "pass%" - exists(CallExpr call, Function target, int argIndex | + exists(CallExpr call, Function target, int argIndex, Variable v | call.getStaticTarget() = target and - target.getParam(argIndex).getPat().(IdentPat).getName().getText().matches("pass%") and + v.getParameter() = target.getParam(argIndex) and + v.getText().matches("pass%") and call.getArg(argIndex) = node.asExpr().getExpr() ) }