Skip to content
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
PrevPrevious commit
Rust: Skip model generation for functions with a ; in their canonical…
… path
  • Loading branch information
@paldepind
paldepind committed Dec 15, 2025
commit dacb2221435d4bc6c08b3e94fae4a21ced850173
4 changes: 4 additions & 0 deletions rust/ql/src/utils/modelgenerator/internal/CaptureModels.qll
Original file line numberDiff line numberDiff line change
Expand Up@@ -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
Expand Down