-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Rust: Update legacy MaD models 4 #19948
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
7ef5586
2195f0b
a1e9a4e
c7de873
f57d691
3dabd51
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
extensions: | ||
- addsTo: | ||
pack: codeql/rust-all | ||
extensible: sourceModelDeprecated | ||
extensible: sourceModel | ||
data: | ||
- ["repo:https://github.com/async-rs/async-std:async-std", "<crate::net::tcp::stream::TcpStream>::connect", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "remote", "manual"] | ||
- ["<async_std::net::tcp::stream::TcpStream>::connect", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "remote", "manual"] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
extensions: | ||
- addsTo: | ||
pack: codeql/rust-all | ||
extensible: summaryModelDeprecated | ||
extensible: summaryModel | ||
data: | ||
- ["repo:https://github.com/rust-lang/futures-rs:futures-executor", "crate::local_pool::block_on", "Argument[0]", "ReturnValue", "value", "manual"] | ||
- ["repo:https://github.com/rust-lang/futures-rs:futures-util", "<crate::io::buf_reader::BufReader>::new", "Argument[0]", "ReturnValue", "taint", "manual"] | ||
- ["repo:https://github.com/rust-lang/futures-rs:futures-util", "crate::io::AsyncReadExt::read", "Argument[self]", "Argument[0].Reference", "taint", "manual"] | ||
- ["repo:https://github.com/rust-lang/futures-rs:futures-util", "crate::io::AsyncReadExt::read", "Argument[self].Reference", "Argument[0].Reference", "taint", "manual"] | ||
- ["repo:https://github.com/rust-lang/futures-rs:futures-util", "crate::io::AsyncReadExt::read_to_end", "Argument[self]", "Argument[0].Reference", "taint", "manual"] | ||
- ["repo:https://github.com/rust-lang/futures-rs:futures-util", "crate::io::AsyncReadExt::read_to_end", "Argument[self].Reference", "Argument[0].Reference", "taint", "manual"] | ||
- ["repo:https://github.com/rust-lang/futures-rs:futures-util", "crate::io::AsyncBufReadExt::read_line", "Argument[self]", "Argument[0].Reference", "taint", "manual"] | ||
- ["repo:https://github.com/rust-lang/futures-rs:futures-util", "crate::io::AsyncBufReadExt::read_line", "Argument[self].Reference", "Argument[0].Reference", "taint", "manual"] | ||
- ["repo:https://github.com/rust-lang/futures-rs:futures-util", "crate::io::AsyncBufReadExt::read_until", "Argument[self]", "Argument[1].Reference", "taint", "manual"] | ||
- ["repo:https://github.com/rust-lang/futures-rs:futures-util", "crate::io::AsyncBufReadExt::read_until", "Argument[self].Reference", "Argument[1].Reference", "taint", "manual"] | ||
- ["repo:https://github.com/rust-lang/futures-rs:futures-util", "crate::io::AsyncBufReadExt::fill_buf", "Argument[self]", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"] | ||
- ["repo:https://github.com/rust-lang/futures-rs:futures-util", "crate::io::AsyncBufReadExt::lines", "Argument[self]", "ReturnValue", "taint", "manual"] | ||
- ["repo:https://github.com/rust-lang/futures-rs:futures-util", "crate::stream::stream::StreamExt::next", "Argument[self]", "ReturnValue.Future.Field[core::option::Option::Some(0)]", "taint", "manual"] | ||
- ["repo:https://github.com/rust-lang/futures-rs:futures-util", "<crate::io::buf_reader::BufReader as crate::if_std::AsyncBufRead>::poll_fill_buf", "Argument[self].Reference", "ReturnValue.Field[core::task::poll::Poll::Ready(0)].Field[core::result::Result::Ok(0)]", "taint", "manual"] | ||
- ["futures_executor::local_pool::block_on", "Argument[0]", "ReturnValue", "value", "manual"] | ||
- ["<futures_util::io::buf_reader::BufReader>::new", "Argument[0]", "ReturnValue", "taint", "manual"] | ||
- ["futures-util::io::AsyncReadExt::read", "Argument[self]", "Argument[0].Reference", "taint", "manual"] | ||
- ["futures-util::io::AsyncReadExt::read", "Argument[self].Reference", "Argument[0].Reference", "taint", "manual"] | ||
- ["futures-util::io::AsyncReadExt::read_to_end", "Argument[self]", "Argument[0].Reference", "taint", "manual"] | ||
- ["futures-util::io::AsyncReadExt::read_to_end", "Argument[self].Reference", "Argument[0].Reference", "taint", "manual"] | ||
- ["futures-util::io::AsyncBufReadExt::read_line", "Argument[self]", "Argument[0].Reference", "taint", "manual"] | ||
- ["futures-util::io::AsyncBufReadExt::read_line", "Argument[self].Reference", "Argument[0].Reference", "taint", "manual"] | ||
- ["futures-util::io::AsyncBufReadExt::read_until", "Argument[self]", "Argument[1].Reference", "taint", "manual"] | ||
- ["futures-util::io::AsyncBufReadExt::read_until", "Argument[self].Reference", "Argument[1].Reference", "taint", "manual"] | ||
- ["futures-util::io::AsyncBufReadExt::fill_buf", "Argument[self]", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"] | ||
- ["futures-util::io::AsyncBufReadExt::lines", "Argument[self]", "ReturnValue", "taint", "manual"] | ||
- ["<alloc::boxed::Box as core::iter::traits::iterator::Iterator>::next", "Argument[self]", "ReturnValue.Future.Field[core::option::Option::Some(0)]", "taint", "manual"] | ||
- ["<futures-util::io::buf_reader::BufReader as futures_io::if_std::AsyncBufRead>::poll_fill_buf", "Argument[self].Reference", "ReturnValue.Field[core::task::poll::Poll::Ready(0)].Field[core::result::Result::Ok(0)]", "taint", "manual"] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,19 @@ | ||
extensions: | ||
- addsTo: | ||
pack: codeql/rust-all | ||
extensible: sourceModelDeprecated | ||
extensible: sourceModel | ||
data: | ||
- ["repo:https://github.com/rust-lang/libc:libc", "::free", "Argument[0]", "pointer-invalidate", "manual"] | ||
- ["libc::unix::free", "Argument[0]", "pointer-invalidate", "manual"] | ||
- ["libc::windows::free", "Argument[0]", "pointer-invalidate", "manual"] | ||
- addsTo: | ||
pack: codeql/rust-all | ||
extensible: sinkModelDeprecated | ||
extensible: sinkModel | ||
data: | ||
- ["repo:https://github.com/rust-lang/libc:libc", "::malloc", "Argument[0]", "alloc-size", "manual"] | ||
- ["repo:https://github.com/rust-lang/libc:libc", "::aligned_alloc", "Argument[1]", "alloc-size", "manual"] | ||
- ["repo:https://github.com/rust-lang/libc:libc", "::calloc", "Argument[0,1]", "alloc-size", "manual"] | ||
- ["repo:https://github.com/rust-lang/libc:libc", "::realloc", "Argument[1]", "alloc-size", "manual"] | ||
- ["libc::unix::malloc", "Argument[0]", "alloc-size", "manual"] | ||
- ["libc::windows::malloc", "Argument[0]", "alloc-size", "manual"] | ||
- ["libc::unix::aligned_alloc", "Argument[1]", "alloc-size", "manual"] | ||
- ["libc::windows::aligned_alloc", "Argument[1]", "alloc-size", "manual"] | ||
- ["libc::unix::calloc", "Argument[0,1]", "alloc-size", "manual"] | ||
- ["libc::windows::calloc", "Argument[0,1]", "alloc-size", "manual"] | ||
- ["libc::unix::realloc", "Argument[1]", "alloc-size", "manual"] | ||
- ["libc::windows::realloc", "Argument[1]", "alloc-size", "manual"] |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,7 +43,7 @@ async fn test_futures_rustls_futures_io() -> io::Result<()> { | |
// using the `AsyncReadExt::read` extension method (higher-level) | ||
let mut buffer1 = [0u8; 64]; | ||
let bytes_read1 = futures::io::AsyncReadExt::read(&mut reader, &mut buffer1).await?; | ||
sink(&buffer1[..bytes_read1]); // $ hasTaintFlow=url | ||
sink(&buffer1[..bytes_read1]); // $ MISSING: hasTaintFlow=url | ||
|
||
let mut buffer2 = [0u8; 64]; | ||
let bytes_read2 = reader.read(&mut buffer2).await?; // we cannot resolve the `read` call, which comes from `impl<R: AsyncRead + ?Sized> AsyncReadExt for R {}` in `async_read_ext.rs` | ||
|
@@ -61,16 +61,16 @@ async fn test_futures_rustls_futures_io() -> io::Result<()> { | |
let mut cx = Context::from_waker(futures::task::noop_waker_ref()); | ||
let buffer = pinned.poll_fill_buf(&mut cx); | ||
if let Poll::Ready(Ok(buf)) = buffer { | ||
sink(&buffer); // $ hasTaintFlow=url | ||
sink(&buffer); // $ MISSING: hasTaintFlow=url | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Currently the computed canonical path for this function is There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hmm the |
||
sink(buf); // $ MISSING: hasTaintFlow=url | ||
} | ||
|
||
// using the `AsyncBufRead` trait (alternative syntax) | ||
let buffer2 = Pin::new(&mut reader2).poll_fill_buf(&mut cx); | ||
match (buffer2) { | ||
Poll::Ready(Ok(buf)) => { | ||
sink(&buffer2); // $ hasTaintFlow=url | ||
sink(buf); // $ hasTaintFlow=url | ||
sink(&buffer2); // $ MISSING: hasTaintFlow=url | ||
sink(buf); // $ MISSING: hasTaintFlow=url | ||
} | ||
_ => { | ||
// ... | ||
|
@@ -101,7 +101,7 @@ async fn test_futures_rustls_futures_io() -> io::Result<()> { | |
// using the `AsyncReadExt::read` extension method (higher-level) | ||
let mut buffer1 = [0u8; 64]; | ||
let bytes_read1 = futures::io::AsyncReadExt::read(&mut reader2, &mut buffer1).await?; | ||
sink(&buffer1[..bytes_read1]); // $ hasTaintFlow=url | ||
sink(&buffer1[..bytes_read1]); // $ MISSING: hasTaintFlow=url | ||
|
||
let mut buffer2 = [0u8; 64]; | ||
let bytes_read2 = reader2.read(&mut buffer2).await?; // we cannot resolve the `read` call, which comes from `impl<R: AsyncRead + ?Sized> AsyncReadExt for R {}` in `async_read_ext.rs` | ||
|
@@ -114,7 +114,7 @@ async fn test_futures_rustls_futures_io() -> io::Result<()> { | |
sink(&pinned); // $ hasTaintFlow=url | ||
let mut cx = Context::from_waker(futures::task::noop_waker_ref()); | ||
let buffer = pinned.poll_fill_buf(&mut cx); | ||
sink(&buffer); // $ hasTaintFlow=url | ||
sink(&buffer); // $ MISSING: hasTaintFlow=url | ||
if let Poll::Ready(Ok(buf)) = buffer { | ||
sink(buf); // $ MISSING: hasTaintFlow=url | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should be
futures_util
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually might need to be
<_ as futures_util::io::AsyncReadExt>::read
etc.