From 38f00775bd87f6c1f27608dc23e072671c07cda5 Mon Sep 17 00:00:00 2001
From: Adnan Khan
Date: Fri, 25 Apr 2025 14:49:01 -0400
Subject: [PATCH 001/199] Exclude artifacts downloaded to runner temp.
---
.../ql/lib/codeql/actions/security/ArtifactPoisoningQuery.qll | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/actions/ql/lib/codeql/actions/security/ArtifactPoisoningQuery.qll b/actions/ql/lib/codeql/actions/security/ArtifactPoisoningQuery.qll
index d8d5f83c867..24e0f400e92 100644
--- a/actions/ql/lib/codeql/actions/security/ArtifactPoisoningQuery.qll
+++ b/actions/ql/lib/codeql/actions/security/ArtifactPoisoningQuery.qll
@@ -262,8 +262,9 @@ class ArtifactPoisoningSink extends DataFlow::Node {
ArtifactPoisoningSink() {
download.getAFollowingStep() = poisonable and
- // excluding artifacts downloaded to /tmp
+ // excluding artifacts downloaded to /tmp and runner.tmp
not download.getPath().regexpMatch("^/tmp.*") and
+ not download.getPath().regexpMatch("^\${{\s?runner.temp\s?}}.*") and
(
poisonable.(Run).getScript() = this.asExpr() and
(
From a9c4d6f383c68df3491fb6537519139aacee7681 Mon Sep 17 00:00:00 2001
From: Adnan Khan
Date: Fri, 25 Apr 2025 15:00:14 -0400
Subject: [PATCH 002/199] Fix escaping.
---
.../ql/lib/codeql/actions/security/ArtifactPoisoningQuery.qll | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/actions/ql/lib/codeql/actions/security/ArtifactPoisoningQuery.qll b/actions/ql/lib/codeql/actions/security/ArtifactPoisoningQuery.qll
index 24e0f400e92..8c6471b3c58 100644
--- a/actions/ql/lib/codeql/actions/security/ArtifactPoisoningQuery.qll
+++ b/actions/ql/lib/codeql/actions/security/ArtifactPoisoningQuery.qll
@@ -264,7 +264,7 @@ class ArtifactPoisoningSink extends DataFlow::Node {
download.getAFollowingStep() = poisonable and
// excluding artifacts downloaded to /tmp and runner.tmp
not download.getPath().regexpMatch("^/tmp.*") and
- not download.getPath().regexpMatch("^\${{\s?runner.temp\s?}}.*") and
+ not download.getPath().regexpMatch("^\\${{\\s?runner.temp\\s?}}.*") and
(
poisonable.(Run).getScript() = this.asExpr() and
(
From f96a250ffc511b3d710ef2cb26b896c27aa520f3 Mon Sep 17 00:00:00 2001
From: Lindsay Simpkins
Date: Mon, 9 Jun 2025 18:36:44 -0400
Subject: [PATCH 003/199] fix qhelp files
---
.../src/Metrics/Classes/CNumberOfFunctions.qhelp | 11 +++--------
cpp/ql/src/Metrics/Classes/CSizeOfAPI.qhelp | 12 ++++--------
.../src/Metrics/RefTypes/TInheritanceDepth.qhelp | 14 ++++----------
.../src/Metrics/RefTypes/TNumberOfCallables.qhelp | 12 ++++--------
java/ql/src/Metrics/RefTypes/TNumberOfFields.qhelp | 2 --
java/ql/src/Metrics/RefTypes/TSizeOfAPI.qhelp | 12 ++++--------
6 files changed, 19 insertions(+), 44 deletions(-)
diff --git a/cpp/ql/src/Metrics/Classes/CNumberOfFunctions.qhelp b/cpp/ql/src/Metrics/Classes/CNumberOfFunctions.qhelp
index cc62cb50f49..8ef045c7092 100644
--- a/cpp/ql/src/Metrics/Classes/CNumberOfFunctions.qhelp
+++ b/cpp/ql/src/Metrics/Classes/CNumberOfFunctions.qhelp
@@ -49,21 +49,16 @@ need to be part of the class. (A classic example of this is the
observes, there are at least two key problems with this approach:
-
--
-It may be possible to generalize some of the utility functions beyond the
+1. It may be possible to generalize some of the utility functions beyond the
narrow context of the class in question -- by bundling them with the class,
the class author reduces the scope for functionality reuse.
-
--
-It's usually impossible for the class author to know every possible
+2. It's usually impossible for the class author to know every possible
operation that the user might want to perform on the class, so the public
interface will inherently be incomplete. New utility functions will end up
having a different syntax to the privileged public functions in the class,
negatively impacting on code consistency.
-
-
+
To refactor a class like this, simply move its utility functions elsewhere,
paring its public interface down to the bare minimum.
diff --git a/cpp/ql/src/Metrics/Classes/CSizeOfAPI.qhelp b/cpp/ql/src/Metrics/Classes/CSizeOfAPI.qhelp
index 0d560f920aa..70c4c862fb6 100644
--- a/cpp/ql/src/Metrics/Classes/CSizeOfAPI.qhelp
+++ b/cpp/ql/src/Metrics/Classes/CSizeOfAPI.qhelp
@@ -46,21 +46,17 @@ need to be part of the class. (A classic example of this is the
std::string class in the C++ Standard Library.) As [Sutter]
observes, there are at least two key problems with this approach:
-
--
-It may be possible to generalize some of the utility functions beyond the
+
+1. It may be possible to generalize some of the utility functions beyond the
narrow context of the class in question -- by bundling them with the class,
the class author reduces the scope for functionality reuse.
-
--
-It's usually impossible for the class author to know every possible
+2. It's usually impossible for the class author to know every possible
operation that the user might want to perform on the class, so the public
interface will inherently be incomplete. New utility functions will end up
having a different syntax to the privileged public functions in the class,
negatively impacting on code consistency.
-
-
+
To refactor a class like this, simply move its utility functions elsewhere,
paring its public interface down to the bare minimum.
diff --git a/java/ql/src/Metrics/RefTypes/TInheritanceDepth.qhelp b/java/ql/src/Metrics/RefTypes/TInheritanceDepth.qhelp
index 7d78490985b..970b1c4e19e 100644
--- a/java/ql/src/Metrics/RefTypes/TInheritanceDepth.qhelp
+++ b/java/ql/src/Metrics/RefTypes/TInheritanceDepth.qhelp
@@ -29,14 +29,13 @@ that something is amiss, but further investigation will be needed to clarify
the cause of the problem. Here are two possibilities:
-
-
--
-A class and its superclass represent fundamentally the same abstraction.
+
+1. A class and its superclass represent fundamentally the same abstraction.
In this case, they should generally be merged together (see the 'Collapse
Hierarchy' refactoring on pp.279-80 of [Fowler]). For example, suppose
that in the following class hierarchy both A and C represent fundamentally
the same thing, then they should be merged together as shown:
+
@@ -48,11 +47,9 @@ the same thing, then they should be merged together as shown:
| After |
-
--
-The class hierarchy is trying to represent variation in more than one
+2. The class hierarchy is trying to represent variation in more than one
dimension using single inheritance. This can lead to an unnecessarily
deep class hierarchy with lots of code duplication. For example, consider
the following:
@@ -81,9 +78,6 @@ amount of code duplication that will be necessary.
For readers who are interested in this sort of approach, a good reference is
[West].
-
-
-
diff --git a/java/ql/src/Metrics/RefTypes/TNumberOfCallables.qhelp b/java/ql/src/Metrics/RefTypes/TNumberOfCallables.qhelp
index 49827592849..4f9452789a8 100644
--- a/java/ql/src/Metrics/RefTypes/TNumberOfCallables.qhelp
+++ b/java/ql/src/Metrics/RefTypes/TNumberOfCallables.qhelp
@@ -49,21 +49,17 @@ need to be part of the class. (A classic example of this is the
std::string class in the C++ Standard Library.) As [Sutter]
observes, there are at least two key problems with this approach:
-
--
-It may be possible to generalize some of the utility methods beyond the
+
+1. It may be possible to generalize some of the utility methods beyond the
narrow context of the class in question -- by bundling them with the class,
the class author reduces the scope for functionality reuse.
-
--
-It's usually impossible for the class author to know every possible
+2. It's usually impossible for the class author to know every possible
operation that the user might want to perform on the class, so the public
interface will inherently be incomplete. New utility methods will end up
having a different syntax to the privileged public methods in the class,
negatively impacting on code consistency.
-
-
+
To refactor a class like this, simply move its utility methods elsewhere,
paring its public interface down to the bare minimum.
diff --git a/java/ql/src/Metrics/RefTypes/TNumberOfFields.qhelp b/java/ql/src/Metrics/RefTypes/TNumberOfFields.qhelp
index befc6409449..2934ba958b5 100644
--- a/java/ql/src/Metrics/RefTypes/TNumberOfFields.qhelp
+++ b/java/ql/src/Metrics/RefTypes/TNumberOfFields.qhelp
@@ -25,11 +25,9 @@ If the class is too big, you should split it into multiple smaller classes.
-
If several of the fields are part of the same abstraction, you should
group them into a separate class, using the 'Extract Class' refactoring described
in [Fowler].
-
diff --git a/java/ql/src/Metrics/RefTypes/TSizeOfAPI.qhelp b/java/ql/src/Metrics/RefTypes/TSizeOfAPI.qhelp
index 3095d82049a..eda183a287c 100644
--- a/java/ql/src/Metrics/RefTypes/TSizeOfAPI.qhelp
+++ b/java/ql/src/Metrics/RefTypes/TSizeOfAPI.qhelp
@@ -46,21 +46,17 @@ need to be part of the class. (A classic example of this is the
std::string class in the C++ Standard Library.) As [Sutter]
observes, there are at least two key problems with this approach:
-
--
-It may be possible to generalize some of the utility methods beyond the
+
+1. It may be possible to generalize some of the utility methods beyond the
narrow context of the class in question -- by bundling them with the class,
the class author reduces the scope for functionality reuse.
-
--
-It's usually impossible for the class author to know every possible
+2. It's usually impossible for the class author to know every possible
operation that the user might want to perform on the class, so the public
interface will inherently be incomplete. New utility methods will end up
having a different syntax to the privileged public methods in the class,
negatively impacting on code consistency.
-
-
+
To refactor a class like this, simply move its utility methods elsewhere,
paring its public interface down to the bare minimum.
From cb6640474ed280239eb7496828b8c9575d479685 Mon Sep 17 00:00:00 2001
From: Geoffrey White <40627776+geoffw0@users.noreply.github.com>
Date: Thu, 19 Jun 2025 19:39:38 +0100
Subject: [PATCH 004/199] Rust: Translate more legacy models -> new models
(from data + manual extrapolation).
---
.../codeql/rust/frameworks/postgres.model.yml | 22 ++---
.../rustcrypto/rustcrypto.model.yml | 12 +--
.../rust/frameworks/stdlib/io.model.yml | 64 +++++++-------
.../rust/frameworks/tokio-postgres.model.yml | 33 ++++---
.../codeql/rust/frameworks/tokio/io.model.yml | 88 +++++++++----------
5 files changed, 109 insertions(+), 110 deletions(-)
diff --git a/rust/ql/lib/codeql/rust/frameworks/postgres.model.yml b/rust/ql/lib/codeql/rust/frameworks/postgres.model.yml
index 4aba20e3450..81877ed17bd 100644
--- a/rust/ql/lib/codeql/rust/frameworks/postgres.model.yml
+++ b/rust/ql/lib/codeql/rust/frameworks/postgres.model.yml
@@ -1,15 +1,15 @@
extensions:
- addsTo:
pack: codeql/rust-all
- extensible: sinkModelDeprecated
+ extensible: sinkModel
data:
- - ["repo:https://github.com/sfackler/rust-postgres:postgres", "::execute", "Argument[0]", "sql-injection", "manual"]
- - ["repo:https://github.com/sfackler/rust-postgres:postgres", "::batch_execute", "Argument[0]", "sql-injection", "manual"]
- - ["repo:https://github.com/sfackler/rust-postgres:postgres", "::prepare", "Argument[0]", "sql-injection", "manual"]
- - ["repo:https://github.com/sfackler/rust-postgres:postgres", "::prepare_typed", "Argument[0]", "sql-injection", "manual"]
- - ["repo:https://github.com/sfackler/rust-postgres:postgres", "::query", "Argument[0]", "sql-injection", "manual"]
- - ["repo:https://github.com/sfackler/rust-postgres:postgres", "::query_one", "Argument[0]", "sql-injection", "manual"]
- - ["repo:https://github.com/sfackler/rust-postgres:postgres", "::query_opt", "Argument[0]", "sql-injection", "manual"]
- - ["repo:https://github.com/sfackler/rust-postgres:postgres", "::query_raw", "Argument[0]", "sql-injection", "manual"]
- - ["repo:https://github.com/sfackler/rust-postgres:postgres", "::query_typed", "Argument[0]", "sql-injection", "manual"]
- - ["repo:https://github.com/sfackler/rust-postgres:postgres", "::query_typed_raw", "Argument[0]", "sql-injection", "manual"]
+ - ["::execute", "Argument[0]", "sql-injection", "manual"]
+ - ["::batch_execute", "Argument[0]", "sql-injection", "manual"]
+ - ["::prepare", "Argument[0]", "sql-injection", "manual"]
+ - ["::prepare_typed", "Argument[0]", "sql-injection", "manual"]
+ - ["::query", "Argument[0]", "sql-injection", "manual"]
+ - ["::query_one", "Argument[0]", "sql-injection", "manual"]
+ - ["::query_opt", "Argument[0]", "sql-injection", "manual"]
+ - ["::query_raw", "Argument[0]", "sql-injection", "manual"]
+ - ["::query_typed", "Argument[0]", "sql-injection", "manual"]
+ - ["::query_typed_raw", "Argument[0]", "sql-injection", "manual"]
diff --git a/rust/ql/lib/codeql/rust/frameworks/rustcrypto/rustcrypto.model.yml b/rust/ql/lib/codeql/rust/frameworks/rustcrypto/rustcrypto.model.yml
index 7b7a7964400..d1aefe5b983 100644
--- a/rust/ql/lib/codeql/rust/frameworks/rustcrypto/rustcrypto.model.yml
+++ b/rust/ql/lib/codeql/rust/frameworks/rustcrypto/rustcrypto.model.yml
@@ -1,10 +1,10 @@
extensions:
- addsTo:
pack: codeql/rust-all
- extensible: sinkModelDeprecated
+ extensible: sinkModel
data:
- - ["repo:https://github.com/RustCrypto/traits:digest", "<_ as crate::digest::Digest>::new_with_prefix", "Argument[0]", "hasher-input", "manual"]
- - ["repo:https://github.com/RustCrypto/traits:digest", "<_ as crate::digest::Digest>::update", "Argument[0]", "hasher-input", "manual"]
- - ["repo:https://github.com/RustCrypto/traits:digest", "<_ as crate::digest::Digest>::chain_update", "Argument[0]", "hasher-input", "manual"]
- - ["repo:https://github.com/RustCrypto/traits:digest", "<_ as crate::digest::Digest>::digest", "Argument[0]", "hasher-input", "manual"]
- - ["repo:https://github.com/stainless-steel/md5:md5", "crate::compute", "Argument[0]", "hasher-input", "manual"]
+ - ["::new_with_prefix", "Argument[0]", "hasher-input", "manual"]
+ - ["::update", "Argument[0]", "hasher-input", "manual"]
+ - ["::chain_update", "Argument[0]", "hasher-input", "manual"]
+ - ["::digest", "Argument[0]", "hasher-input", "manual"]
+ - ["md5::compute", "Argument[0]", "hasher-input", "manual"]
diff --git a/rust/ql/lib/codeql/rust/frameworks/stdlib/io.model.yml b/rust/ql/lib/codeql/rust/frameworks/stdlib/io.model.yml
index fc86d2fb908..b05ee510586 100644
--- a/rust/ql/lib/codeql/rust/frameworks/stdlib/io.model.yml
+++ b/rust/ql/lib/codeql/rust/frameworks/stdlib/io.model.yml
@@ -1,39 +1,39 @@
extensions:
- addsTo:
pack: codeql/rust-all
- extensible: sourceModelDeprecated
+ extensible: sourceModel
data:
- - ["lang:std", "crate::io::stdio::stdin", "ReturnValue", "stdin", "manual"]
+ - ["std::io::stdio::stdin", "ReturnValue", "stdin", "manual"]
- addsTo:
pack: codeql/rust-all
- extensible: summaryModelDeprecated
+ extensible: summaryModel
data:
- - ["lang:std", "::new", "Argument[0]", "ReturnValue", "taint", "manual"]
- - ["lang:std", "::fill_buf", "Argument[self]", "ReturnValue.Field[core::result::Result::Ok(0)]", "taint", "manual"]
- - ["lang:std", "::buffer", "Argument[self]", "ReturnValue", "taint", "manual"]
- - ["lang:std", "::read", "Argument[self]", "Argument[0].Reference", "taint", "manual"]
- - ["lang:std", "::read", "Argument[self]", "Argument[0].Reference", "taint", "manual"]
- - ["lang:std", "::read", "Argument[self]", "Argument[0].Reference", "taint", "manual"]
- - ["lang:std", "crate::io::Read::read", "Argument[self]", "Argument[0].Reference", "taint", "manual"]
- - ["lang:std", "::read_to_string", "Argument[self]", "Argument[0].Reference", "taint", "manual"]
- - ["lang:std", "::read_to_string", "Argument[self]", "Argument[0].Reference", "taint", "manual"]
- - ["lang:std", "::read_to_string", "Argument[self]", "Argument[0].Reference", "taint", "manual"]
- - ["lang:std", "crate::io::Read::read_to_string", "Argument[self]", "Argument[0].Reference", "taint", "manual"]
- - ["lang:std", ":::read_to_end", "Argument[self]", "Argument[0].Reference", "taint", "manual"]
- - ["lang:std", ":::read_to_end", "Argument[self]", "Argument[0].Reference", "taint", "manual"]
- - ["lang:std", "::read_to_end", "Argument[self]", "Argument[0].Reference", "taint", "manual"]
- - ["lang:std", "crate::io::Read::read_to_end", "Argument[self]", "Argument[0].Reference", "taint", "manual"]
- - ["lang:std", "::read_exact", "Argument[self]", "Argument[0].Reference", "taint", "manual"]
- - ["lang:std", "::read_exact", "Argument[self]", "Argument[0].Reference", "taint", "manual"]
- - ["lang:std", "::read_exact", "Argument[self]", "Argument[0].Reference", "taint", "manual"]
- - ["lang:std", "crate::io::Read::read_exact", "Argument[self]", "Argument[0].Reference", "taint", "manual"]
- - ["lang:std", "crate::io::BufRead::read_line", "Argument[self]", "Argument[0].Reference", "taint", "manual"]
- - ["lang:std", "crate::io::BufRead::read_until", "Argument[self]", "Argument[1].Reference", "taint", "manual"]
- - ["lang:std", "crate::io::BufRead::split", "Argument[self]", "ReturnValue", "taint", "manual"]
- - ["lang:std", "crate::io::BufRead::lines", "Argument[self]", "ReturnValue", "taint", "manual"]
- - ["lang:std", "crate::io::Read::bytes", "Argument[self]", "ReturnValue", "taint", "manual"]
- - ["lang:std", "crate::io::Read::chain", "Argument[self]", "ReturnValue", "taint", "manual"]
- - ["lang:std", "crate::io::Read::chain", "Argument[0]", "ReturnValue", "taint", "manual"]
- - ["lang:std", "crate::io::Read::take", "Argument[self]", "ReturnValue", "taint", "manual"]
- - ["lang:std", "::lock", "Argument[self]", "ReturnValue", "taint", "manual"]
- - ["lang:std", "::next", "Argument[self]", "ReturnValue.Field[core::option::Option::Some(0)].Field[core::result::Result::Ok(0)]", "taint", "manual"]
+ - ["::new", "Argument[0]", "ReturnValue", "taint", "manual"]
+ - ["::fill_buf", "Argument[self]", "ReturnValue.Field[core::result::Result::Ok(0)]", "taint", "manual"]
+ - ["::buffer", "Argument[self]", "ReturnValue", "taint", "manual"]
+ - ["::read", "Argument[self]", "Argument[0].Reference", "taint", "manual"]
+ - ["::read", "Argument[self]", "Argument[0].Reference", "taint", "manual"]
+ - ["::read", "Argument[self]", "Argument[0].Reference", "taint", "manual"]
+ - ["<_ as std::io::Read>::read", "Argument[self]", "Argument[0].Reference", "taint", "manual"]
+ - ["::read_to_string", "", "Argument[self]", "Argument[0].Reference", "taint", "manual"]
+ - ["::read_to_string", "Argument[self]", "Argument[0].Reference", "taint", "manual"]
+ - ["::read_to_string", "Argument[self]", "Argument[0].Reference", "taint", "manual"]
+ - ["<_ as std::io::Read>::read_to_string", "Argument[self]", "Argument[0].Reference", "taint", "manual"]
+ - ["::read_to_end", "Argument[self]", "Argument[0].Reference", "taint", "manual"]
+ - ["::read_to_end", "Argument[self]", "Argument[0].Reference", "taint", "manual"]
+ - ["::read_to_end", "Argument[self]", "Argument[0].Reference", "taint", "manual"]
+ - ["<_ as std::io::Read>::read_to_end", "Argument[self]", "Argument[0].Reference", "taint", "manual"]
+ - ["::read_exact", "Argument[self]", "Argument[0].Reference", "taint", "manual"]
+ - ["::read_exact", "Argument[self]", "Argument[0].Reference", "taint", "manual"]
+ - ["::read_exact", "Argument[self]", "Argument[0].Reference", "taint", "manual"]
+ - ["<_ as std::io::Read>::read_exact", "Argument[self]", "Argument[0].Reference", "taint", "manual"]
+ - ["<_ as std::io::BufRead>::read_line", "Argument[self]", "Argument[0].Reference", "taint", "manual"]
+ - ["<_ as std::io::BufRead>::read_until", "Argument[self]", "Argument[1].Reference", "taint", "manual"]
+ - ["<_ as std::io::BufRead>::split", "Argument[self]", "ReturnValue", "taint", "manual"]
+ - ["<_ as std::io::BufRead>::lines", "Argument[self]", "ReturnValue", "taint", "manual"]
+ - ["<_ as std::io::Read>::bytes", "Argument[self]", "ReturnValue", "taint", "manual"]
+ - ["<_ as std::io::Read>::chain", "Argument[self]", "ReturnValue", "taint", "manual"]
+ - ["<_ as std::io::Read>::chain", "Argument[0]", "ReturnValue", "taint", "manual"]
+ - ["<_ as std::io::Read>::take", "Argument[self]", "ReturnValue", "taint", "manual"]
+ - ["::lock", "Argument[self]", "ReturnValue", "taint", "manual"]
+ - ["::next", "Argument[self]", "ReturnValue.Field[core::option::Option::Some(0)].Field[core::result::Result::Ok(0)]", "taint", "manual"]
diff --git a/rust/ql/lib/codeql/rust/frameworks/tokio-postgres.model.yml b/rust/ql/lib/codeql/rust/frameworks/tokio-postgres.model.yml
index 7ad54022784..9cac599357d 100644
--- a/rust/ql/lib/codeql/rust/frameworks/tokio-postgres.model.yml
+++ b/rust/ql/lib/codeql/rust/frameworks/tokio-postgres.model.yml
@@ -1,24 +1,23 @@
extensions:
- addsTo:
pack: codeql/rust-all
- extensible: sinkModelDeprecated
+ extensible: sinkModel
data:
- - ["repo:https://github.com/sfackler/rust-postgres:tokio-postgres", "::execute", "Argument[0]", "sql-injection", "manual"]
- - ["repo:https://github.com/sfackler/rust-postgres:tokio-postgres", "::batch_execute", "Argument[0]", "sql-injection", "manual"]
- - ["repo:https://github.com/sfackler/rust-postgres:tokio-postgres", "::execute_raw", "Argument[0]", "sql-injection", "manual"]
- - ["repo:https://github.com/sfackler/rust-postgres:tokio-postgres", "::prepare", "Argument[0]", "sql-injection", "manual"]
- - ["repo:https://github.com/sfackler/rust-postgres:tokio-postgres", "::prepare_typed", "Argument[0]", "sql-injection", "manual"]
- - ["repo:https://github.com/sfackler/rust-postgres:tokio-postgres", "::query", "Argument[0]", "sql-injection", "manual"]
- - ["repo:https://github.com/sfackler/rust-postgres:tokio-postgres", "::query_opt", "Argument[0]", "sql-injection", "manual"]
- - ["repo:https://github.com/sfackler/rust-postgres:tokio-postgres", "::query_raw", "Argument[0]", "sql-injection", "manual"]
- - ["repo:https://github.com/sfackler/rust-postgres:tokio-postgres", "::query_typed", "Argument[0]", "sql-injection", "manual"]
- - ["repo:https://github.com/sfackler/rust-postgres:tokio-postgres", "::query_typed_raw", "Argument[0]", "sql-injection", "manual"]
- - ["repo:https://github.com/sfackler/rust-postgres:tokio-postgres", "::simple_query", "Argument[0]", "sql-injection", "manual"]
- - ["repo:https://github.com/sfackler/rust-postgres:tokio-postgres", "::simple_query_raw", "Argument[0]", "sql-injection", "manual"]
-
+ - ["::execute", "Argument[0]", "sql-injection", "manual"]
+ - ["::batch_execute", "Argument[0]", "sql-injection", "manual"]
+ - ["::execute_raw", "Argument[0]", "sql-injection", "manual"]
+ - ["::prepare", "Argument[0]", "sql-injection", "manual"]
+ - ["::prepare_typed", "Argument[0]", "sql-injection", "manual"]
+ - ["::query", "Argument[0]", "sql-injection", "manual"]
+ - ["::query_opt", "Argument[0]", "sql-injection", "manual"]
+ - ["::query_raw", "Argument[0]", "sql-injection", "manual"]
+ - ["::query_typed", "Argument[0]", "sql-injection", "manual"]
+ - ["::query_typed_raw", "Argument[0]", "sql-injection", "manual"]
+ - ["::simple_query", "Argument[0]", "sql-injection", "manual"]
+ - ["::simple_query_raw", "Argument[0]", "sql-injection", "manual"]
- addsTo:
pack: codeql/rust-all
- extensible: sourceModelDeprecated
+ extensible: sourceModel
data:
- - ["repo:https://github.com/sfackler/rust-postgres:tokio-postgres", "::get", "ReturnValue", "database", "manual"]
- - ["repo:https://github.com/sfackler/rust-postgres:tokio-postgres", "::try_get", "ReturnValue.Field[core::result::Result::Ok(0)]", "database", "manual"]
+ - ["::get", "ReturnValue", "database", "manual"]
+ - ["::try_get", "ReturnValue.Field[core::result::Result::Ok(0)]", "database", "manual"]
diff --git a/rust/ql/lib/codeql/rust/frameworks/tokio/io.model.yml b/rust/ql/lib/codeql/rust/frameworks/tokio/io.model.yml
index 35dcd597c0d..d5e91afa663 100644
--- a/rust/ql/lib/codeql/rust/frameworks/tokio/io.model.yml
+++ b/rust/ql/lib/codeql/rust/frameworks/tokio/io.model.yml
@@ -1,51 +1,51 @@
extensions:
- addsTo:
pack: codeql/rust-all
- extensible: sourceModelDeprecated
+ extensible: sourceModel
data:
- - ["repo:https://github.com/tokio-rs/tokio:tokio", "crate::io::stdin::stdin", "ReturnValue", "stdin", "manual"]
+ - ["tokio::io::stdin::stdin", "ReturnValue", "stdin", "manual"]
- addsTo:
pack: codeql/rust-all
- extensible: summaryModelDeprecated
+ extensible: summaryModel
data:
- - ["repo:https://github.com/tokio-rs/tokio:tokio", "::new", "Argument[0]", "ReturnValue", "taint", "manual"]
- - ["repo:https://github.com/tokio-rs/tokio:tokio", "crate::io::util::async_buf_read_ext::AsyncBufReadExt::fill_buf", "Argument[self]", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"]
- - ["repo:https://github.com/tokio-rs/tokio:tokio", "::buffer", "Argument[self]", "ReturnValue", "taint", "manual"]
- - ["repo:https://github.com/tokio-rs/tokio:tokio", "crate::io::util::async_read_ext::AsyncReadExt::read", "Argument[self]", "Argument[0].Reference", "taint", "manual"]
- - ["repo:https://github.com/tokio-rs/tokio:tokio", "crate::io::util::async_read_ext::AsyncReadExt::read_to_string", "Argument[self]", "Argument[0].Reference", "taint", "manual"]
- - ["repo:https://github.com/tokio-rs/tokio:tokio", "crate::io::util::async_read_ext::AsyncReadExt::read_to_end", "Argument[self]", "Argument[0].Reference", "taint", "manual"]
- - ["repo:https://github.com/tokio-rs/tokio:tokio", "crate::io::util::async_read_ext::AsyncReadExt::read_exact", "Argument[self]", "Argument[0].Reference", "taint", "manual"]
- - ["repo:https://github.com/tokio-rs/tokio:tokio", "crate::io::util::async_buf_read_ext::AsyncBufReadExt::read_line", "Argument[self]", "Argument[0].Reference", "taint", "manual"]
- - ["repo:https://github.com/tokio-rs/tokio:tokio", "crate::io::util::async_buf_read_ext::AsyncBufReadExt::read_until", "Argument[self]", "Argument[1].Reference", "taint", "manual"]
- - ["repo:https://github.com/tokio-rs/tokio:tokio", "crate::io::util::async_buf_read_ext::AsyncBufReadExt::split", "Argument[self]", "ReturnValue", "taint", "manual"]
- - ["repo:https://github.com/tokio-rs/tokio:tokio", "::next_segment", "Argument[self]", "ReturnValue.Future.Field[core::result::Result::Ok(0)].Field[core::option::Option::Some(0)]", "taint", "manual"]
- - ["repo:https://github.com/tokio-rs/tokio:tokio", "crate::io::util::async_buf_read_ext::AsyncBufReadExt::lines", "Argument[self]", "ReturnValue", "taint", "manual"]
- - ["repo:https://github.com/tokio-rs/tokio:tokio", "::next_line", "Argument[self]", "ReturnValue.Future.Field[core::result::Result::Ok(0)].Field[core::option::Option::Some(0)]", "taint", "manual"]
- - ["repo:https://github.com/tokio-rs/tokio:tokio", "crate::io::util::async_read_ext::AsyncReadExt::read_buf", "Argument[self]", "Argument[0].Reference", "taint", "manual"]
- - ["repo:https://github.com/tokio-rs/tokio:tokio", "crate::io::util::async_read_ext::AsyncReadExt::read_u8", "Argument[self]", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"]
- - ["repo:https://github.com/tokio-rs/tokio:tokio", "crate::io::util::async_read_ext::AsyncReadExt::read_u8_le", "Argument[self]", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"]
- - ["repo:https://github.com/tokio-rs/tokio:tokio", "crate::io::util::async_read_ext::AsyncReadExt::read_u16", "Argument[self]", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"]
- - ["repo:https://github.com/tokio-rs/tokio:tokio", "crate::io::util::async_read_ext::AsyncReadExt::read_u16_le", "Argument[self]", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"]
- - ["repo:https://github.com/tokio-rs/tokio:tokio", "crate::io::util::async_read_ext::AsyncReadExt::read_u32", "Argument[self]", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"]
- - ["repo:https://github.com/tokio-rs/tokio:tokio", "crate::io::util::async_read_ext::AsyncReadExt::read_u32_le", "Argument[self]", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"]
- - ["repo:https://github.com/tokio-rs/tokio:tokio", "crate::io::util::async_read_ext::AsyncReadExt::read_u64", "Argument[self]", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"]
- - ["repo:https://github.com/tokio-rs/tokio:tokio", "crate::io::util::async_read_ext::AsyncReadExt::read_u64_le", "Argument[self]", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"]
- - ["repo:https://github.com/tokio-rs/tokio:tokio", "crate::io::util::async_read_ext::AsyncReadExt::read_u128", "Argument[self]", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"]
- - ["repo:https://github.com/tokio-rs/tokio:tokio", "crate::io::util::async_read_ext::AsyncReadExt::read_u128_le", "Argument[self]", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"]
- - ["repo:https://github.com/tokio-rs/tokio:tokio", "crate::io::util::async_read_ext::AsyncReadExt::read_i8", "Argument[self]", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"]
- - ["repo:https://github.com/tokio-rs/tokio:tokio", "crate::io::util::async_read_ext::AsyncReadExt::read_i8_le", "Argument[self]", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"]
- - ["repo:https://github.com/tokio-rs/tokio:tokio", "crate::io::util::async_read_ext::AsyncReadExt::read_i16", "Argument[self]", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"]
- - ["repo:https://github.com/tokio-rs/tokio:tokio", "crate::io::util::async_read_ext::AsyncReadExt::read_i16_le", "Argument[self]", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"]
- - ["repo:https://github.com/tokio-rs/tokio:tokio", "crate::io::util::async_read_ext::AsyncReadExt::read_i32", "Argument[self]", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"]
- - ["repo:https://github.com/tokio-rs/tokio:tokio", "crate::io::util::async_read_ext::AsyncReadExt::read_i32_le", "Argument[self]", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"]
- - ["repo:https://github.com/tokio-rs/tokio:tokio", "crate::io::util::async_read_ext::AsyncReadExt::read_i64", "Argument[self]", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"]
- - ["repo:https://github.com/tokio-rs/tokio:tokio", "crate::io::util::async_read_ext::AsyncReadExt::read_i64_le", "Argument[self]", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"]
- - ["repo:https://github.com/tokio-rs/tokio:tokio", "crate::io::util::async_read_ext::AsyncReadExt::read_i128", "Argument[self]", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"]
- - ["repo:https://github.com/tokio-rs/tokio:tokio", "crate::io::util::async_read_ext::AsyncReadExt::read_i128_le", "Argument[self]", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"]
- - ["repo:https://github.com/tokio-rs/tokio:tokio", "crate::io::util::async_read_ext::AsyncReadExt::read_f32", "Argument[self]", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"]
- - ["repo:https://github.com/tokio-rs/tokio:tokio", "crate::io::util::async_read_ext::AsyncReadExt::read_f32_le", "Argument[self]", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"]
- - ["repo:https://github.com/tokio-rs/tokio:tokio", "crate::io::util::async_read_ext::AsyncReadExt::read_f64", "Argument[self]", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"]
- - ["repo:https://github.com/tokio-rs/tokio:tokio", "crate::io::util::async_read_ext::AsyncReadExt::read_f64_le", "Argument[self]", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"]
- - ["repo:https://github.com/tokio-rs/tokio:tokio", "crate::io::util::async_read_ext::AsyncReadExt::chain", "Argument[self]", "ReturnValue", "taint", "manual"]
- - ["repo:https://github.com/tokio-rs/tokio:tokio", "crate::io::util::async_read_ext::AsyncReadExt::chain", "Argument[0]", "ReturnValue", "taint", "manual"]
- - ["repo:https://github.com/tokio-rs/tokio:tokio", "crate::io::util::async_read_ext::AsyncReadExt::take", "Argument[self]", "ReturnValue", "taint", "manual"]
+ - ["::new", "Argument[0]", "ReturnValue", "taint", "manual"]
+ - ["<_ as tokio::io::util::async_buf_read_ext::AsyncBufReadExt>::fill_buf", "Argument[self]", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"]
+ - ["::buffer", "Argument[self]", "ReturnValue", "taint", "manual"]
+ - ["<_ as tokio::io::util::async_read_ext::AsyncReadExt>::read", "Argument[self]", "Argument[0].Reference", "taint", "manual"]
+ - ["<_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_to_string", "Argument[self]", "Argument[0].Reference", "taint", "manual"]
+ - ["<_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_to_end", "Argument[self]", "Argument[0].Reference", "taint", "manual"]
+ - ["<_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_exact ", "Argument[self]", "Argument[0].Reference", "taint", "manual"]
+ - ["<_ as tokio::io::util::async_buf_read_ext::AsyncBufReadExt>::read_line", "Argument[self]", "Argument[0].Reference", "taint", "manual"]
+ - ["<_ as tokio::io::util::async_buf_read_ext::AsyncBufReadExt>::read_until", "Argument[self]", "Argument[1].Reference", "taint", "manual"]
+ - ["<_ as tokio::io::util::async_buf_read_ext::AsyncBufReadExt>::split", "Argument[self]", "ReturnValue", "taint", "manual"]
+ - ["::next_segment", "Argument[self]", "ReturnValue.Future.Field[core::result::Result::Ok(0)].Field[core::option::Option::Some(0)]", "taint", "manual"]
+ - ["<_ as tokio::io::util::async_buf_read_ext::AsyncBufReadExt>::lines", "Argument[self]", "ReturnValue", "taint", "manual"]
+ - ["::next_line", "Argument[self]", "ReturnValue.Future.Field[core::result::Result::Ok(0)].Field[core::option::Option::Some(0)]", "taint", "manual"]
+ - ["<_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_buf", "Argument[self]", "Argument[0].Reference", "taint", "manual"]
+ - ["<_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_u8", "Argument[self]", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"]
+ - ["<_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_u8_le", "Argument[self]", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"]
+ - ["<_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_u16", "Argument[self]", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"]
+ - ["<_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_u16_le", "Argument[self]", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"]
+ - ["<_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_u32", "Argument[self]", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"]
+ - ["<_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_u32_le", "Argument[self]", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"]
+ - ["<_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_u64", "Argument[self]", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"]
+ - ["<_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_u64_le", "Argument[self]", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"]
+ - ["<_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_u128", "Argument[self]", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"]
+ - ["<_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_u128_le", "Argument[self]", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"]
+ - ["<_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_i8", "Argument[self]", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"]
+ - ["<_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_i8_le", "Argument[self]", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"]
+ - ["<_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_i16", "Argument[self]", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"]
+ - ["<_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_i16_le", "Argument[self]", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"]
+ - ["<_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_i32", "Argument[self]", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"]
+ - ["<_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_i32_le", "Argument[self]", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"]
+ - ["<_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_i64", "Argument[self]", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"]
+ - ["<_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_i64_le", "Argument[self]", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"]
+ - ["<_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_i128", "Argument[self]", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"]
+ - ["<_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_i128_le", "Argument[self]", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"]
+ - ["<_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_f32", "Argument[self]", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"]
+ - ["<_ as tokio::io::util::async_read_ext::AsyncReadExt>:::read_f32_le", "Argument[self]", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"]
+ - ["<_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_f64", "Argument[self]", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"]
+ - ["<_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_f64_le", "Argument[self]", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"]
+ - ["<_ as core::iter::traits::iterator::Iterator>::chain", "Argument[self]", "ReturnValue", "taint", "manual"]
+ - ["<_ as core::iter::traits::iterator::Iterator>::chain", "Argument[0]", "ReturnValue", "taint", "manual"]
+ - ["<_ as core::iter::traits::iterator::Iterator>::take", "Argument[self]", "ReturnValue", "taint", "manual"]
From 3027f75617bdc966f6653858171e102cbecd0f7e Mon Sep 17 00:00:00 2001
From: Geoffrey White <40627776+geoffw0@users.noreply.github.com>
Date: Thu, 19 Jun 2025 19:39:38 +0100
Subject: [PATCH 005/199] Rust: Translate more legacy models -> new models
(from data).
---
.../lib/codeql/rust/frameworks/http.model.yml | 18 +--
.../codeql/rust/frameworks/reqwest.model.yml | 34 ++---
.../codeql/rust/frameworks/rusqlite.model.yml | 25 ++--
.../codeql/rust/frameworks/rustls.model.yml | 14 +-
.../frameworks/stdlib/lang-alloc.model.yml | 63 ++++-----
.../frameworks/stdlib/lang-core.model.yml | 121 +++++++++---------
.../rust/frameworks/stdlib/net.model.yml | 18 +--
7 files changed, 150 insertions(+), 143 deletions(-)
diff --git a/rust/ql/lib/codeql/rust/frameworks/http.model.yml b/rust/ql/lib/codeql/rust/frameworks/http.model.yml
index 5ad34ef53fe..6a497f34647 100644
--- a/rust/ql/lib/codeql/rust/frameworks/http.model.yml
+++ b/rust/ql/lib/codeql/rust/frameworks/http.model.yml
@@ -1,13 +1,13 @@
extensions:
- addsTo:
pack: codeql/rust-all
- extensible: sourceModelDeprecated
+ extensible: sourceModel
data:
- - ["repo:https://github.com/hyperium/hyper:hyper", "::send_request", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "remote", "manual"]
- - ["repo:https://github.com/hyperium/hyper:hyper", "::send_request", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "remote", "manual"]
- - ["repo:https://github.com/hyperium/hyper:hyper", "::try_send_request", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "remote", "manual"]
- - ["repo:https://github.com/hyperium/hyper:hyper", "::try_send_request", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "remote", "manual"]
- - ["repo:https://github.com/hyperium/hyper:hyper", "::get", "ReturnValue.Future", "remote", "manual"]
- - ["repo:https://github.com/hyperium/hyper:hyper", "::request", "ReturnValue.Future", "remote", "manual"]
- - ["repo:https://github.com/hyperium/hyper-util:hyper-util", "::get", "ReturnValue.Future", "remote", "manual"]
- - ["repo:https://github.com/hyperium/hyper-util:hyper-util", "::request", "ReturnValue.Future", "remote", "manual"]
+ - ["::send_request", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "remote", "manual"]
+ - ["::send_request", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "remote", "manual"]
+ - ["::try_send_request", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "remote", "manual"]
+ - ["::try_send_request", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "remote", "manual"]
+ - ["::get", "ReturnValue.Future", "remote", "manual"]
+ - ["::request", "ReturnValue.Future", "remote", "manual"]
+ - ["::get", "ReturnValue.Future", "remote", "manual"]
+ - ["::request", "ReturnValue.Future", "remote", "manual"]
diff --git a/rust/ql/lib/codeql/rust/frameworks/reqwest.model.yml b/rust/ql/lib/codeql/rust/frameworks/reqwest.model.yml
index 3974d5b0817..8c24bbf148d 100644
--- a/rust/ql/lib/codeql/rust/frameworks/reqwest.model.yml
+++ b/rust/ql/lib/codeql/rust/frameworks/reqwest.model.yml
@@ -1,27 +1,27 @@
extensions:
- addsTo:
pack: codeql/rust-all
- extensible: sourceModelDeprecated
+ extensible: sourceModel
data:
- - ["repo:https://github.com/seanmonstar/reqwest:reqwest", "crate::get", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "remote", "manual"]
- - ["repo:https://github.com/seanmonstar/reqwest:reqwest", "crate::blocking::get", "ReturnValue.Field[core::result::Result::Ok(0)]", "remote", "manual"]
+ - ["reqwest::get", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "remote", "manual"]
+ - ["reqwest::blocking::get", "ReturnValue.Field[core::result::Result::Ok(0)]", "remote", "manual"]
- addsTo:
pack: codeql/rust-all
- extensible: sinkModelDeprecated
+ extensible: sinkModel
data:
- - ["repo:https://github.com/seanmonstar/reqwest:reqwest", "::request", "Argument[1]", "transmission", "manual"]
- - ["repo:https://github.com/seanmonstar/reqwest:reqwest", "::request", "Argument[1]", "transmission", "manual"]
+ - ["::request", "Argument[1]", "transmission", "manual"]
+ - ["::request", "Argument[1]", "transmission", "manual"]
- addsTo:
pack: codeql/rust-all
- extensible: summaryModelDeprecated
+ extensible: summaryModel
data:
- - ["repo:https://github.com/seanmonstar/reqwest:reqwest", "::text", "Argument[self]", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"]
- - ["repo:https://github.com/seanmonstar/reqwest:reqwest", "::text_with_charset", "Argument[self]", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"]
- - ["repo:https://github.com/seanmonstar/reqwest:reqwest", "::bytes", "Argument[self]", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"]
- - ["repo:https://github.com/seanmonstar/reqwest:reqwest", "::chunk", "Argument[self]", "ReturnValue.Future.Field[core::result::Result::Ok(0)].Field[core::option::Option::Some(0)]", "taint", "manual"]
- - ["repo:https://github.com/seanmonstar/reqwest:reqwest", "::text", "Argument[self]", "ReturnValue.Field[core::result::Result::Ok(0)]", "taint", "manual"]
- - ["repo:https://github.com/seanmonstar/reqwest:reqwest", "::text_with_charset", "Argument[self]", "ReturnValue.Field[core::result::Result::Ok(0)]", "taint", "manual"]
- - ["repo:https://github.com/seanmonstar/reqwest:reqwest", "::bytes", "Argument[self]", "ReturnValue.Field[core::result::Result::Ok(0)]", "taint", "manual"]
- - ["repo:https://github.com/seanmonstar/reqwest:reqwest", "::text", "Argument[self]", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"]
- - ["repo:https://github.com/seanmonstar/reqwest:reqwest", "::bytes", "Argument[self]", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"]
- - ["repo:https://github.com/seanmonstar/reqwest:reqwest", "::chunk", "Argument[self]", "ReturnValue.Future.Field[core::result::Result::Ok(0)].Field[core::option::Option::Some(0)]", "taint", "manual"]
+ - ["::text", "Argument[self]", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"]
+ - ["::text_with_charset", "Argument[self]", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"]
+ - ["::bytes", "Argument[self]", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"]
+ - ["::chunk", "Argument[self]", "ReturnValue.Future.Field[core::result::Result::Ok(0)].Field[core::option::Option::Some(0)]", "taint", "manual"]
+ - ["::text", "Argument[self]", "ReturnValue.Field[core::result::Result::Ok(0)]", "taint", "manual"]
+ - ["::text_with_charset", "Argument[self]", "ReturnValue.Field[core::result::Result::Ok(0)]", "taint", "manual"]
+ - ["::bytes", "Argument[self]", "ReturnValue.Field[core::result::Result::Ok(0)]", "taint", "manual"]
+ - ["::text", "Argument[self]", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"]
+ - ["::bytes", "Argument[self]", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"]
+ - ["::chunk", "Argument[self]", "ReturnValue.Future.Field[core::result::Result::Ok(0)].Field[core::option::Option::Some(0)]", "taint", "manual"]
diff --git a/rust/ql/lib/codeql/rust/frameworks/rusqlite.model.yml b/rust/ql/lib/codeql/rust/frameworks/rusqlite.model.yml
index 3da7e2a1bc6..43030de02d5 100644
--- a/rust/ql/lib/codeql/rust/frameworks/rusqlite.model.yml
+++ b/rust/ql/lib/codeql/rust/frameworks/rusqlite.model.yml
@@ -1,20 +1,19 @@
extensions:
- addsTo:
pack: codeql/rust-all
- extensible: sinkModelDeprecated
+ extensible: sinkModel
data:
- - ["repo:https://github.com/rusqlite/rusqlite:rusqlite", "::execute", "Argument[0]", "sql-injection", "manual"]
- - ["repo:https://github.com/rusqlite/rusqlite:rusqlite", "::execute_batch", "Argument[0]", "sql-injection", "manual"]
- - ["repo:https://github.com/rusqlite/rusqlite:rusqlite", "::prepare", "Argument[0]", "sql-injection", "manual"]
- - ["repo:https://github.com/rusqlite/rusqlite:rusqlite", "::prepare_with_flags", "Argument[0]", "sql-injection", "manual"]
- - ["repo:https://github.com/rusqlite/rusqlite:rusqlite", "::query_row", "Argument[0]", "sql-injection", "manual"]
- - ["repo:https://github.com/rusqlite/rusqlite:rusqlite", "::query_row_and_then", "Argument[0]", "sql-injection", "manual"]
-
+ - ["::execute", "Argument[0]", "sql-injection", "manual"]
+ - ["::execute_batch", "Argument[0]", "sql-injection", "manual"]
+ - ["::prepare", "Argument[0]", "sql-injection", "manual"]
+ - [::prepare_with_flags", "Argument[0]", "sql-injection", "manual"]
+ - ["::query_row", "Argument[0]", "sql-injection", "manual"]
+ - ["::query_row_and_then", "Argument[0]", "sql-injection", "manual"]
- addsTo:
pack: codeql/rust-all
- extensible: sourceModelDeprecated
+ extensible: sourceModel
data:
- - ["repo:https://github.com/rusqlite/rusqlite:rusqlite", "::get", "ReturnValue.Field[core::result::Result::Ok(0)]", "database", "manual"]
- - ["repo:https://github.com/rusqlite/rusqlite:rusqlite", "::get_unwrap", "ReturnValue", "database", "manual"]
- - ["repo:https://github.com/rusqlite/rusqlite:rusqlite", "::get_ref", "ReturnValue.Field[core::result::Result::Ok(0)]", "database", "manual"]
- - ["repo:https://github.com/rusqlite/rusqlite:rusqlite", "::get_ref_unwrap", "ReturnValue", "database", "manual"]
+ - ["::get", "ReturnValue.Field[core::result::Result::Ok(0)]", "database", "manual"]
+ - ["::get_unwrap", "ReturnValue", "database", "manual"]
+ - ["::get_ref", "ReturnValue.Field[core::result::Result::Ok(0)]", "database", "manual"]
+ - ["::get_ref_unwrap", "ReturnValue", "database", "manual"]
diff --git a/rust/ql/lib/codeql/rust/frameworks/rustls.model.yml b/rust/ql/lib/codeql/rust/frameworks/rustls.model.yml
index 1e21646f2ca..19f7ececcd2 100644
--- a/rust/ql/lib/codeql/rust/frameworks/rustls.model.yml
+++ b/rust/ql/lib/codeql/rust/frameworks/rustls.model.yml
@@ -1,14 +1,14 @@
extensions:
- addsTo:
pack: codeql/rust-all
- extensible: sourceModelDeprecated
+ extensible: sourceModel
data:
- - ["repo:https://github.com/rustls/rustls:rustls", "::new", "ReturnValue.Field[core::result::Result::Ok(0)]", "remote", "manual"]
+ - ["::new", "ReturnValue.Field[core::result::Result::Ok(0)]", "remote", "manual"]
- addsTo:
pack: codeql/rust-all
- extensible: summaryModelDeprecated
+ extensible: summaryModel
data:
- - ["repo:https://github.com/quininer/futures-rustls:futures-rustls", "::connect", "Argument[1]", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"]
- - ["repo:https://github.com/quininer/futures-rustls:futures-rustls", "::poll_read", "Argument[self].Reference", "Argument[1].Reference", "taint", "manual"]
- - ["repo:https://github.com/rustls/rustls:rustls", "::reader", "Argument[self]", "ReturnValue", "taint", "manual"]
- - ["repo:https://github.com/rustls/rustls:rustls", "::read", "Argument[self]", "Argument[0].Reference", "taint", "manual"]
+ - ["::connect", "Argument[1]", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"]
+ - ["::poll_read", "Argument[self].Reference", "Argument[1].Reference", "taint", "manual"]
+ - ["::reader", "Argument[self]", "ReturnValue", "taint", "manual"]
+ - ["::read", "Argument[self]", "Argument[0].Reference", "taint", "manual"]
diff --git a/rust/ql/lib/codeql/rust/frameworks/stdlib/lang-alloc.model.yml b/rust/ql/lib/codeql/rust/frameworks/stdlib/lang-alloc.model.yml
index eea2f6726db..08fd458576d 100644
--- a/rust/ql/lib/codeql/rust/frameworks/stdlib/lang-alloc.model.yml
+++ b/rust/ql/lib/codeql/rust/frameworks/stdlib/lang-alloc.model.yml
@@ -1,44 +1,49 @@
extensions:
- addsTo:
pack: codeql/rust-all
- extensible: sourceModelDeprecated
+ extensible: sourceModel
data:
# Alloc
- - ["lang:alloc", "crate::alloc::dealloc", "Argument[0]", "pointer-invalidate", "manual"]
+ - ["alloc::alloc::dealloc", "Argument[0]", "pointer-invalidate", "manual"]
- addsTo:
pack: codeql/rust-all
- extensible: sinkModelDeprecated
+ extensible: sinkModel
data:
# Alloc
- - ["lang:alloc", "crate::alloc::alloc", "Argument[0]", "alloc-layout", "manual"]
- - ["lang:alloc", "crate::alloc::alloc_zeroed", "Argument[0]", "alloc-layout", "manual"]
- - ["lang:alloc", "crate::alloc::realloc", "Argument[2]", "alloc-size", "manual"]
- - ["lang:std", "::alloc", "Argument[0]", "alloc-layout", "manual"]
- - ["lang:std", "::alloc_zeroed", "Argument[0]", "alloc-layout", "manual"]
- - ["lang:std", "::allocate", "Argument[0]", "alloc-layout", "manual"]
- - ["lang:std", "::allocate_zeroed", "Argument[0]", "alloc-layout", "manual"]
- - ["lang:std", "::grow", "Argument[2]", "alloc-layout", "manual"]
- - ["lang:std", "::grow_zeroed", "Argument[2]", "alloc-layout", "manual"]
- - ["lang:alloc", "::alloc", "Argument[0]", "alloc-layout", "manual"]
- - ["lang:alloc", "::alloc_zeroed", "Argument[0]", "alloc-layout", "manual"]
- - ["lang:alloc", "::allocate", "Argument[0]", "alloc-layout", "manual"]
- - ["lang:alloc", "::allocate_zeroed", "Argument[0]", "alloc-layout", "manual"]
- - ["lang:alloc", "::grow", "Argument[2]", "alloc-layout", "manual"]
- - ["lang:alloc", "::grow_zeroed", "Argument[2]", "alloc-layout", "manual"]
+ - ["alloc::alloc::alloc", "Argument[0]", "alloc-layout", "manual"]
+ - ["alloc::alloc::alloc_zeroed", "Argument[0]", "alloc-layout", "manual"]
+ - ["alloc::alloc::realloc", "Argument[2]", "alloc-size", "manual"]
+ - ["<_ as core::alloc::global::GlobalAlloc>::alloc", "Argument[0]", "alloc-layout", "manual"]
+ - ["::alloc", "Argument[0]", "alloc-layout", "manual"]
+ - ["<_ as core::alloc::global::GlobalAlloc>::alloc_zeroed", "Argument[0]", "alloc-layout", "manual"]
+ - ["::alloc_zeroed", "Argument[0]", "alloc-layout", "manual"]
+ - ["::allocate", "Argument[0]", "alloc-layout", "manual"]
+ - ["::allocate_zeroed", "Argument[0]", "alloc-layout", "manual"]
+ - ["::grow", "Argument[2]", "alloc-layout", "manual"]
+ - ["::grow_zeroed", "Argument[2]", "alloc-layout", "manual"]
+ - ["::alloc", "Argument[0]", "alloc-layout", "manual"]
+ - ["::alloc_zeroed", "Argument[0]", "alloc-layout", "manual"]
+ - ["::allocate", "Argument[0]", "alloc-layout", "manual"]
+ - ["::allocate_zeroed", "Argument[0]", "alloc-layout", "manual"]
+ - ["::grow", "Argument[2]", "alloc-layout", "manual"]
+ - ["::grow_zeroed", "Argument[2]", "alloc-layout", "manual"]
- addsTo:
pack: codeql/rust-all
- extensible: summaryModelDeprecated
+ extensible: summaryModel
data:
# Box
- - ["lang:alloc", "::pin", "Argument[0]", "ReturnValue.Reference", "value", "manual"]
- - ["lang:alloc", "::new", "Argument[0]", "ReturnValue.Reference", "value", "manual"]
- - ["lang:alloc", "::into_pin", "Argument[0]", "ReturnValue", "value", "manual"]
+ - ["::pin", "Argument[0]", "ReturnValue.Reference", "value", "manual"]
+ - ["::new", "Argument[0]", "ReturnValue.Reference", "value", "manual"]
+ - ["::into_pin", "Argument[0]", "ReturnValue", "value", "manual"]
# Fmt
- - ["lang:alloc", "crate::fmt::format", "Argument[0]", "ReturnValue", "taint", "manual"]
+ - ["alloc::fmt::format", "Argument[0]", "ReturnValue", "taint", "manual"]
# String
- - ["lang:alloc", "::as_str", "Argument[self]", "ReturnValue", "value", "manual"]
- - ["lang:alloc", "::as_bytes", "Argument[self]", "ReturnValue", "value", "manual"]
- - ["lang:alloc", "<_ as crate::string::ToString>::to_string", "Argument[self]", "ReturnValue", "taint", "manual"]
- - ["lang:alloc", "::parse", "Argument[self]", "ReturnValue.Field[core::result::Result::Ok(0)]", "taint", "manual"]
- - ["lang:alloc", "::trim", "Argument[self]", "ReturnValue.Reference", "taint", "manual"]
- - ["lang:alloc", "::from", "Argument[0]", "ReturnValue", "value", "manual"]
+ - ["::as_str", "Argument[self]", "ReturnValue", "value", "manual"]
+ - ["::as_bytes", "Argument[self]", "ReturnValue", "value", "manual"]
+ - ["::as_str", "Argument[self]", "ReturnValue", "value", "manual"]
+ - ["::as_bytes", "Argument[self]", "ReturnValue", "value", "manual"]
+ - ["::to_string", "Argument[self]", "ReturnValue", "taint", "manual"]
+ - ["::to_string", "Argument[self]", "ReturnValue", "taint", "manual"]
+ - ["::parse", "Argument[self]", "ReturnValue.Field[core::result::Result::Ok(0)]", "taint", "manual"]
+ - ["::trim", "Argument[self]", "ReturnValue.Reference", "taint", "manual"]
+ - ["::from", "Argument[0]", "ReturnValue", "value", "manual"]
diff --git a/rust/ql/lib/codeql/rust/frameworks/stdlib/lang-core.model.yml b/rust/ql/lib/codeql/rust/frameworks/stdlib/lang-core.model.yml
index 00d78a7d8cb..44319a942bf 100644
--- a/rust/ql/lib/codeql/rust/frameworks/stdlib/lang-core.model.yml
+++ b/rust/ql/lib/codeql/rust/frameworks/stdlib/lang-core.model.yml
@@ -1,76 +1,79 @@
extensions:
- addsTo:
pack: codeql/rust-all
- extensible: summaryModelDeprecated
+ extensible: summaryModel
data:
# Iterator
- - ["lang:core", "<[_]>::iter", "Argument[self].Element", "ReturnValue.Element", "value", "manual"]
- - ["lang:core", "<[_]>::iter_mut", "Argument[self].Element", "ReturnValue.Element", "value", "manual"]
- - ["lang:core", "<[_]>::into_iter", "Argument[self].Element", "ReturnValue.Element", "value", "manual"]
- - ["lang:core", "crate::iter::traits::iterator::Iterator::nth", "Argument[self].Element", "ReturnValue.Field[core::option::Option::Some(0)]", "value", "manual"]
- - ["lang:core", "crate::iter::traits::iterator::Iterator::next", "Argument[self].Element", "ReturnValue.Field[core::option::Option::Some(0)]", "value", "manual"]
- - ["lang:core", "crate::iter::traits::iterator::Iterator::collect", "Argument[self].Element", "ReturnValue.Element", "value", "manual"]
- - ["lang:core", "crate::iter::traits::iterator::Iterator::map", "Argument[self].Element", "Argument[0].Parameter[0]", "value", "manual"]
- - ["lang:core", "crate::iter::traits::iterator::Iterator::for_each", "Argument[self].Element", "Argument[0].Parameter[0]", "value", "manual"]
- - ["lang:core", "::nth", "Argument[self].Element", "ReturnValue.Field[core::option::Option::Some(0)]", "value", "manual"]
- - ["lang:core", "::next", "Argument[self].Element", "ReturnValue.Field[core::option::Option::Some(0)]", "value", "manual"]
- - ["lang:core", "::collect", "Argument[self].Element", "ReturnValue.Element", "value", "manual"]
- - ["lang:core", "::map", "Argument[self].Element", "Argument[0].Parameter[0]", "value", "manual"]
- - ["lang:core", "::for_each", "Argument[self].Element", "Argument[0].Parameter[0]", "value", "manual"]
+ - ["::iter", "Argument[self].Element", "ReturnValue.Element", "value", "manual"]
+ - ["::iter", "Argument[self].Element", "ReturnValue.Element", "value", "manual"]
+ - ["::iter_mut", "Argument[self].Element", "ReturnValue.Element", "value", "manual"]
+ - ["::into_iter", "Argument[self].Element", "ReturnValue.Element", "value", "manual"]
+ - ["<_ as core::iter::traits::iterator::Iterator>::nth", "Argument[self].Element", "ReturnValue.Field[core::option::Option::Some(0)]", "value", "manual"]
+ - ["<_ as core::iter::traits::iterator::Iterator>::next", "Argument[self].Element", "ReturnValue.Field[core::option::Option::Some(0)]", "value", "manual"]
+ - ["<_ as core::iter::traits::iterator::Iterator>::collect", "Argument[self].Element", "ReturnValue.Element", "value", "manual"]
+ - ["<_ as core::iter::traits::iterator::Iterator>::map", "Argument[self].Element", "Argument[0].Parameter[0]", "value", "manual"]
+ - ["<_ as core::iter::traits::iterator::Iterator>::for_each", "Argument[self].Element", "Argument[0].Parameter[0]", "value", "manual"]
+ - ["::nth", "Argument[self].Element", "ReturnValue.Field[core::option::Option::Some(0)]", "value", "manual"]
+ - ["::next", "Argument[self].Element", "ReturnValue.Field[core::option::Option::Some(0)]", "value", "manual"]
+ - ["::collect", "Argument[self].Element", "ReturnValue.Element", "value", "manual"]
+ - ["::map", "Argument[self].Element", "Argument[0].Parameter[0]", "value", "manual"]
+ - ["<_ as core::iter::traits::iterator::Iterator>::for_each", "Argument[self].Element", "Argument[0].Parameter[0]", "value", "manual"]
# Layout
- - ["lang:core", "::from_size_align", "Argument[0]", "ReturnValue.Field[core::result::Result::Ok(0)]", "taint", "manual"]
- - ["lang:core", "::from_size_align_unchecked", "Argument[0]", "ReturnValue", "taint", "manual"]
- - ["lang:core", "::array", "Argument[0]", "ReturnValue.Field[core::result::Result::Ok(0)]", "taint", "manual"]
- - ["lang:core", "::repeat", "Argument[self]", "ReturnValue.Field[core::result::Result::Ok(0)].Field[0]", "taint", "manual"]
- - ["lang:core", "::repeat", "Argument[0]", "ReturnValue.Field[core::result::Result::Ok(0)].Field[0]", "taint", "manual"]
- - ["lang:core", "::repeat_packed", "Argument[self]", "ReturnValue.Field[core::result::Result::Ok(0)]", "taint", "manual"]
- - ["lang:core", "::repeat_packed", "Argument[0]", "ReturnValue.Field[core::result::Result::Ok(0)]", "taint", "manual"]
- - ["lang:core", "::extend", "Argument[self]", "ReturnValue.Field[core::result::Result::Ok(0)].Field[0]", "taint", "manual"]
- - ["lang:core", "::extend", "Argument[0]", "ReturnValue.Field[core::result::Result::Ok(0)].Field[0]", "taint", "manual"]
- - ["lang:core", "::extend_packed", "Argument[self]", "ReturnValue.Field[core::result::Result::Ok(0)]", "taint", "manual"]
- - ["lang:core", "::extend_packed", "Argument[0]", "ReturnValue.Field[core::result::Result::Ok(0)]", "taint", "manual"]
- - ["lang:core", "::align_to", "Argument[self]", "ReturnValue.Field[core::result::Result::Ok(0)]", "taint", "manual"]
- - ["lang:core", "::pad_to_align", "Argument[self]", "ReturnValue", "taint", "manual"]
- - ["lang:core", "::size", "Argument[self]", "ReturnValue", "taint", "manual"]
+ - ["::from_size_align", "Argument[0]", "ReturnValue.Field[core::result::Result::Ok(0)]", "taint", "manual"]
+ - ["::from_size_align_unchecked", "Argument[0]", "ReturnValue", "taint", "manual"]
+ - ["::array", "Argument[0]", "ReturnValue.Field[core::result::Result::Ok(0)]", "taint", "manual"]
+ - ["::repeat", "Argument[self]", "ReturnValue.Field[core::result::Result::Ok(0)].Field[0]", "taint", "manual"]
+ - ["::repeat", "Argument[0]", "ReturnValue.Field[core::result::Result::Ok(0)].Field[0]", "taint", "manual"]
+ - ["::repeat_packed", "Argument[self]", "ReturnValue.Field[core::result::Result::Ok(0)]", "taint", "manual"]
+ - ["::repeat_packed", "Argument[0]", "ReturnValue.Field[core::result::Result::Ok(0)]", "taint", "manual"]
+ - ["::extend", "Argument[self]", "ReturnValue.Field[core::result::Result::Ok(0)].Field[0]", "taint", "manual"]
+ - ["::extend", "Argument[0]", "ReturnValue.Field[core::result::Result::Ok(0)].Field[0]", "taint", "manual"]
+ - ["::extend_packed", "Argument[self]", "ReturnValue.Field[core::result::Result::Ok(0)]", "taint", "manual"]
+ - ["::extend_packed", "Argument[0]", "ReturnValue.Field[core::result::Result::Ok(0)]", "taint", "manual"]
+ - ["::align_to", "Argument[self]", "ReturnValue.Field[core::result::Result::Ok(0)]", "taint", "manual"]
+ - ["::pad_to_align", "Argument[self]", "ReturnValue", "taint", "manual"]
+ - ["::size", "Argument[self]", "ReturnValue", "taint", "manual"]
# Pin
- - ["lang:core", "crate::pin::Pin", "Argument[0]", "ReturnValue", "value", "manual"]
- - ["lang:core", "::new", "Argument[0]", "ReturnValue", "value", "manual"]
- - ["lang:core", "::new_unchecked", "Argument[0].Reference", "ReturnValue", "value", "manual"]
- - ["lang:core", "::into_inner", "Argument[0]", "ReturnValue", "value", "manual"]
- - ["lang:core", "::into_inner_unchecked", "Argument[0]", "ReturnValue", "value", "manual"]
- - ["lang:core", "