From 9cdf63e17547398d84a76cd6a8357bb70206848e Mon Sep 17 00:00:00 2001 From: Simon Friis Vindum Date: Fri, 12 Dec 2025 10:42:49 +0100 Subject: [PATCH] Rust: Skip model generation for functions with a ; in their canonical path --- rust/ql/src/utils/modelgenerator/internal/CaptureModels.qll | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/rust/ql/src/utils/modelgenerator/internal/CaptureModels.qll b/rust/ql/src/utils/modelgenerator/internal/CaptureModels.qll index 9826f56795f..02cd1d70d46 100644 --- a/rust/ql/src/utils/modelgenerator/internal/CaptureModels.qll +++ b/rust/ql/src/utils/modelgenerator/internal/CaptureModels.qll @@ -13,6 +13,10 @@ private import codeql.rust.dataflow.internal.FlowSummaryImpl as FlowSummary private newtype TCallable = TFunction(R::Function api, string path) { path = api.getCanonicalPath() and + // A canonical path can contain `;` as the syntax for array types use `;`. + // This does not work with the shared model generator, so for now we just + // exclude canonical paths with `;`s. + not exists(api.getCanonicalPath().indexOf(";")) and ( // This excludes closures (these are not exported API endpoints) and // functions without a `pub` visibility. A function can be `pub` without