diff --git a/rust/ql/lib/codeql/rust/frameworks/reqwest.model.yml b/rust/ql/lib/codeql/rust/frameworks/reqwest.model.yml index 3be832c8e7fb..f954d4ce7cce 100644 --- a/rust/ql/lib/codeql/rust/frameworks/reqwest.model.yml +++ b/rust/ql/lib/codeql/rust/frameworks/reqwest.model.yml @@ -3,7 +3,7 @@ extensions: pack: codeql/rust-all extensible: sourceModel data: - - ["repo:https://github.com/seanmonstar/reqwest:reqwest", "crate::get", "ReturnValue.Field[crate::result::Result::Ok(0)]", "remote", "manual"] + - ["repo:https://github.com/seanmonstar/reqwest:reqwest", "crate::get", "ReturnValue.Future.Field[crate::result::Result::Ok(0)]", "remote", "manual"] - ["repo:https://github.com/seanmonstar/reqwest:reqwest", "crate::blocking::get", "ReturnValue.Field[crate::result::Result::Ok(0)]", "remote", "manual"] - addsTo: pack: codeql/rust-all @@ -15,10 +15,13 @@ extensions: pack: codeql/rust-all extensible: summaryModel data: - - ["repo:https://github.com/seanmonstar/reqwest:reqwest", "::text", "Argument[self]", "ReturnValue.Field[crate::result::Result::Ok(0)]", "taint", "manual"] - - ["repo:https://github.com/seanmonstar/reqwest:reqwest", "::text_with_charset", "Argument[self]", "ReturnValue.Field[crate::result::Result::Ok(0)]", "taint", "manual"] - - ["repo:https://github.com/seanmonstar/reqwest:reqwest", "::bytes", "Argument[self]", "ReturnValue.Field[crate::result::Result::Ok(0)]", "taint", "manual"] - - ["repo:https://github.com/seanmonstar/reqwest:reqwest", "::chunk", "Argument[self]", "ReturnValue.Field[crate::result::Result::Ok(0)].Field[crate::option::Option::Some(0)]", "taint", "manual"] + - ["repo:https://github.com/seanmonstar/reqwest:reqwest", "::text", "Argument[self]", "ReturnValue.Future.Field[crate::result::Result::Ok(0)]", "taint", "manual"] + - ["repo:https://github.com/seanmonstar/reqwest:reqwest", "::text_with_charset", "Argument[self]", "ReturnValue.Future.Field[crate::result::Result::Ok(0)]", "taint", "manual"] + - ["repo:https://github.com/seanmonstar/reqwest:reqwest", "::bytes", "Argument[self]", "ReturnValue.Future.Field[crate::result::Result::Ok(0)]", "taint", "manual"] + - ["repo:https://github.com/seanmonstar/reqwest:reqwest", "::chunk", "Argument[self]", "ReturnValue.Future.Field[crate::result::Result::Ok(0)].Field[crate::option::Option::Some(0)]", "taint", "manual"] - ["repo:https://github.com/seanmonstar/reqwest:reqwest", "::text", "Argument[self]", "ReturnValue.Field[crate::result::Result::Ok(0)]", "taint", "manual"] - ["repo:https://github.com/seanmonstar/reqwest:reqwest", "::text_with_charset", "Argument[self]", "ReturnValue.Field[crate::result::Result::Ok(0)]", "taint", "manual"] - ["repo:https://github.com/seanmonstar/reqwest:reqwest", "::bytes", "Argument[self]", "ReturnValue.Field[crate::result::Result::Ok(0)]", "taint", "manual"] + - ["repo:https://github.com/seanmonstar/reqwest:reqwest", "::text", "Argument[self]", "ReturnValue.Future.Field[crate::result::Result::Ok(0)]", "taint", "manual"] + - ["repo:https://github.com/seanmonstar/reqwest:reqwest", "::bytes", "Argument[self]", "ReturnValue.Future.Field[crate::result::Result::Ok(0)]", "taint", "manual"] + - ["repo:https://github.com/seanmonstar/reqwest:reqwest", "::chunk", "Argument[self]", "ReturnValue.Future.Field[crate::result::Result::Ok(0)].Field[crate::option::Option::Some(0)]", "taint", "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 3cdbb911b5b8..e6b75aeb8d32 100644 --- a/rust/ql/lib/codeql/rust/frameworks/stdlib/io.model.yml +++ b/rust/ql/lib/codeql/rust/frameworks/stdlib/io.model.yml @@ -36,3 +36,4 @@ extensions: - ["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[crate::option::Option::Some(0)].Field[crate::result::Result::Ok(0)]", "taint", "manual"] diff --git a/rust/ql/lib/codeql/rust/frameworks/stdlib/net.model.yml b/rust/ql/lib/codeql/rust/frameworks/stdlib/net.model.yml new file mode 100644 index 000000000000..c088c11e7b6c --- /dev/null +++ b/rust/ql/lib/codeql/rust/frameworks/stdlib/net.model.yml @@ -0,0 +1,16 @@ +extensions: + - addsTo: + pack: codeql/rust-all + extensible: sourceModel + data: + - ["lang:std", "::connect", "ReturnValue.Field[crate::result::Result::Ok(0)]", "remote", "manual"] + - ["lang:std", "::connect_timeout", "ReturnValue.Field[crate::result::Result::Ok(0)]", "remote", "manual"] + - addsTo: + pack: codeql/rust-all + extensible: summaryModel + data: + - ["lang:std", "::try_clone", "Argument[self]", "ReturnValue.Field[crate::result::Result::Ok(0)]", "taint", "manual"] + - ["lang:std", "::read", "Argument[self]", "Argument[0].Reference", "taint", "manual"] + - ["lang:std", "::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_exact", "Argument[self]", "Argument[0].Reference", "taint", "manual"] diff --git a/rust/ql/lib/codeql/rust/frameworks/tokio/fs.model.yml b/rust/ql/lib/codeql/rust/frameworks/tokio/fs.model.yml new file mode 100644 index 000000000000..caa108de2b59 --- /dev/null +++ b/rust/ql/lib/codeql/rust/frameworks/tokio/fs.model.yml @@ -0,0 +1,11 @@ +extensions: + - addsTo: + pack: codeql/rust-all + extensible: sourceModel + data: + - ["repo:https://github.com/tokio-rs/tokio:tokio", "crate::fs::read::read", "ReturnValue.Future.Field[crate::result::Result::Ok(0)]", "file", "manual"] + - ["repo:https://github.com/tokio-rs/tokio:tokio", "crate::fs::read_to_string::read_to_string", "ReturnValue.Future.Field[crate::result::Result::Ok(0)]", "file", "manual"] + - ["repo:https://github.com/tokio-rs/tokio:tokio", "crate::fs::read_link::read_link", "ReturnValue.Future.Field[crate::result::Result::Ok(0)]", "file", "manual"] + - ["repo:https://github.com/tokio-rs/tokio:tokio", "::path", "ReturnValue", "file", "manual"] + - ["repo:https://github.com/tokio-rs/tokio:tokio", "::file_name", "ReturnValue", "file", "manual"] + - ["repo:https://github.com/tokio-rs/tokio:tokio", "::open", "ReturnValue.Future.Field[crate::result::Result::Ok(0)]", "file", "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 new file mode 100644 index 000000000000..ecfcb1b241b2 --- /dev/null +++ b/rust/ql/lib/codeql/rust/frameworks/tokio/io.model.yml @@ -0,0 +1,51 @@ +extensions: + - addsTo: + pack: codeql/rust-all + extensible: sourceModel + data: + - ["repo:https://github.com/tokio-rs/tokio:tokio", "crate::io::stdin::stdin", "ReturnValue", "stdin", "manual"] + - addsTo: + pack: codeql/rust-all + 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[crate::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[crate::result::Result::Ok(0)].Field[crate::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[crate::result::Result::Ok(0)].Field[crate::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[crate::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[crate::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[crate::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[crate::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[crate::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[crate::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[crate::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[crate::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[crate::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[crate::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[crate::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[crate::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[crate::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[crate::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[crate::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[crate::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[crate::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[crate::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[crate::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[crate::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[crate::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[crate::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[crate::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[crate::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"] diff --git a/rust/ql/lib/codeql/rust/frameworks/tokio/net.model.yml b/rust/ql/lib/codeql/rust/frameworks/tokio/net.model.yml new file mode 100644 index 000000000000..8c9d278818bb --- /dev/null +++ b/rust/ql/lib/codeql/rust/frameworks/tokio/net.model.yml @@ -0,0 +1,14 @@ +extensions: + - addsTo: + pack: codeql/rust-all + extensible: sourceModel + data: + - ["repo:https://github.com/tokio-rs/tokio:tokio", "::connect", "ReturnValue.Future.Field[crate::result::Result::Ok(0)]", "remote", "manual"] + - addsTo: + pack: codeql/rust-all + extensible: summaryModel + data: + - ["repo:https://github.com/tokio-rs/tokio:tokio", "::peek", "Argument[self]", "Argument[0].Reference", "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", "::try_read", "Argument[self]", "Argument[0].Reference", "taint", "manual"] + - ["repo:https://github.com/tokio-rs/tokio:tokio", "::try_read_buf", "Argument[self]", "Argument[0].Reference", "taint", "manual"] diff --git a/rust/ql/test/library-tests/dataflow/local/DataFlowStep.expected b/rust/ql/test/library-tests/dataflow/local/DataFlowStep.expected index d9f17dbf4c4d..a28d5f7c20cc 100644 --- a/rust/ql/test/library-tests/dataflow/local/DataFlowStep.expected +++ b/rust/ql/test/library-tests/dataflow/local/DataFlowStep.expected @@ -892,11 +892,24 @@ storeStep | file://:0:0:0:0 | [summary] to write: Argument[0].Reference in lang:std::_::::read | &ref | file://:0:0:0:0 | [post] [summary param] 0 in lang:std::_::::read | | file://:0:0:0:0 | [summary] to write: Argument[0].Reference in lang:std::_::::read_exact | &ref | file://:0:0:0:0 | [post] [summary param] 0 in lang:std::_::::read_exact | | file://:0:0:0:0 | [summary] to write: Argument[0].Reference in lang:std::_::::read_to_string | &ref | file://:0:0:0:0 | [post] [summary param] 0 in lang:std::_::::read_to_string | +| file://:0:0:0:0 | [summary] to write: Argument[0].Reference in lang:std::_::::read | &ref | file://:0:0:0:0 | [post] [summary param] 0 in lang:std::_::::read | +| file://:0:0:0:0 | [summary] to write: Argument[0].Reference in lang:std::_::::read_exact | &ref | file://:0:0:0:0 | [post] [summary param] 0 in lang:std::_::::read_exact | +| file://:0:0:0:0 | [summary] to write: Argument[0].Reference in lang:std::_::::read_to_end | &ref | file://:0:0:0:0 | [post] [summary param] 0 in lang:std::_::::read_to_end | +| file://:0:0:0:0 | [summary] to write: Argument[0].Reference in lang:std::_::::read_to_string | &ref | file://:0:0:0:0 | [post] [summary param] 0 in lang:std::_::::read_to_string | | file://:0:0:0:0 | [summary] to write: Argument[0].Reference in lang:std::_::crate::io::BufRead::read_line | &ref | file://:0:0:0:0 | [post] [summary param] 0 in lang:std::_::crate::io::BufRead::read_line | | file://:0:0:0:0 | [summary] to write: Argument[0].Reference in lang:std::_::crate::io::Read::read | &ref | file://:0:0:0:0 | [post] [summary param] 0 in lang:std::_::crate::io::Read::read | | file://:0:0:0:0 | [summary] to write: Argument[0].Reference in lang:std::_::crate::io::Read::read_exact | &ref | file://:0:0:0:0 | [post] [summary param] 0 in lang:std::_::crate::io::Read::read_exact | | file://:0:0:0:0 | [summary] to write: Argument[0].Reference in lang:std::_::crate::io::Read::read_to_end | &ref | file://:0:0:0:0 | [post] [summary param] 0 in lang:std::_::crate::io::Read::read_to_end | | file://:0:0:0:0 | [summary] to write: Argument[0].Reference in lang:std::_::crate::io::Read::read_to_string | &ref | file://:0:0:0:0 | [post] [summary param] 0 in lang:std::_::crate::io::Read::read_to_string | +| file://:0:0:0:0 | [summary] to write: Argument[0].Reference in repo:https://github.com/tokio-rs/tokio:tokio::_::::peek | &ref | file://:0:0:0:0 | [post] [summary param] 0 in repo:https://github.com/tokio-rs/tokio:tokio::_::::peek | +| file://:0:0:0:0 | [summary] to write: Argument[0].Reference in repo:https://github.com/tokio-rs/tokio:tokio::_::::try_read | &ref | file://:0:0:0:0 | [post] [summary param] 0 in repo:https://github.com/tokio-rs/tokio:tokio::_::::try_read | +| file://:0:0:0:0 | [summary] to write: Argument[0].Reference in repo:https://github.com/tokio-rs/tokio:tokio::_::::try_read_buf | &ref | file://:0:0:0:0 | [post] [summary param] 0 in repo:https://github.com/tokio-rs/tokio:tokio::_::::try_read_buf | +| file://:0:0:0:0 | [summary] to write: Argument[0].Reference in repo:https://github.com/tokio-rs/tokio:tokio::_::crate::io::util::async_buf_read_ext::AsyncBufReadExt::read_line | &ref | file://:0:0:0:0 | [post] [summary param] 0 in repo:https://github.com/tokio-rs/tokio:tokio::_::crate::io::util::async_buf_read_ext::AsyncBufReadExt::read_line | +| file://:0:0:0:0 | [summary] to write: Argument[0].Reference in repo:https://github.com/tokio-rs/tokio:tokio::_::crate::io::util::async_read_ext::AsyncReadExt::read | &ref | file://:0:0:0:0 | [post] [summary param] 0 in repo:https://github.com/tokio-rs/tokio:tokio::_::crate::io::util::async_read_ext::AsyncReadExt::read | +| file://:0:0:0:0 | [summary] to write: Argument[0].Reference in repo:https://github.com/tokio-rs/tokio:tokio::_::crate::io::util::async_read_ext::AsyncReadExt::read_buf | &ref | file://:0:0:0:0 | [post] [summary param] 0 in repo:https://github.com/tokio-rs/tokio:tokio::_::crate::io::util::async_read_ext::AsyncReadExt::read_buf | +| file://:0:0:0:0 | [summary] to write: Argument[0].Reference in repo:https://github.com/tokio-rs/tokio:tokio::_::crate::io::util::async_read_ext::AsyncReadExt::read_exact | &ref | file://:0:0:0:0 | [post] [summary param] 0 in repo:https://github.com/tokio-rs/tokio:tokio::_::crate::io::util::async_read_ext::AsyncReadExt::read_exact | +| file://:0:0:0:0 | [summary] to write: Argument[0].Reference in repo:https://github.com/tokio-rs/tokio:tokio::_::crate::io::util::async_read_ext::AsyncReadExt::read_to_end | &ref | file://:0:0:0:0 | [post] [summary param] 0 in repo:https://github.com/tokio-rs/tokio:tokio::_::crate::io::util::async_read_ext::AsyncReadExt::read_to_end | +| file://:0:0:0:0 | [summary] to write: Argument[0].Reference in repo:https://github.com/tokio-rs/tokio:tokio::_::crate::io::util::async_read_ext::AsyncReadExt::read_to_string | &ref | file://:0:0:0:0 | [post] [summary param] 0 in repo:https://github.com/tokio-rs/tokio:tokio::_::crate::io::util::async_read_ext::AsyncReadExt::read_to_string | | file://:0:0:0:0 | [summary] to write: Argument[0].Reference.Reference in lang:proc_macro::_::<&[u8] as crate::bridge::rpc::DecodeMut>::decode | &ref | file://:0:0:0:0 | [summary] to write: Argument[0].Reference in lang:proc_macro::_::<&[u8] as crate::bridge::rpc::DecodeMut>::decode | | file://:0:0:0:0 | [summary] to write: Argument[0].Reference.Reference in lang:proc_macro::_::::decode | &ref | file://:0:0:0:0 | [summary] to write: Argument[0].Reference in lang:proc_macro::_::::decode | | file://:0:0:0:0 | [summary] to write: Argument[0].Reference.Reference in lang:proc_macro::_::::decode | &ref | file://:0:0:0:0 | [summary] to write: Argument[0].Reference in lang:proc_macro::_::::decode | @@ -913,6 +926,7 @@ storeStep | file://:0:0:0:0 | [summary] to write: Argument[1].Parameter[0].Reference in lang:std::_::::wait_while | &ref | file://:0:0:0:0 | [summary] to write: Argument[1].Parameter[0] in lang:std::_::::wait_while | | file://:0:0:0:0 | [summary] to write: Argument[1].Reference in lang:core::_::<_ as crate::clone::uninit::CopySpec>::clone_one | &ref | file://:0:0:0:0 | [post] [summary param] 1 in lang:core::_::<_ as crate::clone::uninit::CopySpec>::clone_one | | file://:0:0:0:0 | [summary] to write: Argument[1].Reference in lang:std::_::crate::io::BufRead::read_until | &ref | file://:0:0:0:0 | [post] [summary param] 1 in lang:std::_::crate::io::BufRead::read_until | +| file://:0:0:0:0 | [summary] to write: Argument[1].Reference in repo:https://github.com/tokio-rs/tokio:tokio::_::crate::io::util::async_buf_read_ext::AsyncBufReadExt::read_until | &ref | file://:0:0:0:0 | [post] [summary param] 1 in repo:https://github.com/tokio-rs/tokio:tokio::_::crate::io::util::async_buf_read_ext::AsyncBufReadExt::read_until | | file://:0:0:0:0 | [summary] to write: Argument[2].Parameter[0].Reference in lang:core::_::crate::cmp::max_by | &ref | file://:0:0:0:0 | [summary] to write: Argument[2].Parameter[0] in lang:core::_::crate::cmp::max_by | | file://:0:0:0:0 | [summary] to write: Argument[2].Parameter[0].Reference in lang:core::_::crate::cmp::max_by_key | &ref | file://:0:0:0:0 | [summary] to write: Argument[2].Parameter[0] in lang:core::_::crate::cmp::max_by_key | | file://:0:0:0:0 | [summary] to write: Argument[2].Parameter[0].Reference in lang:core::_::crate::cmp::min_by | &ref | file://:0:0:0:0 | [summary] to write: Argument[2].Parameter[0] in lang:core::_::crate::cmp::min_by | @@ -1051,6 +1065,7 @@ storeStep | file://:0:0:0:0 | [summary] to write: ReturnValue.Field[crate::option::Option::Some(0)] in lang:core::_::crate::iter::traits::iterator::Iterator::next | Some | file://:0:0:0:0 | [summary] to write: ReturnValue in lang:core::_::crate::iter::traits::iterator::Iterator::next | | file://:0:0:0:0 | [summary] to write: ReturnValue.Field[crate::option::Option::Some(0)] in lang:core::_::crate::iter::traits::iterator::Iterator::nth | Some | file://:0:0:0:0 | [summary] to write: ReturnValue in lang:core::_::crate::iter::traits::iterator::Iterator::nth | | file://:0:0:0:0 | [summary] to write: ReturnValue.Field[crate::option::Option::Some(0)] in lang:proc_macro::_::::next | Some | file://:0:0:0:0 | [summary] to write: ReturnValue in lang:proc_macro::_::::next | +| file://:0:0:0:0 | [summary] to write: ReturnValue.Field[crate::option::Option::Some(0)] in lang:std::_::::next | Some | file://:0:0:0:0 | [summary] to write: ReturnValue in lang:std::_::::next | | file://:0:0:0:0 | [summary] to write: ReturnValue.Field[crate::option::Option::Some(0)] in lang:std::_::<{486}::StaticStrPayload as crate::panic::PanicPayload>::as_str | Some | file://:0:0:0:0 | [summary] to write: ReturnValue in lang:std::_::<{486}::StaticStrPayload as crate::panic::PanicPayload>::as_str | | file://:0:0:0:0 | [summary] to write: ReturnValue.Field[crate::option::Option::Some(0)].Field[0] in lang:core::_::::map | tuple.0 | file://:0:0:0:0 | [summary] to write: ReturnValue.Field[crate::option::Option::Some(0)] in lang:core::_::::map | | file://:0:0:0:0 | [summary] to write: ReturnValue.Field[crate::option::Option::Some(0)].Field[0] in lang:core::_::::zip | tuple.0 | file://:0:0:0:0 | [summary] to write: ReturnValue.Field[crate::option::Option::Some(0)] in lang:core::_::::zip | @@ -1060,6 +1075,7 @@ storeStep | file://:0:0:0:0 | [summary] to write: ReturnValue.Field[crate::option::Option::Some(0)].Field[1] in lang:core::_::::matching | tuple.1 | file://:0:0:0:0 | [summary] to write: ReturnValue.Field[crate::option::Option::Some(0)] in lang:core::_::::matching | | file://:0:0:0:0 | [summary] to write: ReturnValue.Field[crate::option::Option::Some(0)].Field[crate::result::Result::Err(0)] in lang:core::_::::transpose | Err | file://:0:0:0:0 | [summary] to write: ReturnValue.Field[crate::option::Option::Some(0)] in lang:core::_::::transpose | | file://:0:0:0:0 | [summary] to write: ReturnValue.Field[crate::option::Option::Some(0)].Field[crate::result::Result::Ok(0)] in lang:core::_::::transpose | Ok | file://:0:0:0:0 | [summary] to write: ReturnValue.Field[crate::option::Option::Some(0)] in lang:core::_::::transpose | +| file://:0:0:0:0 | [summary] to write: ReturnValue.Field[crate::option::Option::Some(0)].Field[crate::result::Result::Ok(0)] in lang:std::_::::next | Ok | file://:0:0:0:0 | [summary] to write: ReturnValue.Field[crate::option::Option::Some(0)] in lang:std::_::::next | | file://:0:0:0:0 | [summary] to write: ReturnValue.Field[crate::option::Option::Some(0)].Reference in lang:core::_::::from | &ref | file://:0:0:0:0 | [summary] to write: ReturnValue.Field[crate::option::Option::Some(0)] in lang:core::_::::from | | file://:0:0:0:0 | [summary] to write: ReturnValue.Field[crate::option::Option::Some(0)].Reference in lang:core::_::::as_mut | &ref | file://:0:0:0:0 | [summary] to write: ReturnValue.Field[crate::option::Option::Some(0)] in lang:core::_::::as_mut | | file://:0:0:0:0 | [summary] to write: ReturnValue.Field[crate::option::Option::Some(0)].Reference in lang:core::_::::as_ref | &ref | file://:0:0:0:0 | [summary] to write: ReturnValue.Field[crate::option::Option::Some(0)] in lang:core::_::::as_ref | @@ -1143,6 +1159,7 @@ storeStep | file://:0:0:0:0 | [summary] to write: ReturnValue.Field[crate::result::Result::Ok(0)] in lang:core::_::::parse | Ok | file://:0:0:0:0 | [summary] to write: ReturnValue in lang:core::_::::parse | | file://:0:0:0:0 | [summary] to write: ReturnValue.Field[crate::result::Result::Ok(0)] in lang:std::_::<&[u8] as crate::io::BufRead>::fill_buf | Ok | file://:0:0:0:0 | [summary] to write: ReturnValue in lang:std::_::<&[u8] as crate::io::BufRead>::fill_buf | | file://:0:0:0:0 | [summary] to write: ReturnValue.Field[crate::result::Result::Ok(0)] in lang:std::_::::fill_buf | Ok | file://:0:0:0:0 | [summary] to write: ReturnValue in lang:std::_::::fill_buf | +| file://:0:0:0:0 | [summary] to write: ReturnValue.Field[crate::result::Result::Ok(0)] in lang:std::_::::try_clone | Ok | file://:0:0:0:0 | [summary] to write: ReturnValue in lang:std::_::::try_clone | | file://:0:0:0:0 | [summary] to write: ReturnValue.Field[crate::result::Result::Ok(0)] in lang:std::_::::canonicalize | Ok | file://:0:0:0:0 | [summary] to write: ReturnValue in lang:std::_::::canonicalize | | file://:0:0:0:0 | [summary] to write: ReturnValue.Field[crate::result::Result::Ok(0)] in lang:std::_::::wait | Ok | file://:0:0:0:0 | [summary] to write: ReturnValue in lang:std::_::::wait | | file://:0:0:0:0 | [summary] to write: ReturnValue.Field[crate::result::Result::Ok(0)] in lang:std::_::::wait_timeout | Ok | file://:0:0:0:0 | [summary] to write: ReturnValue in lang:std::_::::wait_timeout | @@ -1154,10 +1171,6 @@ storeStep | file://:0:0:0:0 | [summary] to write: ReturnValue.Field[crate::result::Result::Ok(0)] in repo:https://github.com/seanmonstar/reqwest:reqwest::_::::bytes | Ok | file://:0:0:0:0 | [summary] to write: ReturnValue in repo:https://github.com/seanmonstar/reqwest:reqwest::_::::bytes | | file://:0:0:0:0 | [summary] to write: ReturnValue.Field[crate::result::Result::Ok(0)] in repo:https://github.com/seanmonstar/reqwest:reqwest::_::::text | Ok | file://:0:0:0:0 | [summary] to write: ReturnValue in repo:https://github.com/seanmonstar/reqwest:reqwest::_::::text | | file://:0:0:0:0 | [summary] to write: ReturnValue.Field[crate::result::Result::Ok(0)] in repo:https://github.com/seanmonstar/reqwest:reqwest::_::::text_with_charset | Ok | file://:0:0:0:0 | [summary] to write: ReturnValue in repo:https://github.com/seanmonstar/reqwest:reqwest::_::::text_with_charset | -| file://:0:0:0:0 | [summary] to write: ReturnValue.Field[crate::result::Result::Ok(0)] in repo:https://github.com/seanmonstar/reqwest:reqwest::_::::bytes | Ok | file://:0:0:0:0 | [summary] to write: ReturnValue in repo:https://github.com/seanmonstar/reqwest:reqwest::_::::bytes | -| file://:0:0:0:0 | [summary] to write: ReturnValue.Field[crate::result::Result::Ok(0)] in repo:https://github.com/seanmonstar/reqwest:reqwest::_::::chunk | Ok | file://:0:0:0:0 | [summary] to write: ReturnValue in repo:https://github.com/seanmonstar/reqwest:reqwest::_::::chunk | -| file://:0:0:0:0 | [summary] to write: ReturnValue.Field[crate::result::Result::Ok(0)] in repo:https://github.com/seanmonstar/reqwest:reqwest::_::::text | Ok | file://:0:0:0:0 | [summary] to write: ReturnValue in repo:https://github.com/seanmonstar/reqwest:reqwest::_::::text | -| file://:0:0:0:0 | [summary] to write: ReturnValue.Field[crate::result::Result::Ok(0)] in repo:https://github.com/seanmonstar/reqwest:reqwest::_::::text_with_charset | Ok | file://:0:0:0:0 | [summary] to write: ReturnValue in repo:https://github.com/seanmonstar/reqwest:reqwest::_::::text_with_charset | | file://:0:0:0:0 | [summary] to write: ReturnValue.Field[crate::result::Result::Ok(0)] in repo:https://github.com/servo/rust-url:url::_::::parse | Ok | file://:0:0:0:0 | [summary] to write: ReturnValue in repo:https://github.com/servo/rust-url:url::_::::parse | | file://:0:0:0:0 | [summary] to write: ReturnValue.Field[crate::result::Result::Ok(0)].Field[0] in lang:alloc::_::::search_tree_for_bifurcation | tuple.0 | file://:0:0:0:0 | [summary] to write: ReturnValue.Field[crate::result::Result::Ok(0)] in lang:alloc::_::::search_tree_for_bifurcation | | file://:0:0:0:0 | [summary] to write: ReturnValue.Field[crate::result::Result::Ok(0)].Field[0] in lang:core::_::::extend | tuple.0 | file://:0:0:0:0 | [summary] to write: ReturnValue.Field[crate::result::Result::Ok(0)] in lang:core::_::::extend | @@ -1166,10 +1179,81 @@ storeStep | file://:0:0:0:0 | [summary] to write: ReturnValue.Field[crate::result::Result::Ok(0)].Field[0] in lang:std::_::::wait_timeout_ms | tuple.0 | file://:0:0:0:0 | [summary] to write: ReturnValue.Field[crate::result::Result::Ok(0)] in lang:std::_::::wait_timeout_ms | | file://:0:0:0:0 | [summary] to write: ReturnValue.Field[crate::result::Result::Ok(0)].Field[0] in lang:std::_::::wait_timeout_while | tuple.0 | file://:0:0:0:0 | [summary] to write: ReturnValue.Field[crate::result::Result::Ok(0)] in lang:std::_::::wait_timeout_while | | file://:0:0:0:0 | [summary] to write: ReturnValue.Field[crate::result::Result::Ok(0)].Field[crate::option::Option::Some(0)] in lang:core::_::::transpose | Some | file://:0:0:0:0 | [summary] to write: ReturnValue.Field[crate::result::Result::Ok(0)] in lang:core::_::::transpose | -| file://:0:0:0:0 | [summary] to write: ReturnValue.Field[crate::result::Result::Ok(0)].Field[crate::option::Option::Some(0)] in repo:https://github.com/seanmonstar/reqwest:reqwest::_::::chunk | Some | file://:0:0:0:0 | [summary] to write: ReturnValue.Field[crate::result::Result::Ok(0)] in repo:https://github.com/seanmonstar/reqwest:reqwest::_::::chunk | | file://:0:0:0:0 | [summary] to write: ReturnValue.Field[crate::result::Result::Ok(0)].Reference in lang:core::_::::try_insert | &ref | file://:0:0:0:0 | [summary] to write: ReturnValue.Field[crate::result::Result::Ok(0)] in lang:core::_::::try_insert | | file://:0:0:0:0 | [summary] to write: ReturnValue.Field[crate::result::Result::Ok(0)].Reference in lang:core::_::::as_mut | &ref | file://:0:0:0:0 | [summary] to write: ReturnValue.Field[crate::result::Result::Ok(0)] in lang:core::_::::as_mut | | file://:0:0:0:0 | [summary] to write: ReturnValue.Field[crate::result::Result::Ok(0)].Reference in lang:core::_::::as_ref | &ref | file://:0:0:0:0 | [summary] to write: ReturnValue.Field[crate::result::Result::Ok(0)] in lang:core::_::::as_ref | +| file://:0:0:0:0 | [summary] to write: ReturnValue.Future in repo:https://github.com/seanmonstar/reqwest:reqwest::_::::bytes | future | file://:0:0:0:0 | [summary] to write: ReturnValue in repo:https://github.com/seanmonstar/reqwest:reqwest::_::::bytes | +| file://:0:0:0:0 | [summary] to write: ReturnValue.Future in repo:https://github.com/seanmonstar/reqwest:reqwest::_::::chunk | future | file://:0:0:0:0 | [summary] to write: ReturnValue in repo:https://github.com/seanmonstar/reqwest:reqwest::_::::chunk | +| file://:0:0:0:0 | [summary] to write: ReturnValue.Future in repo:https://github.com/seanmonstar/reqwest:reqwest::_::::text | future | file://:0:0:0:0 | [summary] to write: ReturnValue in repo:https://github.com/seanmonstar/reqwest:reqwest::_::::text | +| file://:0:0:0:0 | [summary] to write: ReturnValue.Future in repo:https://github.com/seanmonstar/reqwest:reqwest::_::::bytes | future | file://:0:0:0:0 | [summary] to write: ReturnValue in repo:https://github.com/seanmonstar/reqwest:reqwest::_::::bytes | +| file://:0:0:0:0 | [summary] to write: ReturnValue.Future in repo:https://github.com/seanmonstar/reqwest:reqwest::_::::chunk | future | file://:0:0:0:0 | [summary] to write: ReturnValue in repo:https://github.com/seanmonstar/reqwest:reqwest::_::::chunk | +| file://:0:0:0:0 | [summary] to write: ReturnValue.Future in repo:https://github.com/seanmonstar/reqwest:reqwest::_::::text | future | file://:0:0:0:0 | [summary] to write: ReturnValue in repo:https://github.com/seanmonstar/reqwest:reqwest::_::::text | +| file://:0:0:0:0 | [summary] to write: ReturnValue.Future in repo:https://github.com/seanmonstar/reqwest:reqwest::_::::text_with_charset | future | file://:0:0:0:0 | [summary] to write: ReturnValue in repo:https://github.com/seanmonstar/reqwest:reqwest::_::::text_with_charset | +| file://:0:0:0:0 | [summary] to write: ReturnValue.Future in repo:https://github.com/tokio-rs/tokio:tokio::_::::next_line | future | file://:0:0:0:0 | [summary] to write: ReturnValue in repo:https://github.com/tokio-rs/tokio:tokio::_::::next_line | +| file://:0:0:0:0 | [summary] to write: ReturnValue.Future in repo:https://github.com/tokio-rs/tokio:tokio::_::::next_segment | future | file://:0:0:0:0 | [summary] to write: ReturnValue in repo:https://github.com/tokio-rs/tokio:tokio::_::::next_segment | +| file://:0:0:0:0 | [summary] to write: ReturnValue.Future in repo:https://github.com/tokio-rs/tokio:tokio::_::crate::io::util::async_buf_read_ext::AsyncBufReadExt::fill_buf | future | file://:0:0:0:0 | [summary] to write: ReturnValue in repo:https://github.com/tokio-rs/tokio:tokio::_::crate::io::util::async_buf_read_ext::AsyncBufReadExt::fill_buf | +| file://:0:0:0:0 | [summary] to write: ReturnValue.Future in repo:https://github.com/tokio-rs/tokio:tokio::_::crate::io::util::async_read_ext::AsyncReadExt::read_f32 | future | file://:0:0:0:0 | [summary] to write: ReturnValue in repo:https://github.com/tokio-rs/tokio:tokio::_::crate::io::util::async_read_ext::AsyncReadExt::read_f32 | +| file://:0:0:0:0 | [summary] to write: ReturnValue.Future in repo:https://github.com/tokio-rs/tokio:tokio::_::crate::io::util::async_read_ext::AsyncReadExt::read_f32_le | future | file://:0:0:0:0 | [summary] to write: ReturnValue in repo:https://github.com/tokio-rs/tokio:tokio::_::crate::io::util::async_read_ext::AsyncReadExt::read_f32_le | +| file://:0:0:0:0 | [summary] to write: ReturnValue.Future in repo:https://github.com/tokio-rs/tokio:tokio::_::crate::io::util::async_read_ext::AsyncReadExt::read_f64 | future | file://:0:0:0:0 | [summary] to write: ReturnValue in repo:https://github.com/tokio-rs/tokio:tokio::_::crate::io::util::async_read_ext::AsyncReadExt::read_f64 | +| file://:0:0:0:0 | [summary] to write: ReturnValue.Future in repo:https://github.com/tokio-rs/tokio:tokio::_::crate::io::util::async_read_ext::AsyncReadExt::read_f64_le | future | file://:0:0:0:0 | [summary] to write: ReturnValue in repo:https://github.com/tokio-rs/tokio:tokio::_::crate::io::util::async_read_ext::AsyncReadExt::read_f64_le | +| file://:0:0:0:0 | [summary] to write: ReturnValue.Future in repo:https://github.com/tokio-rs/tokio:tokio::_::crate::io::util::async_read_ext::AsyncReadExt::read_i8 | future | file://:0:0:0:0 | [summary] to write: ReturnValue in repo:https://github.com/tokio-rs/tokio:tokio::_::crate::io::util::async_read_ext::AsyncReadExt::read_i8 | +| file://:0:0:0:0 | [summary] to write: ReturnValue.Future in repo:https://github.com/tokio-rs/tokio:tokio::_::crate::io::util::async_read_ext::AsyncReadExt::read_i8_le | future | file://:0:0:0:0 | [summary] to write: ReturnValue in repo:https://github.com/tokio-rs/tokio:tokio::_::crate::io::util::async_read_ext::AsyncReadExt::read_i8_le | +| file://:0:0:0:0 | [summary] to write: ReturnValue.Future in repo:https://github.com/tokio-rs/tokio:tokio::_::crate::io::util::async_read_ext::AsyncReadExt::read_i16 | future | file://:0:0:0:0 | [summary] to write: ReturnValue in repo:https://github.com/tokio-rs/tokio:tokio::_::crate::io::util::async_read_ext::AsyncReadExt::read_i16 | +| file://:0:0:0:0 | [summary] to write: ReturnValue.Future in repo:https://github.com/tokio-rs/tokio:tokio::_::crate::io::util::async_read_ext::AsyncReadExt::read_i16_le | future | file://:0:0:0:0 | [summary] to write: ReturnValue in repo:https://github.com/tokio-rs/tokio:tokio::_::crate::io::util::async_read_ext::AsyncReadExt::read_i16_le | +| file://:0:0:0:0 | [summary] to write: ReturnValue.Future in repo:https://github.com/tokio-rs/tokio:tokio::_::crate::io::util::async_read_ext::AsyncReadExt::read_i32 | future | file://:0:0:0:0 | [summary] to write: ReturnValue in repo:https://github.com/tokio-rs/tokio:tokio::_::crate::io::util::async_read_ext::AsyncReadExt::read_i32 | +| file://:0:0:0:0 | [summary] to write: ReturnValue.Future in repo:https://github.com/tokio-rs/tokio:tokio::_::crate::io::util::async_read_ext::AsyncReadExt::read_i32_le | future | file://:0:0:0:0 | [summary] to write: ReturnValue in repo:https://github.com/tokio-rs/tokio:tokio::_::crate::io::util::async_read_ext::AsyncReadExt::read_i32_le | +| file://:0:0:0:0 | [summary] to write: ReturnValue.Future in repo:https://github.com/tokio-rs/tokio:tokio::_::crate::io::util::async_read_ext::AsyncReadExt::read_i64 | future | file://:0:0:0:0 | [summary] to write: ReturnValue in repo:https://github.com/tokio-rs/tokio:tokio::_::crate::io::util::async_read_ext::AsyncReadExt::read_i64 | +| file://:0:0:0:0 | [summary] to write: ReturnValue.Future in repo:https://github.com/tokio-rs/tokio:tokio::_::crate::io::util::async_read_ext::AsyncReadExt::read_i64_le | future | file://:0:0:0:0 | [summary] to write: ReturnValue in repo:https://github.com/tokio-rs/tokio:tokio::_::crate::io::util::async_read_ext::AsyncReadExt::read_i64_le | +| file://:0:0:0:0 | [summary] to write: ReturnValue.Future in repo:https://github.com/tokio-rs/tokio:tokio::_::crate::io::util::async_read_ext::AsyncReadExt::read_i128 | future | file://:0:0:0:0 | [summary] to write: ReturnValue in repo:https://github.com/tokio-rs/tokio:tokio::_::crate::io::util::async_read_ext::AsyncReadExt::read_i128 | +| file://:0:0:0:0 | [summary] to write: ReturnValue.Future in repo:https://github.com/tokio-rs/tokio:tokio::_::crate::io::util::async_read_ext::AsyncReadExt::read_i128_le | future | file://:0:0:0:0 | [summary] to write: ReturnValue in repo:https://github.com/tokio-rs/tokio:tokio::_::crate::io::util::async_read_ext::AsyncReadExt::read_i128_le | +| file://:0:0:0:0 | [summary] to write: ReturnValue.Future in repo:https://github.com/tokio-rs/tokio:tokio::_::crate::io::util::async_read_ext::AsyncReadExt::read_u8 | future | file://:0:0:0:0 | [summary] to write: ReturnValue in repo:https://github.com/tokio-rs/tokio:tokio::_::crate::io::util::async_read_ext::AsyncReadExt::read_u8 | +| file://:0:0:0:0 | [summary] to write: ReturnValue.Future in repo:https://github.com/tokio-rs/tokio:tokio::_::crate::io::util::async_read_ext::AsyncReadExt::read_u8_le | future | file://:0:0:0:0 | [summary] to write: ReturnValue in repo:https://github.com/tokio-rs/tokio:tokio::_::crate::io::util::async_read_ext::AsyncReadExt::read_u8_le | +| file://:0:0:0:0 | [summary] to write: ReturnValue.Future in repo:https://github.com/tokio-rs/tokio:tokio::_::crate::io::util::async_read_ext::AsyncReadExt::read_u16 | future | file://:0:0:0:0 | [summary] to write: ReturnValue in repo:https://github.com/tokio-rs/tokio:tokio::_::crate::io::util::async_read_ext::AsyncReadExt::read_u16 | +| file://:0:0:0:0 | [summary] to write: ReturnValue.Future in repo:https://github.com/tokio-rs/tokio:tokio::_::crate::io::util::async_read_ext::AsyncReadExt::read_u16_le | future | file://:0:0:0:0 | [summary] to write: ReturnValue in repo:https://github.com/tokio-rs/tokio:tokio::_::crate::io::util::async_read_ext::AsyncReadExt::read_u16_le | +| file://:0:0:0:0 | [summary] to write: ReturnValue.Future in repo:https://github.com/tokio-rs/tokio:tokio::_::crate::io::util::async_read_ext::AsyncReadExt::read_u32 | future | file://:0:0:0:0 | [summary] to write: ReturnValue in repo:https://github.com/tokio-rs/tokio:tokio::_::crate::io::util::async_read_ext::AsyncReadExt::read_u32 | +| file://:0:0:0:0 | [summary] to write: ReturnValue.Future in repo:https://github.com/tokio-rs/tokio:tokio::_::crate::io::util::async_read_ext::AsyncReadExt::read_u32_le | future | file://:0:0:0:0 | [summary] to write: ReturnValue in repo:https://github.com/tokio-rs/tokio:tokio::_::crate::io::util::async_read_ext::AsyncReadExt::read_u32_le | +| file://:0:0:0:0 | [summary] to write: ReturnValue.Future in repo:https://github.com/tokio-rs/tokio:tokio::_::crate::io::util::async_read_ext::AsyncReadExt::read_u64 | future | file://:0:0:0:0 | [summary] to write: ReturnValue in repo:https://github.com/tokio-rs/tokio:tokio::_::crate::io::util::async_read_ext::AsyncReadExt::read_u64 | +| file://:0:0:0:0 | [summary] to write: ReturnValue.Future in repo:https://github.com/tokio-rs/tokio:tokio::_::crate::io::util::async_read_ext::AsyncReadExt::read_u64_le | future | file://:0:0:0:0 | [summary] to write: ReturnValue in repo:https://github.com/tokio-rs/tokio:tokio::_::crate::io::util::async_read_ext::AsyncReadExt::read_u64_le | +| file://:0:0:0:0 | [summary] to write: ReturnValue.Future in repo:https://github.com/tokio-rs/tokio:tokio::_::crate::io::util::async_read_ext::AsyncReadExt::read_u128 | future | file://:0:0:0:0 | [summary] to write: ReturnValue in repo:https://github.com/tokio-rs/tokio:tokio::_::crate::io::util::async_read_ext::AsyncReadExt::read_u128 | +| file://:0:0:0:0 | [summary] to write: ReturnValue.Future in repo:https://github.com/tokio-rs/tokio:tokio::_::crate::io::util::async_read_ext::AsyncReadExt::read_u128_le | future | file://:0:0:0:0 | [summary] to write: ReturnValue in repo:https://github.com/tokio-rs/tokio:tokio::_::crate::io::util::async_read_ext::AsyncReadExt::read_u128_le | +| file://:0:0:0:0 | [summary] to write: ReturnValue.Future.Field[crate::result::Result::Ok(0)] in repo:https://github.com/seanmonstar/reqwest:reqwest::_::::bytes | Ok | file://:0:0:0:0 | [summary] to write: ReturnValue.Future in repo:https://github.com/seanmonstar/reqwest:reqwest::_::::bytes | +| file://:0:0:0:0 | [summary] to write: ReturnValue.Future.Field[crate::result::Result::Ok(0)] in repo:https://github.com/seanmonstar/reqwest:reqwest::_::::chunk | Ok | file://:0:0:0:0 | [summary] to write: ReturnValue.Future in repo:https://github.com/seanmonstar/reqwest:reqwest::_::::chunk | +| file://:0:0:0:0 | [summary] to write: ReturnValue.Future.Field[crate::result::Result::Ok(0)] in repo:https://github.com/seanmonstar/reqwest:reqwest::_::::text | Ok | file://:0:0:0:0 | [summary] to write: ReturnValue.Future in repo:https://github.com/seanmonstar/reqwest:reqwest::_::::text | +| file://:0:0:0:0 | [summary] to write: ReturnValue.Future.Field[crate::result::Result::Ok(0)] in repo:https://github.com/seanmonstar/reqwest:reqwest::_::::bytes | Ok | file://:0:0:0:0 | [summary] to write: ReturnValue.Future in repo:https://github.com/seanmonstar/reqwest:reqwest::_::::bytes | +| file://:0:0:0:0 | [summary] to write: ReturnValue.Future.Field[crate::result::Result::Ok(0)] in repo:https://github.com/seanmonstar/reqwest:reqwest::_::::chunk | Ok | file://:0:0:0:0 | [summary] to write: ReturnValue.Future in repo:https://github.com/seanmonstar/reqwest:reqwest::_::::chunk | +| file://:0:0:0:0 | [summary] to write: ReturnValue.Future.Field[crate::result::Result::Ok(0)] in repo:https://github.com/seanmonstar/reqwest:reqwest::_::::text | Ok | file://:0:0:0:0 | [summary] to write: ReturnValue.Future in repo:https://github.com/seanmonstar/reqwest:reqwest::_::::text | +| file://:0:0:0:0 | [summary] to write: ReturnValue.Future.Field[crate::result::Result::Ok(0)] in repo:https://github.com/seanmonstar/reqwest:reqwest::_::::text_with_charset | Ok | file://:0:0:0:0 | [summary] to write: ReturnValue.Future in repo:https://github.com/seanmonstar/reqwest:reqwest::_::::text_with_charset | +| file://:0:0:0:0 | [summary] to write: ReturnValue.Future.Field[crate::result::Result::Ok(0)] in repo:https://github.com/tokio-rs/tokio:tokio::_::::next_line | Ok | file://:0:0:0:0 | [summary] to write: ReturnValue.Future in repo:https://github.com/tokio-rs/tokio:tokio::_::::next_line | +| file://:0:0:0:0 | [summary] to write: ReturnValue.Future.Field[crate::result::Result::Ok(0)] in repo:https://github.com/tokio-rs/tokio:tokio::_::::next_segment | Ok | file://:0:0:0:0 | [summary] to write: ReturnValue.Future in repo:https://github.com/tokio-rs/tokio:tokio::_::::next_segment | +| file://:0:0:0:0 | [summary] to write: ReturnValue.Future.Field[crate::result::Result::Ok(0)] in repo:https://github.com/tokio-rs/tokio:tokio::_::crate::io::util::async_buf_read_ext::AsyncBufReadExt::fill_buf | Ok | file://:0:0:0:0 | [summary] to write: ReturnValue.Future in repo:https://github.com/tokio-rs/tokio:tokio::_::crate::io::util::async_buf_read_ext::AsyncBufReadExt::fill_buf | +| file://:0:0:0:0 | [summary] to write: ReturnValue.Future.Field[crate::result::Result::Ok(0)] in repo:https://github.com/tokio-rs/tokio:tokio::_::crate::io::util::async_read_ext::AsyncReadExt::read_f32 | Ok | file://:0:0:0:0 | [summary] to write: ReturnValue.Future in repo:https://github.com/tokio-rs/tokio:tokio::_::crate::io::util::async_read_ext::AsyncReadExt::read_f32 | +| file://:0:0:0:0 | [summary] to write: ReturnValue.Future.Field[crate::result::Result::Ok(0)] in repo:https://github.com/tokio-rs/tokio:tokio::_::crate::io::util::async_read_ext::AsyncReadExt::read_f32_le | Ok | file://:0:0:0:0 | [summary] to write: ReturnValue.Future in repo:https://github.com/tokio-rs/tokio:tokio::_::crate::io::util::async_read_ext::AsyncReadExt::read_f32_le | +| file://:0:0:0:0 | [summary] to write: ReturnValue.Future.Field[crate::result::Result::Ok(0)] in repo:https://github.com/tokio-rs/tokio:tokio::_::crate::io::util::async_read_ext::AsyncReadExt::read_f64 | Ok | file://:0:0:0:0 | [summary] to write: ReturnValue.Future in repo:https://github.com/tokio-rs/tokio:tokio::_::crate::io::util::async_read_ext::AsyncReadExt::read_f64 | +| file://:0:0:0:0 | [summary] to write: ReturnValue.Future.Field[crate::result::Result::Ok(0)] in repo:https://github.com/tokio-rs/tokio:tokio::_::crate::io::util::async_read_ext::AsyncReadExt::read_f64_le | Ok | file://:0:0:0:0 | [summary] to write: ReturnValue.Future in repo:https://github.com/tokio-rs/tokio:tokio::_::crate::io::util::async_read_ext::AsyncReadExt::read_f64_le | +| file://:0:0:0:0 | [summary] to write: ReturnValue.Future.Field[crate::result::Result::Ok(0)] in repo:https://github.com/tokio-rs/tokio:tokio::_::crate::io::util::async_read_ext::AsyncReadExt::read_i8 | Ok | file://:0:0:0:0 | [summary] to write: ReturnValue.Future in repo:https://github.com/tokio-rs/tokio:tokio::_::crate::io::util::async_read_ext::AsyncReadExt::read_i8 | +| file://:0:0:0:0 | [summary] to write: ReturnValue.Future.Field[crate::result::Result::Ok(0)] in repo:https://github.com/tokio-rs/tokio:tokio::_::crate::io::util::async_read_ext::AsyncReadExt::read_i8_le | Ok | file://:0:0:0:0 | [summary] to write: ReturnValue.Future in repo:https://github.com/tokio-rs/tokio:tokio::_::crate::io::util::async_read_ext::AsyncReadExt::read_i8_le | +| file://:0:0:0:0 | [summary] to write: ReturnValue.Future.Field[crate::result::Result::Ok(0)] in repo:https://github.com/tokio-rs/tokio:tokio::_::crate::io::util::async_read_ext::AsyncReadExt::read_i16 | Ok | file://:0:0:0:0 | [summary] to write: ReturnValue.Future in repo:https://github.com/tokio-rs/tokio:tokio::_::crate::io::util::async_read_ext::AsyncReadExt::read_i16 | +| file://:0:0:0:0 | [summary] to write: ReturnValue.Future.Field[crate::result::Result::Ok(0)] in repo:https://github.com/tokio-rs/tokio:tokio::_::crate::io::util::async_read_ext::AsyncReadExt::read_i16_le | Ok | file://:0:0:0:0 | [summary] to write: ReturnValue.Future in repo:https://github.com/tokio-rs/tokio:tokio::_::crate::io::util::async_read_ext::AsyncReadExt::read_i16_le | +| file://:0:0:0:0 | [summary] to write: ReturnValue.Future.Field[crate::result::Result::Ok(0)] in repo:https://github.com/tokio-rs/tokio:tokio::_::crate::io::util::async_read_ext::AsyncReadExt::read_i32 | Ok | file://:0:0:0:0 | [summary] to write: ReturnValue.Future in repo:https://github.com/tokio-rs/tokio:tokio::_::crate::io::util::async_read_ext::AsyncReadExt::read_i32 | +| file://:0:0:0:0 | [summary] to write: ReturnValue.Future.Field[crate::result::Result::Ok(0)] in repo:https://github.com/tokio-rs/tokio:tokio::_::crate::io::util::async_read_ext::AsyncReadExt::read_i32_le | Ok | file://:0:0:0:0 | [summary] to write: ReturnValue.Future in repo:https://github.com/tokio-rs/tokio:tokio::_::crate::io::util::async_read_ext::AsyncReadExt::read_i32_le | +| file://:0:0:0:0 | [summary] to write: ReturnValue.Future.Field[crate::result::Result::Ok(0)] in repo:https://github.com/tokio-rs/tokio:tokio::_::crate::io::util::async_read_ext::AsyncReadExt::read_i64 | Ok | file://:0:0:0:0 | [summary] to write: ReturnValue.Future in repo:https://github.com/tokio-rs/tokio:tokio::_::crate::io::util::async_read_ext::AsyncReadExt::read_i64 | +| file://:0:0:0:0 | [summary] to write: ReturnValue.Future.Field[crate::result::Result::Ok(0)] in repo:https://github.com/tokio-rs/tokio:tokio::_::crate::io::util::async_read_ext::AsyncReadExt::read_i64_le | Ok | file://:0:0:0:0 | [summary] to write: ReturnValue.Future in repo:https://github.com/tokio-rs/tokio:tokio::_::crate::io::util::async_read_ext::AsyncReadExt::read_i64_le | +| file://:0:0:0:0 | [summary] to write: ReturnValue.Future.Field[crate::result::Result::Ok(0)] in repo:https://github.com/tokio-rs/tokio:tokio::_::crate::io::util::async_read_ext::AsyncReadExt::read_i128 | Ok | file://:0:0:0:0 | [summary] to write: ReturnValue.Future in repo:https://github.com/tokio-rs/tokio:tokio::_::crate::io::util::async_read_ext::AsyncReadExt::read_i128 | +| file://:0:0:0:0 | [summary] to write: ReturnValue.Future.Field[crate::result::Result::Ok(0)] in repo:https://github.com/tokio-rs/tokio:tokio::_::crate::io::util::async_read_ext::AsyncReadExt::read_i128_le | Ok | file://:0:0:0:0 | [summary] to write: ReturnValue.Future in repo:https://github.com/tokio-rs/tokio:tokio::_::crate::io::util::async_read_ext::AsyncReadExt::read_i128_le | +| file://:0:0:0:0 | [summary] to write: ReturnValue.Future.Field[crate::result::Result::Ok(0)] in repo:https://github.com/tokio-rs/tokio:tokio::_::crate::io::util::async_read_ext::AsyncReadExt::read_u8 | Ok | file://:0:0:0:0 | [summary] to write: ReturnValue.Future in repo:https://github.com/tokio-rs/tokio:tokio::_::crate::io::util::async_read_ext::AsyncReadExt::read_u8 | +| file://:0:0:0:0 | [summary] to write: ReturnValue.Future.Field[crate::result::Result::Ok(0)] in repo:https://github.com/tokio-rs/tokio:tokio::_::crate::io::util::async_read_ext::AsyncReadExt::read_u8_le | Ok | file://:0:0:0:0 | [summary] to write: ReturnValue.Future in repo:https://github.com/tokio-rs/tokio:tokio::_::crate::io::util::async_read_ext::AsyncReadExt::read_u8_le | +| file://:0:0:0:0 | [summary] to write: ReturnValue.Future.Field[crate::result::Result::Ok(0)] in repo:https://github.com/tokio-rs/tokio:tokio::_::crate::io::util::async_read_ext::AsyncReadExt::read_u16 | Ok | file://:0:0:0:0 | [summary] to write: ReturnValue.Future in repo:https://github.com/tokio-rs/tokio:tokio::_::crate::io::util::async_read_ext::AsyncReadExt::read_u16 | +| file://:0:0:0:0 | [summary] to write: ReturnValue.Future.Field[crate::result::Result::Ok(0)] in repo:https://github.com/tokio-rs/tokio:tokio::_::crate::io::util::async_read_ext::AsyncReadExt::read_u16_le | Ok | file://:0:0:0:0 | [summary] to write: ReturnValue.Future in repo:https://github.com/tokio-rs/tokio:tokio::_::crate::io::util::async_read_ext::AsyncReadExt::read_u16_le | +| file://:0:0:0:0 | [summary] to write: ReturnValue.Future.Field[crate::result::Result::Ok(0)] in repo:https://github.com/tokio-rs/tokio:tokio::_::crate::io::util::async_read_ext::AsyncReadExt::read_u32 | Ok | file://:0:0:0:0 | [summary] to write: ReturnValue.Future in repo:https://github.com/tokio-rs/tokio:tokio::_::crate::io::util::async_read_ext::AsyncReadExt::read_u32 | +| file://:0:0:0:0 | [summary] to write: ReturnValue.Future.Field[crate::result::Result::Ok(0)] in repo:https://github.com/tokio-rs/tokio:tokio::_::crate::io::util::async_read_ext::AsyncReadExt::read_u32_le | Ok | file://:0:0:0:0 | [summary] to write: ReturnValue.Future in repo:https://github.com/tokio-rs/tokio:tokio::_::crate::io::util::async_read_ext::AsyncReadExt::read_u32_le | +| file://:0:0:0:0 | [summary] to write: ReturnValue.Future.Field[crate::result::Result::Ok(0)] in repo:https://github.com/tokio-rs/tokio:tokio::_::crate::io::util::async_read_ext::AsyncReadExt::read_u64 | Ok | file://:0:0:0:0 | [summary] to write: ReturnValue.Future in repo:https://github.com/tokio-rs/tokio:tokio::_::crate::io::util::async_read_ext::AsyncReadExt::read_u64 | +| file://:0:0:0:0 | [summary] to write: ReturnValue.Future.Field[crate::result::Result::Ok(0)] in repo:https://github.com/tokio-rs/tokio:tokio::_::crate::io::util::async_read_ext::AsyncReadExt::read_u64_le | Ok | file://:0:0:0:0 | [summary] to write: ReturnValue.Future in repo:https://github.com/tokio-rs/tokio:tokio::_::crate::io::util::async_read_ext::AsyncReadExt::read_u64_le | +| file://:0:0:0:0 | [summary] to write: ReturnValue.Future.Field[crate::result::Result::Ok(0)] in repo:https://github.com/tokio-rs/tokio:tokio::_::crate::io::util::async_read_ext::AsyncReadExt::read_u128 | Ok | file://:0:0:0:0 | [summary] to write: ReturnValue.Future in repo:https://github.com/tokio-rs/tokio:tokio::_::crate::io::util::async_read_ext::AsyncReadExt::read_u128 | +| file://:0:0:0:0 | [summary] to write: ReturnValue.Future.Field[crate::result::Result::Ok(0)] in repo:https://github.com/tokio-rs/tokio:tokio::_::crate::io::util::async_read_ext::AsyncReadExt::read_u128_le | Ok | file://:0:0:0:0 | [summary] to write: ReturnValue.Future in repo:https://github.com/tokio-rs/tokio:tokio::_::crate::io::util::async_read_ext::AsyncReadExt::read_u128_le | +| file://:0:0:0:0 | [summary] to write: ReturnValue.Future.Field[crate::result::Result::Ok(0)].Field[crate::option::Option::Some(0)] in repo:https://github.com/seanmonstar/reqwest:reqwest::_::::chunk | Some | file://:0:0:0:0 | [summary] to write: ReturnValue.Future.Field[crate::result::Result::Ok(0)] in repo:https://github.com/seanmonstar/reqwest:reqwest::_::::chunk | +| file://:0:0:0:0 | [summary] to write: ReturnValue.Future.Field[crate::result::Result::Ok(0)].Field[crate::option::Option::Some(0)] in repo:https://github.com/seanmonstar/reqwest:reqwest::_::::chunk | Some | file://:0:0:0:0 | [summary] to write: ReturnValue.Future.Field[crate::result::Result::Ok(0)] in repo:https://github.com/seanmonstar/reqwest:reqwest::_::::chunk | +| file://:0:0:0:0 | [summary] to write: ReturnValue.Future.Field[crate::result::Result::Ok(0)].Field[crate::option::Option::Some(0)] in repo:https://github.com/tokio-rs/tokio:tokio::_::::next_line | Some | file://:0:0:0:0 | [summary] to write: ReturnValue.Future.Field[crate::result::Result::Ok(0)] in repo:https://github.com/tokio-rs/tokio:tokio::_::::next_line | +| file://:0:0:0:0 | [summary] to write: ReturnValue.Future.Field[crate::result::Result::Ok(0)].Field[crate::option::Option::Some(0)] in repo:https://github.com/tokio-rs/tokio:tokio::_::::next_segment | Some | file://:0:0:0:0 | [summary] to write: ReturnValue.Future.Field[crate::result::Result::Ok(0)] in repo:https://github.com/tokio-rs/tokio:tokio::_::::next_segment | | file://:0:0:0:0 | [summary] to write: ReturnValue.Reference in lang:alloc::_::::borrow | &ref | file://:0:0:0:0 | [summary] to write: ReturnValue in lang:alloc::_::::borrow | | file://:0:0:0:0 | [summary] to write: ReturnValue.Reference in lang:alloc::_::::borrow | &ref | file://:0:0:0:0 | [summary] to write: ReturnValue in lang:alloc::_::::borrow | | file://:0:0:0:0 | [summary] to write: ReturnValue.Reference in lang:alloc::_::::borrow_mut | &ref | file://:0:0:0:0 | [summary] to write: ReturnValue in lang:alloc::_::::borrow_mut | diff --git a/rust/ql/test/library-tests/dataflow/sources/TaintSources.expected b/rust/ql/test/library-tests/dataflow/sources/TaintSources.expected index ba7eeae00081..1fd8944790a8 100644 --- a/rust/ql/test/library-tests/dataflow/sources/TaintSources.expected +++ b/rust/ql/test/library-tests/dataflow/sources/TaintSources.expected @@ -20,30 +20,57 @@ | test.rs:74:26:74:37 | ...::get | Flow source 'RemoteSource' of type remote (DEFAULT). | | test.rs:77:26:77:37 | ...::get | Flow source 'RemoteSource' of type remote (DEFAULT). | | test.rs:80:24:80:35 | ...::get | Flow source 'RemoteSource' of type remote (DEFAULT). | -| test.rs:112:35:112:46 | send_request | Flow source 'RemoteSource' of type remote (DEFAULT). | -| test.rs:119:31:119:42 | send_request | Flow source 'RemoteSource' of type remote (DEFAULT). | -| test.rs:205:31:205:43 | ...::read | Flow source 'FileSource' of type file (DEFAULT). | -| test.rs:210:31:210:38 | ...::read | Flow source 'FileSource' of type file (DEFAULT). | -| test.rs:215:22:215:39 | ...::read_to_string | Flow source 'FileSource' of type file (DEFAULT). | -| test.rs:221:22:221:25 | path | Flow source 'FileSource' of type file (DEFAULT). | -| test.rs:222:27:222:35 | file_name | Flow source 'FileSource' of type file (DEFAULT). | -| test.rs:228:22:228:34 | ...::read_link | Flow source 'FileSource' of type file (DEFAULT). | -| test.rs:243:22:243:35 | ...::stdin | Flow source 'StdInSource' of type stdin (DEFAULT). | -| test.rs:249:22:249:35 | ...::stdin | Flow source 'StdInSource' of type stdin (DEFAULT). | -| test.rs:255:22:255:35 | ...::stdin | Flow source 'StdInSource' of type stdin (DEFAULT). | -| test.rs:261:9:261:22 | ...::stdin | Flow source 'StdInSource' of type stdin (DEFAULT). | -| test.rs:265:17:265:30 | ...::stdin | Flow source 'StdInSource' of type stdin (DEFAULT). | -| test.rs:271:20:271:38 | ...::open | Flow source 'FileSource' of type file (DEFAULT). | -| test.rs:304:50:304:63 | ...::stdin | Flow source 'StdInSource' of type stdin (DEFAULT). | -| test.rs:310:50:310:63 | ...::stdin | Flow source 'StdInSource' of type stdin (DEFAULT). | -| test.rs:317:50:317:63 | ...::stdin | Flow source 'StdInSource' of type stdin (DEFAULT). | -| test.rs:324:50:324:63 | ...::stdin | Flow source 'StdInSource' of type stdin (DEFAULT). | -| test.rs:331:56:331:69 | ...::stdin | Flow source 'StdInSource' of type stdin (DEFAULT). | -| test.rs:338:50:338:63 | ...::stdin | Flow source 'StdInSource' of type stdin (DEFAULT). | -| test.rs:345:50:345:63 | ...::stdin | Flow source 'StdInSource' of type stdin (DEFAULT). | -| test.rs:351:50:351:63 | ...::stdin | Flow source 'StdInSource' of type stdin (DEFAULT). | -| test.rs:360:25:360:43 | ...::open | Flow source 'FileSource' of type file (DEFAULT). | -| test.rs:361:25:361:43 | ...::open | Flow source 'FileSource' of type file (DEFAULT). | -| test.rs:369:25:369:43 | ...::open | Flow source 'FileSource' of type file (DEFAULT). | -| test.rs:377:22:377:35 | ...::stdin | Flow source 'StdInSource' of type stdin (DEFAULT). | -| test.rs:386:16:386:29 | ...::args | Flow source 'CommandLineArgs' of type commandargs (DEFAULT). | +| test.rs:99:18:99:47 | ...::connect | Flow source 'RemoteSource' of type remote (DEFAULT). | +| test.rs:113:31:113:42 | send_request | Flow source 'RemoteSource' of type remote (DEFAULT). | +| test.rs:120:31:120:42 | send_request | Flow source 'RemoteSource' of type remote (DEFAULT). | +| test.rs:210:22:210:35 | ...::stdin | Flow source 'StdInSource' of type stdin (DEFAULT). | +| test.rs:216:22:216:35 | ...::stdin | Flow source 'StdInSource' of type stdin (DEFAULT). | +| test.rs:222:22:222:35 | ...::stdin | Flow source 'StdInSource' of type stdin (DEFAULT). | +| test.rs:228:22:228:35 | ...::stdin | Flow source 'StdInSource' of type stdin (DEFAULT). | +| test.rs:234:9:234:22 | ...::stdin | Flow source 'StdInSource' of type stdin (DEFAULT). | +| test.rs:238:17:238:30 | ...::stdin | Flow source 'StdInSource' of type stdin (DEFAULT). | +| test.rs:245:50:245:63 | ...::stdin | Flow source 'StdInSource' of type stdin (DEFAULT). | +| test.rs:251:46:251:59 | ...::stdin | Flow source 'StdInSource' of type stdin (DEFAULT). | +| test.rs:258:50:258:63 | ...::stdin | Flow source 'StdInSource' of type stdin (DEFAULT). | +| test.rs:265:50:265:63 | ...::stdin | Flow source 'StdInSource' of type stdin (DEFAULT). | +| test.rs:272:56:272:69 | ...::stdin | Flow source 'StdInSource' of type stdin (DEFAULT). | +| test.rs:280:46:280:59 | ...::stdin | Flow source 'StdInSource' of type stdin (DEFAULT). | +| test.rs:287:46:287:59 | ...::stdin | Flow source 'StdInSource' of type stdin (DEFAULT). | +| test.rs:293:46:293:59 | ...::stdin | Flow source 'StdInSource' of type stdin (DEFAULT). | +| test.rs:308:25:308:40 | ...::stdin | Flow source 'StdInSource' of type stdin (DEFAULT). | +| test.rs:315:25:315:40 | ...::stdin | Flow source 'StdInSource' of type stdin (DEFAULT). | +| test.rs:322:25:322:40 | ...::stdin | Flow source 'StdInSource' of type stdin (DEFAULT). | +| test.rs:329:25:329:40 | ...::stdin | Flow source 'StdInSource' of type stdin (DEFAULT). | +| test.rs:336:25:336:40 | ...::stdin | Flow source 'StdInSource' of type stdin (DEFAULT). | +| test.rs:348:25:348:40 | ...::stdin | Flow source 'StdInSource' of type stdin (DEFAULT). | +| test.rs:357:52:357:67 | ...::stdin | Flow source 'StdInSource' of type stdin (DEFAULT). | +| test.rs:363:48:363:63 | ...::stdin | Flow source 'StdInSource' of type stdin (DEFAULT). | +| test.rs:370:52:370:67 | ...::stdin | Flow source 'StdInSource' of type stdin (DEFAULT). | +| test.rs:377:52:377:67 | ...::stdin | Flow source 'StdInSource' of type stdin (DEFAULT). | +| test.rs:384:58:384:73 | ...::stdin | Flow source 'StdInSource' of type stdin (DEFAULT). | +| test.rs:392:48:392:63 | ...::stdin | Flow source 'StdInSource' of type stdin (DEFAULT). | +| test.rs:407:31:407:43 | ...::read | Flow source 'FileSource' of type file (DEFAULT). | +| test.rs:412:31:412:38 | ...::read | Flow source 'FileSource' of type file (DEFAULT). | +| test.rs:417:22:417:39 | ...::read_to_string | Flow source 'FileSource' of type file (DEFAULT). | +| test.rs:423:22:423:25 | path | Flow source 'FileSource' of type file (DEFAULT). | +| test.rs:424:27:424:35 | file_name | Flow source 'FileSource' of type file (DEFAULT). | +| test.rs:430:22:430:34 | ...::read_link | Flow source 'FileSource' of type file (DEFAULT). | +| test.rs:439:31:439:45 | ...::read | Flow source 'FileSource' of type file (DEFAULT). | +| test.rs:444:31:444:45 | ...::read | Flow source 'FileSource' of type file (DEFAULT). | +| test.rs:449:22:449:46 | ...::read_to_string | Flow source 'FileSource' of type file (DEFAULT). | +| test.rs:455:26:455:29 | path | Flow source 'FileSource' of type file (DEFAULT). | +| test.rs:456:31:456:39 | file_name | Flow source 'FileSource' of type file (DEFAULT). | +| test.rs:462:22:462:41 | ...::read_link | Flow source 'FileSource' of type file (DEFAULT). | +| test.rs:472:20:472:38 | ...::open | Flow source 'FileSource' of type file (DEFAULT). | +| test.rs:506:21:506:39 | ...::open | Flow source 'FileSource' of type file (DEFAULT). | +| test.rs:507:21:507:39 | ...::open | Flow source 'FileSource' of type file (DEFAULT). | +| test.rs:515:21:515:39 | ...::open | Flow source 'FileSource' of type file (DEFAULT). | +| test.rs:527:20:527:40 | ...::open | Flow source 'FileSource' of type file (DEFAULT). | +| test.rs:574:21:574:41 | ...::open | Flow source 'FileSource' of type file (DEFAULT). | +| test.rs:575:21:575:41 | ...::open | Flow source 'FileSource' of type file (DEFAULT). | +| test.rs:583:21:583:41 | ...::open | Flow source 'FileSource' of type file (DEFAULT). | +| test.rs:600:26:600:53 | ...::connect | Flow source 'RemoteSource' of type remote (DEFAULT). | +| test.rs:619:26:619:61 | ...::connect_timeout | Flow source 'RemoteSource' of type remote (DEFAULT). | +| test.rs:671:28:671:57 | ...::connect | Flow source 'RemoteSource' of type remote (DEFAULT). | +| test.rs:753:22:753:49 | ...::connect | Flow source 'RemoteSource' of type remote (DEFAULT). | +| test.rs:775:16:775:29 | ...::args | Flow source 'CommandLineArgs' of type commandargs (DEFAULT). | diff --git a/rust/ql/test/library-tests/dataflow/sources/options.yml b/rust/ql/test/library-tests/dataflow/sources/options.yml index 9b4565f1e1ad..b48be615eb5f 100644 --- a/rust/ql/test/library-tests/dataflow/sources/options.yml +++ b/rust/ql/test/library-tests/dataflow/sources/options.yml @@ -7,3 +7,4 @@ qltest_dependencies: - http = { version = "1.2.0" } - tokio = { version = "1.43.0", features = ["full"] } - futures = { version = "0.3" } + - bytes = { version = "1.10.1" } diff --git a/rust/ql/test/library-tests/dataflow/sources/test.rs b/rust/ql/test/library-tests/dataflow/sources/test.rs index 2ec0b8964ca2..e2cea47b95b3 100644 --- a/rust/ql/test/library-tests/dataflow/sources/test.rs +++ b/rust/ql/test/library-tests/dataflow/sources/test.rs @@ -72,14 +72,15 @@ async fn test_reqwest() -> Result<(), reqwest::Error> { sink(remote_string4); // $ hasTaintFlow="example.com" let remote_string5 = reqwest::get("example.com").await?.text().await?; // $ Alert[rust/summary/taint-sources] - sink(remote_string5); // $ MISSING: hasTaintFlow + sink(remote_string5); // $ hasTaintFlow="example.com" let remote_string6 = reqwest::get("example.com").await?.bytes().await?; // $ Alert[rust/summary/taint-sources] - sink(remote_string6); // $ MISSING: hasTaintFlow + sink(remote_string6); // $ hasTaintFlow="example.com" let mut request1 = reqwest::get("example.com").await?; // $ Alert[rust/summary/taint-sources] + sink(request1.chunk().await?.unwrap()); // $ hasTaintFlow="example.com" while let Some(chunk) = request1.chunk().await? { - sink(chunk); // $ MISSING: hasTaintFlow + sink(chunk); // $ MISSING: hasTaintFlow="example.com" } Ok(()) @@ -95,7 +96,7 @@ async fn test_hyper_http(case: i64) -> Result<(), Box> { // create the connection println!("connecting to {}...", address); - let stream = tokio::net::TcpStream::connect(address).await?; + let stream = tokio::net::TcpStream::connect(address).await?; // $ Alert[rust/summary/taint-sources] let io = hyper_util::rt::TokioIo::new(stream); let (mut sender, conn) = hyper::client::conn::http1::handshake(io).await?; @@ -106,10 +107,10 @@ async fn test_hyper_http(case: i64) -> Result<(), Box> { // make the request println!("sending request..."); - if (case == 0) { + if case == 0 { // simple flow case let request = http::Request::builder().uri(url).body(String::from(""))?; - let mut response = sender.send_request(request).await?; // $ Alert[rust/summary/taint-sources] + let response = sender.send_request(request).await?; // $ Alert[rust/summary/taint-sources] sink(&response); // $ hasTaintFlow=request sink(response); // $ hasTaintFlow=request return Ok(()) @@ -198,6 +199,207 @@ async fn test_hyper_http(case: i64) -> Result<(), Box> { Ok(()) } +use std::io::Read; +use std::io::BufRead; + +fn test_io_stdin() -> std::io::Result<()> { + // --- stdin --- + + { + let mut buffer = [0u8; 100]; + let _bytes = std::io::stdin().read(&mut buffer)?; // $ Alert[rust/summary/taint-sources] + sink(&buffer); // $ hasTaintFlow + } + + { + let mut buffer = Vec::::new(); + let _bytes = std::io::stdin().read_to_end(&mut buffer)?; // $ Alert[rust/summary/taint-sources] + sink(&buffer); // $ MISSING: hasTaintFlow + } + + { + let mut buffer = String::new(); + let _bytes = std::io::stdin().read_to_string(&mut buffer)?; // $ Alert[rust/summary/taint-sources] + sink(&buffer); // $ hasTaintFlow + } + + { + let mut buffer = String::new(); + let _bytes = std::io::stdin().lock().read_to_string(&mut buffer)?; // $ Alert[rust/summary/taint-sources] + sink(&buffer); // $ hasTaintFlow + } + + { + let mut buffer = [0; 100]; + std::io::stdin().read_exact(&mut buffer)?; // $ Alert[rust/summary/taint-sources] + sink(&buffer); // $ hasTaintFlow + } + + for byte in std::io::stdin().bytes() { // $ Alert[rust/summary/taint-sources] + sink(byte); // $ hasTaintFlow + } + + // --- BufReader --- + + { + let mut reader = std::io::BufReader::new(std::io::stdin()); // $ Alert[rust/summary/taint-sources] + let data = reader.fill_buf()?; + sink(&data); // $ hasTaintFlow + } + + { + let reader = std::io::BufReader::new(std::io::stdin()); // $ Alert[rust/summary/taint-sources] + let data = reader.buffer(); + sink(&data); // $ hasTaintFlow + } + + { + let mut buffer = String::new(); + let mut reader = std::io::BufReader::new(std::io::stdin()); // $ Alert[rust/summary/taint-sources] + reader.read_line(&mut buffer)?; + sink(&buffer); // $ hasTaintFlow + } + + { + let mut buffer = Vec::::new(); + let mut reader = std::io::BufReader::new(std::io::stdin()); // $ Alert[rust/summary/taint-sources] + reader.read_until(b',', &mut buffer)?; + sink(&buffer); // $ hasTaintFlow + sink(buffer[0]); // $ hasTaintFlow + } + + { + let mut reader_split = std::io::BufReader::new(std::io::stdin()).split(b','); // $ Alert[rust/summary/taint-sources] + sink(reader_split.next().unwrap().unwrap()); // $ hasTaintFlow + while let Some(chunk) = reader_split.next() { + sink(chunk.unwrap()); // $ MISSING: hasTaintFlow + } + } + + { + let reader = std::io::BufReader::new(std::io::stdin()); // $ Alert[rust/summary/taint-sources] + for line in reader.lines() { + sink(line); // $ hasTaintFlow + } + } + + { + let reader = std::io::BufReader::new(std::io::stdin()); // $ Alert[rust/summary/taint-sources] + let line = reader.lines().nth(1).unwrap(); + sink(line.unwrap().clone()); // $ MISSING: hasTaintFlow + } + + { + let reader = std::io::BufReader::new(std::io::stdin()); // $ Alert[rust/summary/taint-sources] + let lines: Vec<_> = reader.lines().collect(); + sink(lines[1].as_ref().unwrap().clone()); // $ MISSING: hasTaintFlow + } + + Ok(()) +} + +use tokio::io::{AsyncReadExt, AsyncBufReadExt}; + +async fn test_tokio_stdin() -> Result<(), Box> { + + // --- async reading from stdin --- + + { + let mut stdin = tokio::io::stdin(); // $ Alert[rust/summary/taint-sources] + let mut buffer = [0u8; 100]; + let _bytes = stdin.read(&mut buffer).await?; + sink(&buffer); // $ hasTaintFlow + } + + { + let mut stdin = tokio::io::stdin(); // $ Alert[rust/summary/taint-sources] + let mut buffer = Vec::::new(); + let _bytes = stdin.read_to_end(&mut buffer).await?; + sink(&buffer); // $ hasTaintFlow + } + + { + let mut stdin = tokio::io::stdin(); // $ Alert[rust/summary/taint-sources] + let mut buffer = String::new(); + let _bytes = stdin.read_to_string(&mut buffer).await?; + sink(&buffer); // $ hasTaintFlow + } + + { + let mut stdin = tokio::io::stdin(); // $ Alert[rust/summary/taint-sources] + let mut buffer = [0; 100]; + stdin.read_exact(&mut buffer).await?; + sink(&buffer); // $ hasTaintFlow + } + + { + let mut stdin = tokio::io::stdin(); // $ Alert[rust/summary/taint-sources] + let v1 = stdin.read_u8().await?; + let v2 = stdin.read_i16().await?; + let v3 = stdin.read_f32().await?; + let v4 = stdin.read_i64_le().await?; + sink(v1); // $ hasTaintFlow + sink(v2); // $ hasTaintFlow + sink(v3); // $ hasTaintFlow + sink(v4); // $ hasTaintFlow + } + + { + let mut stdin = tokio::io::stdin(); // $ Alert[rust/summary/taint-sources] + let mut buffer = bytes::BytesMut::new(); + stdin.read_buf(&mut buffer).await?; + sink(&buffer); // $ hasTaintFlow + } + + // --- async reading from stdin (BufReader) --- + + { + let mut reader = tokio::io::BufReader::new(tokio::io::stdin()); // $ Alert[rust/summary/taint-sources] + let data = reader.fill_buf().await?; + sink(&data); // $ hasTaintFlow + } + + { + let reader = tokio::io::BufReader::new(tokio::io::stdin()); // $ Alert[rust/summary/taint-sources] + let data = reader.buffer(); + sink(&data); // $ hasTaintFlow + } + + { + let mut buffer = String::new(); + let mut reader = tokio::io::BufReader::new(tokio::io::stdin()); // $ Alert[rust/summary/taint-sources] + reader.read_line(&mut buffer).await?; + sink(&buffer); // $ hasTaintFlow + } + + { + let mut buffer = Vec::::new(); + let mut reader = tokio::io::BufReader::new(tokio::io::stdin()); // $ Alert[rust/summary/taint-sources] + reader.read_until(b',', &mut buffer).await?; + sink(&buffer); // $ hasTaintFlow + sink(buffer[0]); // $ hasTaintFlow + } + + { + let mut reader_split = tokio::io::BufReader::new(tokio::io::stdin()).split(b','); // $ Alert[rust/summary/taint-sources] + sink(reader_split.next_segment().await?.unwrap()); // $ hasTaintFlow + while let Some(chunk) = reader_split.next_segment().await? { + sink(chunk); // $ MISSING: hasTaintFlow + } + } + + { + let reader = tokio::io::BufReader::new(tokio::io::stdin()); // $ Alert[rust/summary/taint-sources] + let mut lines = reader.lines(); + sink(lines.next_line().await?.unwrap()); // $ hasTaintFlow + while let Some(line) = lines.next_line().await? { + sink(line); // $ MISSING: hasTaintFlow + } + } + + Ok(()) +} + use std::fs; fn test_fs() -> Result<(), Box> { @@ -232,40 +434,39 @@ fn test_fs() -> Result<(), Box> { Ok(()) } -use std::io::Read; -use std::io::BufRead; - -fn test_io_fs() -> std::io::Result<()> { - // --- stdin --- - +async fn test_tokio_fs() -> Result<(), Box> { { - let mut buffer = [0u8; 100]; - let _bytes = std::io::stdin().read(&mut buffer)?; // $ Alert[rust/summary/taint-sources] - sink(&buffer); // $ hasTaintFlow + let buffer: Vec = tokio::fs::read("file.bin").await?; // $ Alert[rust/summary/taint-sources] + sink(buffer); // $ hasTaintFlow="file.bin" } { - let mut buffer = Vec::::new(); - let _bytes = std::io::stdin().read_to_end(&mut buffer)?; // $ Alert[rust/summary/taint-sources] - sink(&buffer); // $ MISSING: hasTaintFlow + let buffer: Vec = tokio::fs::read("file.bin").await?; // $ Alert[rust/summary/taint-sources] + sink(buffer); // $ hasTaintFlow="file.bin" } { - let mut buffer = String::new(); - let _bytes = std::io::stdin().read_to_string(&mut buffer)?; // $ Alert[rust/summary/taint-sources] - sink(&buffer); // $ hasTaintFlow + let buffer = tokio::fs::read_to_string("file.txt").await?; // $ Alert[rust/summary/taint-sources] + sink(buffer); // $ hasTaintFlow="file.txt" } - { - let mut buffer = [0; 100]; - std::io::stdin().read_exact(&mut buffer)?; // $ Alert[rust/summary/taint-sources] - sink(&buffer); // $ hasTaintFlow + let mut read_dir = tokio::fs::read_dir("directory").await?; + for entry in read_dir.next_entry().await? { + let path = entry.path(); // $ Alert[rust/summary/taint-sources] + let file_name = entry.file_name(); // $ Alert[rust/summary/taint-sources] + sink(path); // $ hasTaintFlow + sink(file_name); // $ hasTaintFlow } - for byte in std::io::stdin().bytes() { // $ Alert[rust/summary/taint-sources] - sink(byte); // $ hasTaintFlow + { + let target = tokio::fs::read_link("symlink.txt").await?; // $ Alert[rust/summary/taint-sources] + sink(target); // $ hasTaintFlow="symlink.txt" } + Ok(()) +} + +fn test_io_file() -> std::io::Result<()> { // --- file --- let mut file = std::fs::File::open("file.txt")?; // $ Alert[rust/summary/taint-sources] @@ -298,99 +499,355 @@ fn test_io_fs() -> std::io::Result<()> { sink(byte); // $ hasTaintFlow="file.txt" } - // --- BufReader --- + // --- misc operations --- { - let mut reader = std::io::BufReader::new(std::io::stdin()); // $ Alert[rust/summary/taint-sources] - let data = reader.fill_buf()?; - sink(&data); // $ hasTaintFlow + let mut buffer = String::new(); + let file1 = std::fs::File::open("file.txt")?; // $ Alert[rust/summary/taint-sources] + let file2 = std::fs::File::open("another_file.txt")?; // $ Alert[rust/summary/taint-sources] + let mut reader = file1.chain(file2); + reader.read_to_string(&mut buffer)?; + sink(&buffer); // $ hasTaintFlow="file.txt" hasTaintFlow="another_file.txt" } { - let mut reader = std::io::BufReader::new(std::io::stdin()); // $ Alert[rust/summary/taint-sources] - let data = reader.buffer(); - sink(&data); // $ hasTaintFlow + let mut buffer = String::new(); + let file1 = std::fs::File::open("file.txt")?; // $ Alert[rust/summary/taint-sources] + let mut reader = file1.take(100); + reader.read_to_string(&mut buffer)?; + sink(&buffer); // $ hasTaintFlow="file.txt" } + Ok(()) +} + +async fn test_tokio_file() -> std::io::Result<()> { + // --- file --- + + let mut file = tokio::fs::File::open("file.txt").await?; // $ Alert[rust/summary/taint-sources] + { - let mut buffer = String::new(); - let mut reader = std::io::BufReader::new(std::io::stdin()); // $ Alert[rust/summary/taint-sources] - reader.read_line(&mut buffer)?; - sink(&buffer); // $ hasTaintFlow + let mut buffer = [0u8; 100]; + let _bytes = file.read(&mut buffer).await?; + sink(&buffer); // $ hasTaintFlow="file.txt" } { let mut buffer = Vec::::new(); - let mut reader = std::io::BufReader::new(std::io::stdin()); // $ Alert[rust/summary/taint-sources] - reader.read_until(b',', &mut buffer)?; - sink(&buffer); // $ hasTaintFlow + let _bytes = file.read_to_end(&mut buffer).await?; + sink(&buffer); // $ hasTaintFlow="file.txt" } { - let mut buffer = Vec::::new(); - let mut reader_split = std::io::BufReader::new(std::io::stdin()).split(b','); // $ Alert[rust/summary/taint-sources] - while let Some(chunk) = reader_split.next() { - sink(chunk.unwrap()); // $ MISSING: hasTaintFlow - } + let mut buffer = String::new(); + let _bytes = file.read_to_string(&mut buffer).await?; + sink(&buffer); // $ hasTaintFlow="file.txt" } { - let mut reader = std::io::BufReader::new(std::io::stdin()); // $ Alert[rust/summary/taint-sources] - for line in reader.lines() { - sink(line); // $ hasTaintFlow - } + let mut buffer = [0; 100]; + file.read_exact(&mut buffer).await?; + sink(&buffer); // $ hasTaintFlow="file.txt" } { - let mut reader = std::io::BufReader::new(std::io::stdin()); // $ Alert[rust/summary/taint-sources] - let line = reader.lines().nth(1).unwrap(); - sink(line.unwrap().clone()); // $ MISSING: hasTaintFlow + let v1 = file.read_u8().await?; + let v2 = file.read_i16().await?; + let v3 = file.read_f32().await?; + let v4 = file.read_i64_le().await?; + sink(v1); // $ hasTaintFlow="file.txt" + sink(v2); // $ hasTaintFlow="file.txt" + sink(v3); // $ hasTaintFlow="file.txt" + sink(v4); // $ hasTaintFlow="file.txt" } { - let mut reader = std::io::BufReader::new(std::io::stdin()); // $ Alert[rust/summary/taint-sources] - let lines: Vec<_> = reader.lines().collect(); - sink(lines[1].as_ref().unwrap().clone()); // $ MISSING: hasTaintFlow + let mut buffer = bytes::BytesMut::new(); + file.read_buf(&mut buffer).await?; + sink(&buffer); // $ hasTaintFlow="file.txt" } // --- misc operations --- { let mut buffer = String::new(); - let mut file1 = std::fs::File::open("file.txt")?; // $ Alert[rust/summary/taint-sources] - let mut file2 = std::fs::File::open("another_file.txt")?; // $ Alert[rust/summary/taint-sources] + let file1 = tokio::fs::File::open("file.txt").await?; // $ Alert[rust/summary/taint-sources] + let file2 = tokio::fs::File::open("another_file.txt").await?; // $ Alert[rust/summary/taint-sources] let mut reader = file1.chain(file2); - reader.read_to_string(&mut buffer)?; + reader.read_to_string(&mut buffer).await?; sink(&buffer); // $ hasTaintFlow="file.txt" hasTaintFlow="another_file.txt" } { let mut buffer = String::new(); - let mut file1 = std::fs::File::open("file.txt")?; // $ Alert[rust/summary/taint-sources] + let file1 = tokio::fs::File::open("file.txt").await?; // $ Alert[rust/summary/taint-sources] let mut reader = file1.take(100); - reader.read_to_string(&mut buffer)?; + reader.read_to_string(&mut buffer).await?; sink(&buffer); // $ hasTaintFlow="file.txt" } - { - let mut buffer = String::new(); - let _bytes = std::io::stdin().lock().read_to_string(&mut buffer)?; // $ Alert[rust/summary/taint-sources] - sink(&buffer); // $ hasTaintFlow + Ok(()) +} + +use std::net::ToSocketAddrs; + +async fn test_std_tcpstream(case: i64) -> std::io::Result<()> { + // using std::net to fetch a web page + let address = "example.com:80"; + + if case == 1 { + // create the connection + let mut stream = std::net::TcpStream::connect(address)?; // $ Alert[rust/summary/taint-sources] + + // send request + let _ = stream.write_all(b"GET / HTTP/1.1\nHost:example.com\n\n"); + + // read response + let mut buffer = vec![0; 32 * 1024]; + let _ = stream.read(&mut buffer); + + println!("data = {:?}", buffer); + sink(&buffer); // $ hasTaintFlow=address + sink(buffer[0]); // $ hasTaintFlow=address + + let buffer_string = String::from_utf8_lossy(&buffer); + println!("string = {}", buffer_string); + sink(buffer_string); // $ MISSING: hasTaintFlow + } else { + // create the connection + let sock_addr = address.to_socket_addrs().unwrap().next().unwrap(); + let mut stream = std::net::TcpStream::connect_timeout(&sock_addr, std::time::Duration::new(1, 0))?; // $ Alert[rust/summary/taint-sources] + + // send request + let _ = stream.write_all(b"GET / HTTP/1.1\nHost:example.com\n\n"); + + // read response + match case { + 2 => { + let mut reader = std::io::BufReader::new(stream).take(256); + let mut line = String::new(); + loop { + match reader.read_line(&mut line) { + Ok(0) => { + println!("end"); + break; + } + Ok(_n) => { + println!("line = {}", line); + sink(&line); // $ hasTaintFlow=&sock_addr + line.clear(); + } + Err(e) => { + println!("error: {}", e); + break; + } + } + } + } + 3 => { + let reader = std::io::BufReader::new(stream.try_clone()?).take(256); + for line in reader.lines() { // $ MISSING: Alert[rust/summary/taint-sources] + if let Ok(string) = line { + println!("line = {}", string); + sink(string); // $ MISSING: hasTaintFlow + } + } + } + _ => {} + } } Ok(()) } +use tokio::io::AsyncWriteExt; + +async fn test_tokio_tcpstream(case: i64) -> std::io::Result<()> { + // using tokio::io to fetch a web page + let address = "example.com:80"; + + // create the connection + println!("connecting to {}...", address); + let mut tokio_stream = tokio::net::TcpStream::connect(address).await?; // $ Alert[rust/summary/taint-sources] + + // send request + tokio_stream.write_all(b"GET / HTTP/1.1\nHost:example.com\n\n").await?; + + if case == 1 { + // peek response + let mut buffer1 = vec![0; 2 * 1024]; + let _ = tokio_stream.peek(&mut buffer1).await?; + + // read response + let mut buffer2 = vec![0; 2 * 1024]; + let n2 = tokio_stream.read(&mut buffer2).await?; + + println!("buffer1 = {:?}", buffer1); + sink(&buffer1); // $ hasTaintFlow=address + sink(buffer1[0]); // $ hasTaintFlow=address + + println!("buffer2 = {:?}", buffer2); + sink(&buffer2); // $ hasTaintFlow=address + sink(buffer2[0]); // $ hasTaintFlow=address + + let buffer_string = String::from_utf8_lossy(&buffer2[..n2]); + println!("string = {}", buffer_string); + sink(buffer_string); // $ MISSING: hasTaintFlow + } else if case == 2 { + let mut buffer = [0; 2 * 1024]; + loop { + match tokio_stream.try_read(&mut buffer) { + Ok(0) => { + println!("end"); + break; + } + Ok(_n) => { + println!("buffer = {:?}", buffer); + sink(&buffer); // $ hasTaintFlow=address + break; // (or we could wait for more data) + } + Err(ref e) if e.kind() == std::io::ErrorKind::WouldBlock => { + // wait... + continue; + } + Err(e) => { + println!("error: {}", e); + break; + } + } + } + } else { + let mut buffer = Vec::new(); + loop { + match tokio_stream.try_read_buf(&mut buffer) { + Ok(0) => { + println!("end"); + break; + } + Ok(_n) => { + println!("buffer = {:?}", buffer); + sink(&buffer); // $ hasTaintFlow=address + break; // (or we could wait for more data) + } + Err(ref e) if e.kind() == std::io::ErrorKind::WouldBlock => { + // wait... + continue; + } + Err(e) => { + println!("error: {}", e); + break; + } + } + } + } + + Ok(()) +} + +async fn test_std_to_tokio_tcpstream() -> std::io::Result<()> { + // using tokio::io to fetch a web page + let address = "example.com:80"; + + // create the connection + println!("connecting to {}...", address); + let std_stream = std::net::TcpStream::connect(address)?; // $ Alert[rust/summary/taint-sources] + + // convert to tokio stream + std_stream.set_nonblocking(true)?; + let mut tokio_stream = tokio::net::TcpStream::from_std(std_stream)?; + + // send request + tokio_stream.write_all(b"GET / HTTP/1.1\nHost:example.com\n\n").await?; + + // read response + let mut buffer = vec![0; 32 * 1024]; + let _n = tokio_stream.read(&mut buffer).await?; // $ MISSING: Alert[rust/summary/taint-sources] + + println!("data = {:?}", buffer); + sink(&buffer); // $ MISSING: hasTaintFlow + sink(buffer[0]); // $ MISSING: hasTaintFlow + + Ok(()) +} + #[tokio::main] async fn main() -> Result<(), Box> { let case = std::env::args().nth(1).unwrap_or(String::from("1")).parse::().unwrap(); // $ Alert[rust/summary/taint-sources] + println!("test_env_vars..."); + test_env_vars(); + + /*println!("test_env_args..."); + test_env_args();*/ + + println!("test_env_dirs..."); + test_env_dirs(); + + /*println!("test_reqwest..."); + match futures::executor::block_on(test_reqwest()) { + Ok(_) => println!("complete"), + Err(e) => println!("error: {}", e), + }*/ + println!("test_hyper_http..."); match futures::executor::block_on(test_hyper_http(case)) { Ok(_) => println!("complete"), Err(e) => println!("error: {}", e), } - println!(""); + + /*println!("test_io_stdin..."); + match test_io_stdin() { + Ok(_) => println!("complete"), + Err(e) => println!("error: {}", e), + } + + println!("test_tokio_stdin..."); + match futures::executor::block_on(test_tokio_stdin()) { + Ok(_) => println!("complete"), + Err(e) => println!("error: {}", e), + }*/ + + println!("test_fs..."); + match test_fs() { + Ok(_) => println!("complete"), + Err(e) => println!("error: {}", e), + } + + println!("test_tokio_fs..."); + match futures::executor::block_on(test_tokio_fs()) { + Ok(_) => println!("complete"), + Err(e) => println!("error: {}", e), + } + + println!("test_io_file..."); + match test_io_file() { + Ok(_) => println!("complete"), + Err(e) => println!("error: {}", e), + } + + println!("test_tokio_file..."); + match futures::executor::block_on(test_tokio_file()) { + Ok(_) => println!("complete"), + Err(e) => println!("error: {}", e), + } + + println!("test_std_tcpstream..."); + match futures::executor::block_on(test_std_tcpstream(case)) { + Ok(_) => println!("complete"), + Err(e) => println!("error: {}", e), + } + + println!("test_tokio_tcpstream..."); + match futures::executor::block_on(test_tokio_tcpstream(case)) { + Ok(_) => println!("complete"), + Err(e) => println!("error: {}", e), + } + + println!("test_std_to_tokio_tcpstream..."); + match futures::executor::block_on(test_std_to_tokio_tcpstream()) { + Ok(_) => println!("complete"), + Err(e) => println!("error: {}", e), + } Ok(()) }