Skip to content

Commit fc8a662

Browse files
committed
Rust: Update the models.
1 parent 0ec10e5 commit fc8a662

File tree

4 files changed

+156
-74
lines changed

4 files changed

+156
-74
lines changed
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
extensions:
22
- addsTo:
33
pack: codeql/rust-all
4-
extensible: summaryModelDeprecated
4+
extensible: summaryModel
55
data:
6-
- ["repo:https://github.com/fizyk20/generic-array.git:generic-array", "<crate::GenericArray>::from_slice", "Argument[0].Reference", "ReturnValue.Reference", "value", "manual"]
7-
- ["repo:https://github.com/fizyk20/generic-array.git:generic-array", "<crate::GenericArray>::from_mut_slice", "Argument[0].Reference", "ReturnValue.Reference", "value", "manual"]
8-
- ["repo:https://github.com/fizyk20/generic-array.git:generic-array", "<crate::GenericArray>::try_from_slice", "Argument[0].Reference", "ReturnValue.Field[crate::result::Result::Ok(0)].Reference", "value", "manual"]
9-
- ["repo:https://github.com/fizyk20/generic-array.git:generic-array", "<crate::GenericArray>::try_from_mut_slice", "Argument[0].Reference", "ReturnValue.Field[crate::result::Result::Ok(0)].Reference", "value", "manual"]
6+
- ["<generic_array::GenericArray>::from_slice", "Argument[0].Reference", "ReturnValue.Reference", "value", "manual"]
7+
- ["<generic_array::GenericArray>::from_mut_slice", "Argument[0].Reference", "ReturnValue.Reference", "value", "manual"]
8+
- ["<generic_array::GenericArray>::try_from_slice", "Argument[0].Reference", "ReturnValue.Field[crate::result::Result::Ok(0)].Reference", "value", "manual"]
9+
- ["<generic_array::GenericArray>::try_from_mut_slice", "Argument[0].Reference", "ReturnValue.Field[crate::result::Result::Ok(0)].Reference", "value", "manual"]
Lines changed: 25 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,3 @@
1-
extensions:
2-
- addsTo:
3-
pack: codeql/rust-all
4-
extensible: sinkModelDeprecated
5-
data:
6-
- ["repo:https://github.com/RustCrypto/traits:cipher", "<crate::stream_wrapper::StreamCipherCoreWrapper as crate::KeyInit>::new", "Argument[0]", "credentials-key", "manual"]
7-
- ["repo:https://github.com/RustCrypto/traits:cipher", "<crate::stream_wrapper::StreamCipherCoreWrapper as crate::KeyInit>::new", "Argument[1]", "credentials-iv", "manual"]
8-
- ["repo:https://github.com/RustCrypto/traits:cipher", "<crate::stream_wrapper::StreamCipherCoreWrapper as crate::KeyInit>::new_from_slice", "Argument[0]", "credentials-key", "manual"]
9-
- ["repo:https://github.com/RustCrypto/traits:cipher", "<crate::stream_wrapper::StreamCipherCoreWrapper as crate::KeyIvInit>::new", "Argument[0]", "credentials-key", "manual"]
10-
- ["repo:https://github.com/RustCrypto/traits:cipher", "<crate::stream_wrapper::StreamCipherCoreWrapper as crate::KeyIvInit>::new", "Argument[1]", "credentials-iv", "manual"]
11-
- ["repo:https://github.com/RustCrypto/traits:cipher", "<crate::stream_wrapper::StreamCipherCoreWrapper as crate::KeyIvInit>::new_from_slice", "Argument[0]", "credentials-key", "manual"]
12-
- ["repo:https://github.com/RustCrypto/traits:cipher", "<crate::stream_wrapper::StreamCipherCoreWrapper as crate::KeyIvInit>::new_from_slice", "Argument[1]", "credentials-iv", "manual"]
13-
- ["repo:https://github.com/RustCrypto/block-ciphers:aes", "<crate::soft::Aes128 as crate::KeyInit>::new", "Argument[0]", "credentials-key", "manual"]
14-
- ["repo:https://github.com/RustCrypto/block-ciphers:aes", "<crate::soft::Aes128 as crate::KeyInit>::new_from_slice", "Argument[0]", "credentials-key", "manual"]
15-
- ["repo:https://github.com/RustCrypto/block-ciphers:aes", "<crate::soft::Aes128Enc as crate::KeyInit>::new", "Argument[0]", "credentials-key", "manual"]
16-
- ["repo:https://github.com/RustCrypto/block-ciphers:aes", "<crate::soft::Aes128Enc as crate::KeyInit>::new_from_slice", "Argument[0]", "credentials-key", "manual"]
17-
- ["repo:https://github.com/RustCrypto/block-ciphers:aes", "<crate::soft::Aes128Dec as crate::KeyInit>::new", "Argument[0]", "credentials-key", "manual"]
18-
- ["repo:https://github.com/RustCrypto/block-ciphers:aes", "<crate::soft::Aes128Dec as crate::KeyInit>::new_from_slice", "Argument[0]", "credentials-key", "manual"]
19-
- ["repo:https://github.com/RustCrypto/block-ciphers:aes", "<crate::soft::Aes192 as crate::KeyInit>::new", "Argument[0]", "credentials-key", "manual"]
20-
- ["repo:https://github.com/RustCrypto/block-ciphers:aes", "<crate::soft::Aes192 as crate::KeyInit>::new_from_slice", "Argument[0]", "credentials-key", "manual"]
21-
- ["repo:https://github.com/RustCrypto/block-ciphers:aes", "<crate::soft::Aes192Enc as crate::KeyInit>::new", "Argument[0]", "credentials-key", "manual"]
22-
- ["repo:https://github.com/RustCrypto/block-ciphers:aes", "<crate::soft::Aes192Enc as crate::KeyInit>::new_from_slice", "Argument[0]", "credentials-key", "manual"]
23-
- ["repo:https://github.com/RustCrypto/block-ciphers:aes", "<crate::soft::Aes192Dec as crate::KeyInit>::new", "Argument[0]", "credentials-key", "manual"]
24-
- ["repo:https://github.com/RustCrypto/block-ciphers:aes", "<crate::soft::Aes192Dec as crate::KeyInit>::new_from_slice", "Argument[0]", "credentials-key", "manual"]
25-
- ["repo:https://github.com/RustCrypto/block-ciphers:aes", "<crate::soft::Aes256 as crate::KeyInit>::new", "Argument[0]", "credentials-key", "manual"]
26-
- ["repo:https://github.com/RustCrypto/block-ciphers:aes", "<crate::soft::Aes256 as crate::KeyInit>::new_from_slice", "Argument[0]", "credentials-key", "manual"]
27-
- ["repo:https://github.com/RustCrypto/block-ciphers:aes", "<crate::autodetect::Aes256 as crate::KeyInit>::new", "Argument[0]", "credentials-key", "manual"]
28-
- ["repo:https://github.com/RustCrypto/block-ciphers:aes", "<crate::autodetect::Aes256 as crate::KeyInit>::new_from_slice", "Argument[0]", "credentials-key", "manual"]
29-
- ["repo:https://github.com/RustCrypto/block-ciphers:aes", "<crate::soft::Aes256Enc as crate::KeyInit>::new", "Argument[0]", "credentials-key", "manual"]
30-
- ["repo:https://github.com/RustCrypto/block-ciphers:aes", "<crate::soft::Aes256Enc as crate::KeyInit>::new_from_slice", "Argument[0]", "credentials-key", "manual"]
31-
- ["repo:https://github.com/RustCrypto/block-ciphers:aes", "<crate::soft::Aes256Dec as crate::KeyInit>::new", "Argument[0]", "credentials-key", "manual"]
32-
- ["repo:https://github.com/RustCrypto/block-ciphers:aes", "<crate::soft::Aes256Dec as crate::KeyInit>::new_from_slice", "Argument[0]", "credentials-key", "manual"]
33-
- ["repo:https://github.com/RustCrypto/traits:crypto-common", "crate::KeyInit::new", "Argument[0]", "credentials-key", "manual"]
34-
- ["repo:https://github.com/RustCrypto/traits:crypto-common", "crate::KeyInit::new", "Argument[1]", "credentials-iv", "manual"]
35-
- ["repo:https://github.com/RustCrypto/traits:crypto-common", "crate::KeyInit::new_from_slice", "Argument[0]", "credentials-key", "manual"]
36-
- ["repo:https://github.com/RustCrypto/traits:crypto-common", "crate::KeyInit::new_from_slice", "Argument[1]", "credentials-iv", "manual"]
37-
- ["repo:https://github.com/RustCrypto/traits:crypto-common", "<_ as crate::KeyIvInit>::new", "Argument[0]", "credentials-key", "manual"]
38-
- ["repo:https://github.com/RustCrypto/traits:crypto-common", "<_ as crate::KeyIvInit>::new", "Argument[1]", "credentials-iv", "manual"]
39-
- ["repo:https://github.com/RustCrypto/traits:crypto-common", "<_ as crate::KeyIvInit>::new_from_slices", "Argument[0]", "credentials-key", "manual"]
40-
- ["repo:https://github.com/RustCrypto/traits:crypto-common", "<_ as crate::KeyIvInit>::new_from_slices", "Argument[1]", "credentials-iv", "manual"]
41-
- ["repo:https://github.com/RustCrypto/AEADs:aes-gcm", "<crate::AesGcm as crate::KeyInit>::new", "Argument[0]", "credentials-key", "manual"]
42-
- ["repo:https://github.com/RustCrypto/traits:aead", "<_ as crate::Aead>::encrypt", "Argument[0]", "credentials-nonce", "manual"]
431
extensions:
442
- addsTo:
453
pack: codeql/rust-all
@@ -50,3 +8,28 @@ extensions:
508
- ["<_ as digest::digest::Digest>::chain_update", "Argument[0]", "hasher-input", "manual"]
519
- ["<_ as digest::digest::Digest>::digest", "Argument[0]", "hasher-input", "manual"]
5210
- ["md5::compute", "Argument[0]", "hasher-input", "manual"]
11+
- ["<_ as crypto_common::KeyInit>::new", "Argument[0]", "credentials-key", "manual"]
12+
- ["<_ as crypto_common::KeyInit>::new", "Argument[1]", "credentials-iv", "manual"]
13+
- ["<_ as crypto_common::KeyInit>::new_from_slice", "Argument[0]", "credentials-key", "manual"]
14+
- ["<_ as crypto_common::KeyInit>::new_from_slice", "Argument[1]", "credentials-iv", "manual"]
15+
- ["<_ as crypto_common::KeyIvInit>::new", "Argument[0]", "credentials-key", "manual"]
16+
- ["<_ as crypto_common::KeyIvInit>::new", "Argument[1]", "credentials-iv", "manual"]
17+
- ["<_ as crypto_common::KeyIvInit>::new_from_slice", "Argument[0]", "credentials-key", "manual"]
18+
- ["<_ as crypto_common::KeyIvInit>::new_from_slice", "Argument[1]", "credentials-iv", "manual"]
19+
- ["<cipher::stream_wrapper::StreamCipherCoreWrapper as crypto_common::KeyInit>::new", "Argument[0]", "credentials-key", "manual"]
20+
- ["<cipher::stream_wrapper::StreamCipherCoreWrapper as crypto_common::KeyInit>::new", "Argument[1]", "credentials-iv", "manual"]
21+
- ["<cipher::stream_wrapper::StreamCipherCoreWrapper as crypto_common::KeyInit>::new_from_slice", "Argument[0]", "credentials-key", "manual"]
22+
- ["<cipher::stream_wrapper::StreamCipherCoreWrapper as crypto_common::KeyInit>::new_from_slice", "Argument[1]", "credentials-iv", "manual"]
23+
- ["<cipher::stream_wrapper::StreamCipherCoreWrapper as crypto_common::KeyIvInit>::new", "Argument[0]", "credentials-key", "manual"]
24+
- ["<cipher::stream_wrapper::StreamCipherCoreWrapper as crypto_common::KeyIvInit>::new", "Argument[1]", "credentials-iv", "manual"]
25+
- ["<cipher::stream_wrapper::StreamCipherCoreWrapper as crypto_common::KeyIvInit>::new_from_slice", "Argument[0]", "credentials-key", "manual"]
26+
- ["<cipher::stream_wrapper::StreamCipherCoreWrapper as crypto_common::KeyIvInit>::new_from_slice", "Argument[1]", "credentials-iv", "manual"]
27+
- ["<digest::core_api::wrapper::CoreWrapper as crypto_common::KeyInit>::new", "Argument[0]", "credentials-key", "manual"]
28+
- ["<digest::core_api::wrapper::CoreWrapper as crypto_common::KeyInit>::new", "Argument[1]", "credentials-iv", "manual"]
29+
- ["<digest::core_api::wrapper::CoreWrapper as crypto_common::KeyInit>::new_from_slice", "Argument[0]", "credentials-key", "manual"]
30+
- ["<digest::core_api::wrapper::CoreWrapper as crypto_common::KeyInit>::new_from_slice", "Argument[1]", "credentials-iv", "manual"]
31+
- ["<digest::core_api::wrapper::CoreWrapper as crypto_common::KeyIvInit>::new", "Argument[0]", "credentials-key", "manual"]
32+
- ["<digest::core_api::wrapper::CoreWrapper as crypto_common::KeyIvInit>::new", "Argument[1]", "credentials-iv", "manual"]
33+
- ["<digest::core_api::wrapper::CoreWrapper as crypto_common::KeyIvInit>::new_from_slice", "Argument[0]", "credentials-key", "manual"]
34+
- ["<digest::core_api::wrapper::CoreWrapper as crypto_common::KeyIvInit>::new_from_slice", "Argument[1]", "credentials-iv", "manual"]
35+
- ["<_ as aead::Aead>::encrypt", "Argument[0]", "credentials-nonce", "manual"]

rust/ql/lib/codeql/rust/frameworks/stdlib/lang-core.model.yml

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,14 @@
11
extensions:
2-
- addsTo:
3-
pack: codeql/rust-all
4-
extensible: sourceModelDeprecated
5-
data:
6-
- ["lang:core", "crate::mem::zeroed", "ReturnValue.Element", "constant-source", "manual"]
7-
- addsTo:
8-
pack: codeql/rust-all
9-
extensible: summaryModelDeprecated
10-
data:
11-
# Conversions
12-
- ["lang:core", "<_ as crate::convert::Into>::into", "Argument[self].Element", "ReturnValue.Element", "taint", "manual"]
13-
- ["lang:core", "<_ as crate::convert::Into>::into", "Argument[self].Reference.Element", "ReturnValue.Element", "taint", "manual"]
14-
- ["lang:core", "<[_]>::align_to", "Argument[self].Element", "ReturnValue.Field[0,1,2].Reference.Element", "taint", "manual"]
152
- addsTo:
163
pack: codeql/rust-all
174
extensible: summaryModel
185
data:
6+
# Conversions
7+
- ["<core::alloc::layout::Layout>::align_to", "Argument[self].Element", "ReturnValue.Field[0,1,2].Reference.Element", "taint", "manual"]
8+
- ["<_ as core::convert::Into>::into", "Argument[self].Element", "ReturnValue.Element", "taint", "manual"]
9+
- ["<_ as core::convert::Into>::into", "Argument[self].Reference.Element", "ReturnValue.Element", "taint", "manual"]
10+
- ["<alloc::string::String as core::convert::Into>::into", "Argument[self].Element", "ReturnValue.Element", "taint", "manual"]
11+
- ["<alloc::string::String as core::convert::Into>::into", "Argument[self].Reference.Element", "ReturnValue.Element", "taint", "manual"]
1912
# Iterator
2013
- ["<core::result::Result>::iter", "Argument[self].Element", "ReturnValue.Element", "value", "manual"]
2114
- ["<alloc::vec::Vec as value_trait::array::Array>::iter", "Argument[self].Element", "ReturnValue.Element", "value", "manual"]
@@ -72,6 +65,8 @@ extensions:
7265
pack: codeql/rust-all
7366
extensible: sourceModel
7467
data:
68+
# Mem
69+
- ["core::mem::zeroed", "ReturnValue.Element", "constant-source", "manual"]
7570
# Ptr
7671
- ["core::ptr::drop_in_place", "Argument[0]", "pointer-invalidate", "manual"]
7772
- ["core::ptr::dangling", "ReturnValue", "pointer-invalidate", "manual"]

0 commit comments

Comments
 (0)