-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Rust: Update legacy MaD models 2 #19942
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 3 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
cb66404
Rust: Translate more legacy models -> new models (from data + manual …
geoffw0 e56b9de
Rust: Fix mistake.
geoffw0 3e11dbd
Rust: Accept test changes.
geoffw0 a486549
Update rust/ql/lib/codeql/rust/frameworks/tokio/io.model.yml
geoffw0 a25330e
Rust: Update rustcrypto models.
geoffw0 8114071
Merge branch 'main' into models1
aibaars 7211f4a
Update rust/ql/lib/codeql/rust/frameworks/rustcrypto/rustcrypto.model…
geoffw0 d19259e
Update rust/ql/test/library-tests/frameworks/postgres/main.rs
geoffw0 b1d5b81
Rust: Add the original test back as well.
geoffw0 597f678
Merge branch 'main' into models1
geoffw0 4397863
Rust: Update after merge with main.
geoffw0 4281fe7
Rust: We don't really need the split into two test cases any more.
geoffw0 117e330
Merge branch 'main' into models1
geoffw0 0c075ab
Rust: Fix merge (I picked the wrong version).
geoffw0 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
extensions: | ||
- addsTo: | ||
pack: codeql/rust-all | ||
extensible: sinkModelDeprecated | ||
extensible: sinkModel | ||
data: | ||
- ["repo:https://github.com/sfackler/rust-postgres:postgres", "<crate::client::Client>::execute", "Argument[0]", "sql-injection", "manual"] | ||
- ["repo:https://github.com/sfackler/rust-postgres:postgres", "<crate::client::Client>::batch_execute", "Argument[0]", "sql-injection", "manual"] | ||
- ["repo:https://github.com/sfackler/rust-postgres:postgres", "<crate::client::Client>::prepare", "Argument[0]", "sql-injection", "manual"] | ||
- ["repo:https://github.com/sfackler/rust-postgres:postgres", "<crate::client::Client>::prepare_typed", "Argument[0]", "sql-injection", "manual"] | ||
- ["repo:https://github.com/sfackler/rust-postgres:postgres", "<crate::client::Client>::query", "Argument[0]", "sql-injection", "manual"] | ||
- ["repo:https://github.com/sfackler/rust-postgres:postgres", "<crate::client::Client>::query_one", "Argument[0]", "sql-injection", "manual"] | ||
- ["repo:https://github.com/sfackler/rust-postgres:postgres", "<crate::client::Client>::query_opt", "Argument[0]", "sql-injection", "manual"] | ||
- ["repo:https://github.com/sfackler/rust-postgres:postgres", "<crate::client::Client>::query_raw", "Argument[0]", "sql-injection", "manual"] | ||
- ["repo:https://github.com/sfackler/rust-postgres:postgres", "<crate::client::Client>::query_typed", "Argument[0]", "sql-injection", "manual"] | ||
- ["repo:https://github.com/sfackler/rust-postgres:postgres", "<crate::client::Client>::query_typed_raw", "Argument[0]", "sql-injection", "manual"] | ||
- ["<postgres::client::Client>::execute", "Argument[0]", "sql-injection", "manual"] | ||
- ["<postgres::client::Client>::batch_execute", "Argument[0]", "sql-injection", "manual"] | ||
- ["<postgres::client::Client>::prepare", "Argument[0]", "sql-injection", "manual"] | ||
- ["<postgres::client::Client>::prepare_typed", "Argument[0]", "sql-injection", "manual"] | ||
- ["<postgres::client::Client>::query", "Argument[0]", "sql-injection", "manual"] | ||
- ["<postgres::client::Client>::query_one", "Argument[0]", "sql-injection", "manual"] | ||
- ["<postgres::client::Client>::query_opt", "Argument[0]", "sql-injection", "manual"] | ||
- ["<postgres::client::Client>::query_raw", "Argument[0]", "sql-injection", "manual"] | ||
- ["<postgres::client::Client>::query_typed", "Argument[0]", "sql-injection", "manual"] | ||
- ["<postgres::client::Client>::query_typed_raw", "Argument[0]", "sql-injection", "manual"] |
12 changes: 6 additions & 6 deletions
12
rust/ql/lib/codeql/rust/frameworks/rustcrypto/rustcrypto.model.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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"] | ||
- ["<digest::core_api::wrapper::CoreWrapper as digest::Update>::new_with_prefix", "Argument[0]", "hasher-input", "manual"] | ||
- ["<digest::core_api::wrapper::CoreWrapper as digest::Update>::update", "Argument[0]", "hasher-input", "manual"] | ||
- ["<digest::core_api::wrapper::CoreWrapper as digest::Update>::chain_update", "Argument[0]", "hasher-input", "manual"] | ||
- ["<digest::core_api::wrapper::CoreWrapper as digest::Update>::digest", "Argument[0]", "hasher-input", "manual"] | ||
- ["md5::compute", "Argument[0]", "hasher-input", "manual"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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", "<crate::io::buffered::bufreader::BufReader>::new", "Argument[0]", "ReturnValue", "taint", "manual"] | ||
- ["lang:std", "<crate::io::buffered::bufreader::BufReader as crate::io::BufRead>::fill_buf", "Argument[self]", "ReturnValue.Field[core::result::Result::Ok(0)]", "taint", "manual"] | ||
- ["lang:std", "<crate::io::buffered::bufreader::BufReader>::buffer", "Argument[self]", "ReturnValue", "taint", "manual"] | ||
- ["lang:std", "<crate::io::stdio::Stdin as crate::io::Read>::read", "Argument[self]", "Argument[0].Reference", "taint", "manual"] | ||
- ["lang:std", "<crate::io::stdio::StdinLock as crate::io::Read>::read", "Argument[self]", "Argument[0].Reference", "taint", "manual"] | ||
- ["lang:std", "<crate::fs::File as crate::io::Read>::read", "Argument[self]", "Argument[0].Reference", "taint", "manual"] | ||
- ["lang:std", "crate::io::Read::read", "Argument[self]", "Argument[0].Reference", "taint", "manual"] | ||
- ["lang:std", "<crate::io::stdio::Stdin as crate::io::Read>::read_to_string", "Argument[self]", "Argument[0].Reference", "taint", "manual"] | ||
- ["lang:std", "<crate::io::stdio::StdinLock as crate::io::Read>::read_to_string", "Argument[self]", "Argument[0].Reference", "taint", "manual"] | ||
- ["lang:std", "<crate::fs::File as crate::io::Read>::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", ":<crate::io::stdio::Stdin as crate::io::Read>::read_to_end", "Argument[self]", "Argument[0].Reference", "taint", "manual"] | ||
- ["lang:std", ":<crate::io::stdio::StdinLock as crate::io::Read>::read_to_end", "Argument[self]", "Argument[0].Reference", "taint", "manual"] | ||
- ["lang:std", "<crate::fs::File as crate::io::Read>::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", "<crate::io::stdio::Stdin as crate::io::Read>::read_exact", "Argument[self]", "Argument[0].Reference", "taint", "manual"] | ||
- ["lang:std", "<crate::io::stdio::StdinLock as crate::io::Read>::read_exact", "Argument[self]", "Argument[0].Reference", "taint", "manual"] | ||
- ["lang:std", "<crate::fs::File as crate::io::Read>::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", "<crate::io::stdio::Stdin>::lock", "Argument[self]", "ReturnValue", "taint", "manual"] | ||
- ["lang:std", "<crate::io::Split as crate::iter::traits::iterator::Iterator>::next", "Argument[self]", "ReturnValue.Field[core::option::Option::Some(0)].Field[core::result::Result::Ok(0)]", "taint", "manual"] | ||
- ["<std::io::buffered::bufreader::BufReader>::new", "Argument[0]", "ReturnValue", "taint", "manual"] | ||
- ["<std::io::buffered::bufreader::BufReader as std::io::BufRead>::fill_buf", "Argument[self]", "ReturnValue.Field[core::result::Result::Ok(0)]", "taint", "manual"] | ||
- ["<std::io::buffered::bufreader::BufReader>::buffer", "Argument[self]", "ReturnValue", "taint", "manual"] | ||
- ["<std::io::stdio::Stdin as std::io::Read>::read", "Argument[self]", "Argument[0].Reference", "taint", "manual"] | ||
- ["<std::io::stdio::StdinLock as std::io::Read>::read", "Argument[self]", "Argument[0].Reference", "taint", "manual"] | ||
- ["<std::fs::File as std::io::Read>::read", "Argument[self]", "Argument[0].Reference", "taint", "manual"] | ||
- ["<_ as std::io::Read>::read", "Argument[self]", "Argument[0].Reference", "taint", "manual"] | ||
- ["<std::io::stdio::Stdin as std::io::Read>::read_to_string", "Argument[self]", "Argument[0].Reference", "taint", "manual"] | ||
- ["<std::io::stdio::StdinLock as std::io::Read>::read_to_string", "Argument[self]", "Argument[0].Reference", "taint", "manual"] | ||
- ["<std::fs::File as std::io::Read>::read_to_string", "Argument[self]", "Argument[0].Reference", "taint", "manual"] | ||
- ["<_ as std::io::Read>::read_to_string", "Argument[self]", "Argument[0].Reference", "taint", "manual"] | ||
- ["<std::io::stdio::Stdin as std::io::Read>::read_to_end", "Argument[self]", "Argument[0].Reference", "taint", "manual"] | ||
- ["<std::io::stdio::StdinLock as std::io::Read>::read_to_end", "Argument[self]", "Argument[0].Reference", "taint", "manual"] | ||
- ["<std::fs::File as std::io::Read>::read_to_end", "Argument[self]", "Argument[0].Reference", "taint", "manual"] | ||
- ["<_ as std::io::Read>::read_to_end", "Argument[self]", "Argument[0].Reference", "taint", "manual"] | ||
- ["<std::io::stdio::Stdin as std::io::Read>::read_exact", "Argument[self]", "Argument[0].Reference", "taint", "manual"] | ||
- ["<std::io::stdio::StdinLock as std::io::Read>::read_exact", "Argument[self]", "Argument[0].Reference", "taint", "manual"] | ||
- ["<std::fs::File as std::io::Read>::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"] | ||
- ["<std::io::stdio::Stdin>::lock", "Argument[self]", "ReturnValue", "taint", "manual"] | ||
- ["<std::io::Split as core::iter::traits::iterator::Iterator>::next", "Argument[self]", "ReturnValue.Field[core::option::Option::Some(0)].Field[core::result::Result::Ok(0)]", "taint", "manual"] |
33 changes: 16 additions & 17 deletions
33
rust/ql/lib/codeql/rust/frameworks/tokio-postgres.model.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,23 @@ | ||
extensions: | ||
- addsTo: | ||
pack: codeql/rust-all | ||
extensible: sinkModelDeprecated | ||
extensible: sinkModel | ||
data: | ||
- ["repo:https://github.com/sfackler/rust-postgres:tokio-postgres", "<crate::client::Client>::execute", "Argument[0]", "sql-injection", "manual"] | ||
- ["repo:https://github.com/sfackler/rust-postgres:tokio-postgres", "<crate::client::Client>::batch_execute", "Argument[0]", "sql-injection", "manual"] | ||
- ["repo:https://github.com/sfackler/rust-postgres:tokio-postgres", "<crate::client::Client>::execute_raw", "Argument[0]", "sql-injection", "manual"] | ||
- ["repo:https://github.com/sfackler/rust-postgres:tokio-postgres", "<crate::client::Client>::prepare", "Argument[0]", "sql-injection", "manual"] | ||
- ["repo:https://github.com/sfackler/rust-postgres:tokio-postgres", "<crate::client::Client>::prepare_typed", "Argument[0]", "sql-injection", "manual"] | ||
- ["repo:https://github.com/sfackler/rust-postgres:tokio-postgres", "<crate::client::Client>::query", "Argument[0]", "sql-injection", "manual"] | ||
- ["repo:https://github.com/sfackler/rust-postgres:tokio-postgres", "<crate::client::Client>::query_opt", "Argument[0]", "sql-injection", "manual"] | ||
- ["repo:https://github.com/sfackler/rust-postgres:tokio-postgres", "<crate::client::Client>::query_raw", "Argument[0]", "sql-injection", "manual"] | ||
- ["repo:https://github.com/sfackler/rust-postgres:tokio-postgres", "<crate::client::Client>::query_typed", "Argument[0]", "sql-injection", "manual"] | ||
- ["repo:https://github.com/sfackler/rust-postgres:tokio-postgres", "<crate::client::Client>::query_typed_raw", "Argument[0]", "sql-injection", "manual"] | ||
- ["repo:https://github.com/sfackler/rust-postgres:tokio-postgres", "<crate::client::Client>::simple_query", "Argument[0]", "sql-injection", "manual"] | ||
- ["repo:https://github.com/sfackler/rust-postgres:tokio-postgres", "<crate::client::Client>::simple_query_raw", "Argument[0]", "sql-injection", "manual"] | ||
|
||
- ["<tokio_postgres::client::Client>::execute", "Argument[0]", "sql-injection", "manual"] | ||
- ["<tokio_postgres::client::Client>::batch_execute", "Argument[0]", "sql-injection", "manual"] | ||
- ["<tokio_postgres::client::Client>::execute_raw", "Argument[0]", "sql-injection", "manual"] | ||
- ["<tokio_postgres::client::Client>::prepare", "Argument[0]", "sql-injection", "manual"] | ||
- ["<tokio_postgres::client::Client>::prepare_typed", "Argument[0]", "sql-injection", "manual"] | ||
- ["<tokio_postgres::client::Client>::query", "Argument[0]", "sql-injection", "manual"] | ||
- ["<tokio_postgres::client::Client>::query_opt", "Argument[0]", "sql-injection", "manual"] | ||
- ["<tokio_postgres::client::Client>::query_raw", "Argument[0]", "sql-injection", "manual"] | ||
- ["<tokio_postgres::client::Client>::query_typed", "Argument[0]", "sql-injection", "manual"] | ||
- ["<tokio_postgres::client::Client>::query_typed_raw", "Argument[0]", "sql-injection", "manual"] | ||
- ["<tokio_postgres::client::Client>::simple_query", "Argument[0]", "sql-injection", "manual"] | ||
- ["<tokio_postgres::client::Client>::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", "<crate::row::Row>::get", "ReturnValue", "database", "manual"] | ||
- ["repo:https://github.com/sfackler/rust-postgres:tokio-postgres", "<crate::row::Row>::try_get", "ReturnValue.Field[core::result::Result::Ok(0)]", "database", "manual"] | ||
- ["<tokio_postgres::row::Row>::get", "ReturnValue", "database", "manual"] | ||
- ["<tokio_postgres::row::Row>::try_get", "ReturnValue.Field[core::result::Result::Ok(0)]", "database", "manual"] |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.