From b5ec9c25c029ec8ed9481d1379a09119f49b0dee Mon Sep 17 00:00:00 2001 From: Geoffrey White <40627776+geoffw0@users.noreply.github.com> Date: Tue, 30 Jun 2026 16:16:45 +0100 Subject: [PATCH] Update rust/ql/lib/codeql/rust/security/HardcodedCryptographicValueExtensions.qll Co-authored-by: Tom Hvitved --- .../rust/security/HardcodedCryptographicValueExtensions.qll | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rust/ql/lib/codeql/rust/security/HardcodedCryptographicValueExtensions.qll b/rust/ql/lib/codeql/rust/security/HardcodedCryptographicValueExtensions.qll index 4f148e5af33..a5e316dbfba 100644 --- a/rust/ql/lib/codeql/rust/security/HardcodedCryptographicValueExtensions.qll +++ b/rust/ql/lib/codeql/rust/security/HardcodedCryptographicValueExtensions.qll @@ -67,9 +67,9 @@ module HardcodedCryptographicValue { private predicate isConstant(Expr e) { e instanceof LiteralExpr // e.g. `0` or - e.(ArrayListExpr).getExpr(_) instanceof LiteralExpr // e.g. `[0, 0, 0, 0]` + forex(Expr elem | elem = e.(ArrayListExpr).getExpr(_) | isConstant(elem)) // e.g. `[0, 0, 0, 0]` or - e.(ArrayRepeatExpr).getRepeatOperand() instanceof LiteralExpr // e.g. `[0; 10]` + isConstant(e.(ArrayRepeatExpr).getRepeatOperand()) // e.g. `[0; 10]` or // e.g. `const MY_CONST: u64 = ...` e = any(Const c).getBody()