From 29335fd8153c47a6984084429cc8e18d9ed4d0ea Mon Sep 17 00:00:00 2001 From: Tom Hvitved Date: Mon, 10 Aug 2026 19:31:47 +0200 Subject: [PATCH] Rust: Add flow models for `ToOwned` trait --- rust/ql/lib/codeql/rust/frameworks/stdlib/alloc.model.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/rust/ql/lib/codeql/rust/frameworks/stdlib/alloc.model.yml b/rust/ql/lib/codeql/rust/frameworks/stdlib/alloc.model.yml index 78d1cbdec29e..427f0e6aed0b 100644 --- a/rust/ql/lib/codeql/rust/frameworks/stdlib/alloc.model.yml +++ b/rust/ql/lib/codeql/rust/frameworks/stdlib/alloc.model.yml @@ -56,6 +56,9 @@ extensions: # Vec - ["alloc::vec::from_elem", "Argument[0]", "ReturnValue.Element", "value", "manual"] - ["::deref", "Argument[self].Reference.Element", "ReturnValue.Reference.Element", "value", "manual"] + # ToOwned + - ["<_ as alloc::borrow::ToOwned>::to_owned", "Argument[self].Reference", "ReturnValue", "taint", "manual"] + - ["<_ as alloc::borrow::ToOwned>::clone_into", "Argument[self].Reference", "Argument[0].Reference", "taint", "manual"] - addsTo: pack: codeql/rust-all extensible: neutralModel