Rust: Split off sources/stdin test.

This commit is contained in:
Geoffrey White
2025-10-21 16:12:33 +01:00
parent 0cc9331abf
commit 81132beec0
8 changed files with 1162 additions and 213 deletions

View File

@@ -0,0 +1,390 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 4
[[package]]
name = "bitflags"
version = "2.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "812e12b5285cc515a9c72a5c1d3b6d46a19dac5acfef5265968c166106e31dd3"
[[package]]
name = "bytes"
version = "1.10.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a"
[[package]]
name = "cfg-if"
version = "1.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801"
[[package]]
name = "futures"
version = "0.3.31"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876"
dependencies = [
"futures-channel",
"futures-core",
"futures-executor",
"futures-io",
"futures-sink",
"futures-task",
"futures-util",
]
[[package]]
name = "futures-channel"
version = "0.3.31"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10"
dependencies = [
"futures-core",
"futures-sink",
]
[[package]]
name = "futures-core"
version = "0.3.31"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e"
[[package]]
name = "futures-executor"
version = "0.3.31"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f"
dependencies = [
"futures-core",
"futures-task",
"futures-util",
]
[[package]]
name = "futures-io"
version = "0.3.31"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6"
[[package]]
name = "futures-macro"
version = "0.3.31"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650"
dependencies = [
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "futures-sink"
version = "0.3.31"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7"
[[package]]
name = "futures-task"
version = "0.3.31"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988"
[[package]]
name = "futures-util"
version = "0.3.31"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81"
dependencies = [
"futures-channel",
"futures-core",
"futures-io",
"futures-macro",
"futures-sink",
"futures-task",
"memchr",
"pin-project-lite",
"pin-utils",
"slab",
]
[[package]]
name = "libc"
version = "0.2.177"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2874a2af47a2325c2001a6e6fad9b16a53b802102b528163885171cf92b15976"
[[package]]
name = "lock_api"
version = "0.4.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "224399e74b87b5f3557511d98dff8b14089b3dadafcab6bb93eab67d3aace965"
dependencies = [
"scopeguard",
]
[[package]]
name = "memchr"
version = "2.7.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273"
[[package]]
name = "mio"
version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "69d83b0086dc8ecf3ce9ae2874b2d1290252e2a30720bea58a5c6639b0092873"
dependencies = [
"libc",
"wasi",
"windows-sys 0.61.2",
]
[[package]]
name = "parking_lot"
version = "0.12.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "93857453250e3077bd71ff98b6a65ea6621a19bb0f559a85248955ac12c45a1a"
dependencies = [
"lock_api",
"parking_lot_core",
]
[[package]]
name = "parking_lot_core"
version = "0.9.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1"
dependencies = [
"cfg-if",
"libc",
"redox_syscall",
"smallvec",
"windows-link",
]
[[package]]
name = "pin-project-lite"
version = "0.2.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b"
[[package]]
name = "pin-utils"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184"
[[package]]
name = "proc-macro2"
version = "1.0.101"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "89ae43fd86e4158d6db51ad8e2b80f313af9cc74f5c0e03ccb87de09998732de"
dependencies = [
"unicode-ident",
]
[[package]]
name = "quote"
version = "1.0.41"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ce25767e7b499d1b604768e7cde645d14cc8584231ea6b295e9c9eb22c02e1d1"
dependencies = [
"proc-macro2",
]
[[package]]
name = "redox_syscall"
version = "0.5.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d"
dependencies = [
"bitflags",
]
[[package]]
name = "scopeguard"
version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
[[package]]
name = "signal-hook-registry"
version = "1.4.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b2a4719bff48cee6b39d12c020eeb490953ad2443b7055bd0b21fca26bd8c28b"
dependencies = [
"libc",
]
[[package]]
name = "slab"
version = "0.4.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7a2ae44ef20feb57a68b23d846850f861394c2e02dc425a50098ae8c90267589"
[[package]]
name = "smallvec"
version = "1.15.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03"
[[package]]
name = "socket2"
version = "0.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "17129e116933cf371d018bb80ae557e889637989d8638274fb25622827b03881"
dependencies = [
"libc",
"windows-sys 0.60.2",
]
[[package]]
name = "syn"
version = "2.0.107"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2a26dbd934e5451d21ef060c018dae56fc073894c5a7896f882928a76e6d081b"
dependencies = [
"proc-macro2",
"quote",
"unicode-ident",
]
[[package]]
name = "test"
version = "0.0.1"
dependencies = [
"bytes",
"futures",
"tokio",
]
[[package]]
name = "tokio"
version = "1.48.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ff360e02eab121e0bc37a2d3b4d4dc622e6eda3a8e5253d5435ecf5bd4c68408"
dependencies = [
"bytes",
"libc",
"mio",
"parking_lot",
"pin-project-lite",
"signal-hook-registry",
"socket2",
"tokio-macros",
"windows-sys 0.61.2",
]
[[package]]
name = "tokio-macros"
version = "2.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "af407857209536a95c8e56f8231ef2c2e2aff839b22e07a1ffcbc617e9db9fa5"
dependencies = [
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "unicode-ident"
version = "1.0.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "462eeb75aeb73aea900253ce739c8e18a67423fadf006037cd3ff27e82748a06"
[[package]]
name = "wasi"
version = "0.11.1+wasi-snapshot-preview1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b"
[[package]]
name = "windows-link"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5"
[[package]]
name = "windows-sys"
version = "0.60.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb"
dependencies = [
"windows-targets",
]
[[package]]
name = "windows-sys"
version = "0.61.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc"
dependencies = [
"windows-link",
]
[[package]]
name = "windows-targets"
version = "0.53.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4945f9f551b88e0d65f3db0bc25c33b8acea4d9e41163edf90dcd0b19f9069f3"
dependencies = [
"windows-link",
"windows_aarch64_gnullvm",
"windows_aarch64_msvc",
"windows_i686_gnu",
"windows_i686_gnullvm",
"windows_i686_msvc",
"windows_x86_64_gnu",
"windows_x86_64_gnullvm",
"windows_x86_64_msvc",
]
[[package]]
name = "windows_aarch64_gnullvm"
version = "0.53.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53"
[[package]]
name = "windows_aarch64_msvc"
version = "0.53.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006"
[[package]]
name = "windows_i686_gnu"
version = "0.53.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "960e6da069d81e09becb0ca57a65220ddff016ff2d6af6a223cf372a506593a3"
[[package]]
name = "windows_i686_gnullvm"
version = "0.53.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c"
[[package]]
name = "windows_i686_msvc"
version = "0.53.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2"
[[package]]
name = "windows_x86_64_gnu"
version = "0.53.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499"
[[package]]
name = "windows_x86_64_gnullvm"
version = "0.53.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1"
[[package]]
name = "windows_x86_64_msvc"
version = "0.53.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650"

View File

@@ -0,0 +1,484 @@
models
| 1 | Source: std::io::stdio::stdin; ReturnValue; stdin |
| 2 | Source: tokio::io::stdin::stdin; ReturnValue; stdin |
| 3 | Summary: <_ as core::iter::traits::iterator::Iterator>::next; Argument[self].Element; ReturnValue.Field[core::option::Option::Some(0)].Field[core::result::Result::Ok(0)]; value |
| 4 | Summary: <_ as std::io::BufRead>::fill_buf; Argument[self]; ReturnValue.Field[core::result::Result::Ok(0)]; taint |
| 5 | Summary: <_ as std::io::BufRead>::lines; Argument[self]; ReturnValue; taint |
| 6 | Summary: <_ as std::io::BufRead>::read_line; Argument[self]; Argument[0].Reference; taint |
| 7 | Summary: <_ as std::io::BufRead>::read_until; Argument[self]; Argument[1].Reference; taint |
| 8 | Summary: <_ as std::io::BufRead>::split; Argument[self]; ReturnValue; taint |
| 9 | Summary: <_ as std::io::Read>::bytes; Argument[self]; ReturnValue; taint |
| 10 | Summary: <_ as std::io::Read>::read; Argument[self]; Argument[0].Reference; taint |
| 11 | Summary: <_ as std::io::Read>::read_exact; Argument[self]; Argument[0].Reference; taint |
| 12 | Summary: <_ as std::io::Read>::read_to_end; Argument[self]; Argument[0].Reference; taint |
| 13 | Summary: <_ as std::io::Read>::read_to_string; Argument[self]; Argument[0].Reference; taint |
| 14 | Summary: <_ as tokio::io::util::async_buf_read_ext::AsyncBufReadExt>::fill_buf; Argument[self]; ReturnValue.Future.Field[core::result::Result::Ok(0)]; taint |
| 15 | Summary: <_ as tokio::io::util::async_buf_read_ext::AsyncBufReadExt>::lines; Argument[self]; ReturnValue; taint |
| 16 | Summary: <_ as tokio::io::util::async_buf_read_ext::AsyncBufReadExt>::read_line; Argument[self]; Argument[0].Reference; taint |
| 17 | Summary: <_ as tokio::io::util::async_buf_read_ext::AsyncBufReadExt>::read_until; Argument[self]; Argument[1].Reference; taint |
| 18 | Summary: <_ as tokio::io::util::async_buf_read_ext::AsyncBufReadExt>::split; Argument[self]; ReturnValue; taint |
| 19 | Summary: <_ as tokio::io::util::async_read_ext::AsyncReadExt>::read; Argument[self]; Argument[0].Reference; taint |
| 20 | Summary: <_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_buf; Argument[self]; Argument[0].Reference; taint |
| 21 | Summary: <_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_exact; Argument[self]; Argument[0].Reference; taint |
| 22 | Summary: <_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_f32; Argument[self]; ReturnValue.Future.Field[core::result::Result::Ok(0)]; taint |
| 23 | Summary: <_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_i16; Argument[self]; ReturnValue.Future.Field[core::result::Result::Ok(0)]; taint |
| 24 | Summary: <_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_i64_le; Argument[self]; ReturnValue.Future.Field[core::result::Result::Ok(0)]; taint |
| 25 | Summary: <_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_to_end; Argument[self]; Argument[0].Reference; taint |
| 26 | Summary: <_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_to_string; Argument[self]; Argument[0].Reference; taint |
| 27 | Summary: <_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_u8; Argument[self]; ReturnValue.Future.Field[core::result::Result::Ok(0)]; taint |
| 28 | Summary: <core::option::Option>::unwrap; Argument[self].Field[core::option::Option::Some(0)]; ReturnValue; value |
| 29 | Summary: <core::result::Result>::unwrap; Argument[self].Field[core::result::Result::Ok(0)]; ReturnValue; value |
| 30 | Summary: <std::io::buffered::bufreader::BufReader>::buffer; Argument[self]; ReturnValue; taint |
| 31 | Summary: <std::io::buffered::bufreader::BufReader>::new; Argument[0]; ReturnValue; taint |
| 32 | Summary: <std::io::stdio::Stdin as std::io::Read>::read; Argument[self]; Argument[0]; taint |
| 33 | Summary: <std::io::stdio::Stdin as std::io::Read>::read_exact; Argument[self]; Argument[0]; taint |
| 34 | Summary: <std::io::stdio::Stdin as std::io::Read>::read_to_string; Argument[self]; Argument[0]; taint |
| 35 | Summary: <std::io::stdio::Stdin>::lock; Argument[self]; ReturnValue; taint |
| 36 | Summary: <tokio::io::util::buf_reader::BufReader>::buffer; Argument[self]; ReturnValue; taint |
| 37 | Summary: <tokio::io::util::buf_reader::BufReader>::new; Argument[0]; ReturnValue; taint |
| 38 | Summary: <tokio::io::util::lines::Lines>::next_line; Argument[self]; ReturnValue.Future.Field[core::result::Result::Ok(0)].Field[core::option::Option::Some(0)]; taint |
| 39 | Summary: <tokio::io::util::split::Split>::next_segment; Argument[self]; ReturnValue.Future.Field[core::result::Result::Ok(0)].Field[core::option::Option::Some(0)]; taint |
edges
| test.rs:13:22:13:35 | ...::stdin | test.rs:13:22:13:37 | ...::stdin(...) | provenance | Src:MaD:1 MaD:1 |
| test.rs:13:22:13:37 | ...::stdin(...) | test.rs:13:44:13:54 | [post] &mut buffer | provenance | MaD:32 |
| test.rs:13:22:13:37 | ...::stdin(...) | test.rs:13:44:13:54 | [post] &mut buffer [&ref] | provenance | MaD:10 |
| test.rs:13:44:13:54 | [post] &mut buffer | test.rs:14:15:14:20 | buffer | provenance | |
| test.rs:13:44:13:54 | [post] &mut buffer [&ref] | test.rs:13:49:13:54 | [post] buffer | provenance | |
| test.rs:13:49:13:54 | [post] buffer | test.rs:14:15:14:20 | buffer | provenance | |
| test.rs:14:15:14:20 | buffer | test.rs:14:14:14:20 | &buffer | provenance | |
| test.rs:19:22:19:35 | ...::stdin | test.rs:19:22:19:37 | ...::stdin(...) | provenance | Src:MaD:1 MaD:1 |
| test.rs:19:22:19:37 | ...::stdin(...) | test.rs:19:51:19:61 | [post] &mut buffer [&ref] | provenance | MaD:12 |
| test.rs:19:51:19:61 | [post] &mut buffer [&ref] | test.rs:19:56:19:61 | [post] buffer | provenance | |
| test.rs:19:56:19:61 | [post] buffer | test.rs:20:15:20:20 | buffer | provenance | |
| test.rs:20:15:20:20 | buffer | test.rs:20:14:20:20 | &buffer | provenance | |
| test.rs:25:22:25:35 | ...::stdin | test.rs:25:22:25:37 | ...::stdin(...) | provenance | Src:MaD:1 MaD:1 |
| test.rs:25:22:25:37 | ...::stdin(...) | test.rs:25:54:25:64 | [post] &mut buffer | provenance | MaD:34 |
| test.rs:25:22:25:37 | ...::stdin(...) | test.rs:25:54:25:64 | [post] &mut buffer [&ref] | provenance | MaD:13 |
| test.rs:25:54:25:64 | [post] &mut buffer | test.rs:26:15:26:20 | buffer | provenance | |
| test.rs:25:54:25:64 | [post] &mut buffer [&ref] | test.rs:25:59:25:64 | [post] buffer | provenance | |
| test.rs:25:59:25:64 | [post] buffer | test.rs:26:15:26:20 | buffer | provenance | |
| test.rs:26:15:26:20 | buffer | test.rs:26:14:26:20 | &buffer | provenance | |
| test.rs:31:22:31:35 | ...::stdin | test.rs:31:22:31:37 | ...::stdin(...) | provenance | Src:MaD:1 MaD:1 |
| test.rs:31:22:31:37 | ...::stdin(...) | test.rs:31:22:31:44 | ... .lock() | provenance | MaD:35 |
| test.rs:31:22:31:44 | ... .lock() | test.rs:31:61:31:71 | [post] &mut buffer [&ref] | provenance | MaD:13 |
| test.rs:31:61:31:71 | [post] &mut buffer [&ref] | test.rs:31:66:31:71 | [post] buffer | provenance | |
| test.rs:31:66:31:71 | [post] buffer | test.rs:32:15:32:20 | buffer | provenance | |
| test.rs:32:15:32:20 | buffer | test.rs:32:14:32:20 | &buffer | provenance | |
| test.rs:37:9:37:22 | ...::stdin | test.rs:37:9:37:24 | ...::stdin(...) | provenance | Src:MaD:1 MaD:1 |
| test.rs:37:9:37:24 | ...::stdin(...) | test.rs:37:37:37:47 | [post] &mut buffer | provenance | MaD:33 |
| test.rs:37:9:37:24 | ...::stdin(...) | test.rs:37:37:37:47 | [post] &mut buffer [&ref] | provenance | MaD:11 |
| test.rs:37:37:37:47 | [post] &mut buffer | test.rs:38:15:38:20 | buffer | provenance | |
| test.rs:37:37:37:47 | [post] &mut buffer [&ref] | test.rs:37:42:37:47 | [post] buffer | provenance | |
| test.rs:37:42:37:47 | [post] buffer | test.rs:38:15:38:20 | buffer | provenance | |
| test.rs:38:15:38:20 | buffer | test.rs:38:14:38:20 | &buffer | provenance | |
| test.rs:41:17:41:30 | ...::stdin | test.rs:41:17:41:32 | ...::stdin(...) | provenance | Src:MaD:1 MaD:1 |
| test.rs:41:17:41:32 | ...::stdin(...) | test.rs:41:17:41:40 | ... .bytes() | provenance | MaD:9 |
| test.rs:41:17:41:40 | ... .bytes() | test.rs:42:14:42:17 | byte | provenance | |
| test.rs:48:13:48:22 | mut reader | test.rs:49:20:49:36 | reader.fill_buf() [Ok] | provenance | MaD:4 |
| test.rs:48:26:48:66 | ...::new(...) | test.rs:48:13:48:22 | mut reader | provenance | |
| test.rs:48:50:48:63 | ...::stdin | test.rs:48:50:48:65 | ...::stdin(...) | provenance | Src:MaD:1 MaD:1 |
| test.rs:48:50:48:65 | ...::stdin(...) | test.rs:48:26:48:66 | ...::new(...) | provenance | MaD:31 |
| test.rs:49:13:49:16 | data | test.rs:50:15:50:18 | data | provenance | |
| test.rs:49:20:49:36 | reader.fill_buf() [Ok] | test.rs:49:20:49:37 | TryExpr | provenance | |
| test.rs:49:20:49:37 | TryExpr | test.rs:49:13:49:16 | data | provenance | |
| test.rs:50:15:50:18 | data | test.rs:50:14:50:18 | &data | provenance | |
| test.rs:54:13:54:18 | reader | test.rs:55:20:55:34 | reader.buffer() | provenance | MaD:30 |
| test.rs:54:22:54:62 | ...::new(...) | test.rs:54:13:54:18 | reader | provenance | |
| test.rs:54:46:54:59 | ...::stdin | test.rs:54:46:54:61 | ...::stdin(...) | provenance | Src:MaD:1 MaD:1 |
| test.rs:54:46:54:61 | ...::stdin(...) | test.rs:54:22:54:62 | ...::new(...) | provenance | MaD:31 |
| test.rs:55:13:55:16 | data | test.rs:56:15:56:18 | data | provenance | |
| test.rs:55:20:55:34 | reader.buffer() | test.rs:55:13:55:16 | data | provenance | |
| test.rs:56:15:56:18 | data | test.rs:56:14:56:18 | &data | provenance | |
| test.rs:61:13:61:22 | mut reader | test.rs:62:26:62:36 | [post] &mut buffer [&ref] | provenance | MaD:6 |
| test.rs:61:26:61:66 | ...::new(...) | test.rs:61:13:61:22 | mut reader | provenance | |
| test.rs:61:50:61:63 | ...::stdin | test.rs:61:50:61:65 | ...::stdin(...) | provenance | Src:MaD:1 MaD:1 |
| test.rs:61:50:61:65 | ...::stdin(...) | test.rs:61:26:61:66 | ...::new(...) | provenance | MaD:31 |
| test.rs:62:26:62:36 | [post] &mut buffer [&ref] | test.rs:62:31:62:36 | [post] buffer | provenance | |
| test.rs:62:31:62:36 | [post] buffer | test.rs:63:15:63:20 | buffer | provenance | |
| test.rs:63:15:63:20 | buffer | test.rs:63:14:63:20 | &buffer | provenance | |
| test.rs:68:13:68:22 | mut reader | test.rs:69:33:69:43 | [post] &mut buffer [&ref] | provenance | MaD:7 |
| test.rs:68:26:68:66 | ...::new(...) | test.rs:68:13:68:22 | mut reader | provenance | |
| test.rs:68:50:68:63 | ...::stdin | test.rs:68:50:68:65 | ...::stdin(...) | provenance | Src:MaD:1 MaD:1 |
| test.rs:68:50:68:65 | ...::stdin(...) | test.rs:68:26:68:66 | ...::new(...) | provenance | MaD:31 |
| test.rs:69:33:69:43 | [post] &mut buffer [&ref] | test.rs:69:38:69:43 | [post] buffer | provenance | |
| test.rs:69:38:69:43 | [post] buffer | test.rs:70:15:70:20 | buffer | provenance | |
| test.rs:69:38:69:43 | [post] buffer | test.rs:71:14:71:22 | buffer[0] | provenance | |
| test.rs:70:15:70:20 | buffer | test.rs:70:14:70:20 | &buffer | provenance | |
| test.rs:75:13:75:28 | mut reader_split | test.rs:76:14:76:32 | reader_split.next() [Some, Ok] | provenance | MaD:3 |
| test.rs:75:13:75:28 | mut reader_split | test.rs:77:33:77:51 | reader_split.next() [Some, Ok] | provenance | MaD:3 |
| test.rs:75:32:75:72 | ...::new(...) | test.rs:75:32:75:84 | ... .split(...) | provenance | MaD:8 |
| test.rs:75:32:75:84 | ... .split(...) | test.rs:75:13:75:28 | mut reader_split | provenance | |
| test.rs:75:56:75:69 | ...::stdin | test.rs:75:56:75:71 | ...::stdin(...) | provenance | Src:MaD:1 MaD:1 |
| test.rs:75:56:75:71 | ...::stdin(...) | test.rs:75:32:75:72 | ...::new(...) | provenance | MaD:31 |
| test.rs:76:14:76:32 | reader_split.next() [Some, Ok] | test.rs:76:14:76:41 | ... .unwrap() [Ok] | provenance | MaD:28 |
| test.rs:76:14:76:41 | ... .unwrap() [Ok] | test.rs:76:14:76:50 | ... .unwrap() | provenance | MaD:29 |
| test.rs:77:19:77:29 | Some(...) [Some, Ok] | test.rs:77:24:77:28 | chunk [Ok] | provenance | |
| test.rs:77:24:77:28 | chunk [Ok] | test.rs:78:18:78:31 | chunk.unwrap() | provenance | MaD:29 |
| test.rs:77:33:77:51 | reader_split.next() [Some, Ok] | test.rs:77:19:77:29 | Some(...) [Some, Ok] | provenance | |
| test.rs:83:13:83:18 | reader | test.rs:84:21:84:34 | reader.lines() | provenance | MaD:5 |
| test.rs:83:22:83:62 | ...::new(...) | test.rs:83:13:83:18 | reader | provenance | |
| test.rs:83:46:83:59 | ...::stdin | test.rs:83:46:83:61 | ...::stdin(...) | provenance | Src:MaD:1 MaD:1 |
| test.rs:83:46:83:61 | ...::stdin(...) | test.rs:83:22:83:62 | ...::new(...) | provenance | MaD:31 |
| test.rs:84:21:84:34 | reader.lines() | test.rs:85:18:85:21 | line | provenance | |
| test.rs:109:13:109:21 | mut stdin | test.rs:111:33:111:43 | [post] &mut buffer [&ref] | provenance | MaD:19 |
| test.rs:109:25:109:40 | ...::stdin | test.rs:109:25:109:42 | ...::stdin(...) | provenance | Src:MaD:2 MaD:2 |
| test.rs:109:25:109:42 | ...::stdin(...) | test.rs:109:13:109:21 | mut stdin | provenance | |
| test.rs:111:33:111:43 | [post] &mut buffer [&ref] | test.rs:111:38:111:43 | [post] buffer | provenance | |
| test.rs:111:38:111:43 | [post] buffer | test.rs:112:15:112:20 | buffer | provenance | |
| test.rs:112:15:112:20 | buffer | test.rs:112:14:112:20 | &buffer | provenance | |
| test.rs:116:13:116:21 | mut stdin | test.rs:118:40:118:50 | [post] &mut buffer [&ref] | provenance | MaD:25 |
| test.rs:116:25:116:40 | ...::stdin | test.rs:116:25:116:42 | ...::stdin(...) | provenance | Src:MaD:2 MaD:2 |
| test.rs:116:25:116:42 | ...::stdin(...) | test.rs:116:13:116:21 | mut stdin | provenance | |
| test.rs:118:40:118:50 | [post] &mut buffer [&ref] | test.rs:118:45:118:50 | [post] buffer | provenance | |
| test.rs:118:45:118:50 | [post] buffer | test.rs:119:15:119:20 | buffer | provenance | |
| test.rs:119:15:119:20 | buffer | test.rs:119:14:119:20 | &buffer | provenance | |
| test.rs:123:13:123:21 | mut stdin | test.rs:125:43:125:53 | [post] &mut buffer [&ref] | provenance | MaD:26 |
| test.rs:123:25:123:40 | ...::stdin | test.rs:123:25:123:42 | ...::stdin(...) | provenance | Src:MaD:2 MaD:2 |
| test.rs:123:25:123:42 | ...::stdin(...) | test.rs:123:13:123:21 | mut stdin | provenance | |
| test.rs:125:43:125:53 | [post] &mut buffer [&ref] | test.rs:125:48:125:53 | [post] buffer | provenance | |
| test.rs:125:48:125:53 | [post] buffer | test.rs:126:15:126:20 | buffer | provenance | |
| test.rs:126:15:126:20 | buffer | test.rs:126:14:126:20 | &buffer | provenance | |
| test.rs:130:13:130:21 | mut stdin | test.rs:132:26:132:36 | [post] &mut buffer [&ref] | provenance | MaD:21 |
| test.rs:130:25:130:40 | ...::stdin | test.rs:130:25:130:42 | ...::stdin(...) | provenance | Src:MaD:2 MaD:2 |
| test.rs:130:25:130:42 | ...::stdin(...) | test.rs:130:13:130:21 | mut stdin | provenance | |
| test.rs:132:26:132:36 | [post] &mut buffer [&ref] | test.rs:132:31:132:36 | [post] buffer | provenance | |
| test.rs:132:31:132:36 | [post] buffer | test.rs:133:15:133:20 | buffer | provenance | |
| test.rs:133:15:133:20 | buffer | test.rs:133:14:133:20 | &buffer | provenance | |
| test.rs:137:13:137:21 | mut stdin | test.rs:138:18:138:32 | stdin.read_u8() [future, Ok] | provenance | MaD:27 |
| test.rs:137:13:137:21 | mut stdin | test.rs:139:18:139:33 | stdin.read_i16() [future, Ok] | provenance | MaD:23 |
| test.rs:137:13:137:21 | mut stdin | test.rs:140:18:140:33 | stdin.read_f32() [future, Ok] | provenance | MaD:22 |
| test.rs:137:13:137:21 | mut stdin | test.rs:141:18:141:36 | stdin.read_i64_le() [future, Ok] | provenance | MaD:24 |
| test.rs:137:25:137:40 | ...::stdin | test.rs:137:25:137:42 | ...::stdin(...) | provenance | Src:MaD:2 MaD:2 |
| test.rs:137:25:137:42 | ...::stdin(...) | test.rs:137:13:137:21 | mut stdin | provenance | |
| test.rs:138:13:138:14 | v1 | test.rs:142:14:142:15 | v1 | provenance | |
| test.rs:138:18:138:32 | stdin.read_u8() [future, Ok] | test.rs:138:18:138:38 | await ... [Ok] | provenance | |
| test.rs:138:18:138:38 | await ... [Ok] | test.rs:138:18:138:39 | TryExpr | provenance | |
| test.rs:138:18:138:39 | TryExpr | test.rs:138:13:138:14 | v1 | provenance | |
| test.rs:139:13:139:14 | v2 | test.rs:143:14:143:15 | v2 | provenance | |
| test.rs:139:18:139:33 | stdin.read_i16() [future, Ok] | test.rs:139:18:139:39 | await ... [Ok] | provenance | |
| test.rs:139:18:139:39 | await ... [Ok] | test.rs:139:18:139:40 | TryExpr | provenance | |
| test.rs:139:18:139:40 | TryExpr | test.rs:139:13:139:14 | v2 | provenance | |
| test.rs:140:13:140:14 | v3 | test.rs:144:14:144:15 | v3 | provenance | |
| test.rs:140:18:140:33 | stdin.read_f32() [future, Ok] | test.rs:140:18:140:39 | await ... [Ok] | provenance | |
| test.rs:140:18:140:39 | await ... [Ok] | test.rs:140:18:140:40 | TryExpr | provenance | |
| test.rs:140:18:140:40 | TryExpr | test.rs:140:13:140:14 | v3 | provenance | |
| test.rs:141:13:141:14 | v4 | test.rs:145:14:145:15 | v4 | provenance | |
| test.rs:141:18:141:36 | stdin.read_i64_le() [future, Ok] | test.rs:141:18:141:42 | await ... [Ok] | provenance | |
| test.rs:141:18:141:42 | await ... [Ok] | test.rs:141:18:141:43 | TryExpr | provenance | |
| test.rs:141:18:141:43 | TryExpr | test.rs:141:13:141:14 | v4 | provenance | |
| test.rs:149:13:149:21 | mut stdin | test.rs:151:24:151:34 | [post] &mut buffer [&ref] | provenance | MaD:20 |
| test.rs:149:25:149:40 | ...::stdin | test.rs:149:25:149:42 | ...::stdin(...) | provenance | Src:MaD:2 MaD:2 |
| test.rs:149:25:149:42 | ...::stdin(...) | test.rs:149:13:149:21 | mut stdin | provenance | |
| test.rs:151:24:151:34 | [post] &mut buffer [&ref] | test.rs:151:29:151:34 | [post] buffer | provenance | |
| test.rs:151:29:151:34 | [post] buffer | test.rs:152:15:152:20 | buffer | provenance | |
| test.rs:152:15:152:20 | buffer | test.rs:152:14:152:20 | &buffer | provenance | |
| test.rs:158:13:158:22 | mut reader | test.rs:159:20:159:36 | reader.fill_buf() [future, Ok] | provenance | MaD:14 |
| test.rs:158:26:158:70 | ...::new(...) | test.rs:158:13:158:22 | mut reader | provenance | |
| test.rs:158:52:158:67 | ...::stdin | test.rs:158:52:158:69 | ...::stdin(...) | provenance | Src:MaD:2 MaD:2 |
| test.rs:158:52:158:69 | ...::stdin(...) | test.rs:158:26:158:70 | ...::new(...) | provenance | MaD:37 |
| test.rs:159:13:159:16 | data | test.rs:160:15:160:18 | data | provenance | |
| test.rs:159:20:159:36 | reader.fill_buf() [future, Ok] | test.rs:159:20:159:42 | await ... [Ok] | provenance | |
| test.rs:159:20:159:42 | await ... [Ok] | test.rs:159:20:159:43 | TryExpr | provenance | |
| test.rs:159:20:159:43 | TryExpr | test.rs:159:13:159:16 | data | provenance | |
| test.rs:160:15:160:18 | data | test.rs:160:14:160:18 | &data | provenance | |
| test.rs:164:13:164:18 | reader | test.rs:165:20:165:34 | reader.buffer() | provenance | MaD:36 |
| test.rs:164:22:164:66 | ...::new(...) | test.rs:164:13:164:18 | reader | provenance | |
| test.rs:164:48:164:63 | ...::stdin | test.rs:164:48:164:65 | ...::stdin(...) | provenance | Src:MaD:2 MaD:2 |
| test.rs:164:48:164:65 | ...::stdin(...) | test.rs:164:22:164:66 | ...::new(...) | provenance | MaD:37 |
| test.rs:165:13:165:16 | data | test.rs:166:15:166:18 | data | provenance | |
| test.rs:165:20:165:34 | reader.buffer() | test.rs:165:13:165:16 | data | provenance | |
| test.rs:166:15:166:18 | data | test.rs:166:14:166:18 | &data | provenance | |
| test.rs:171:13:171:22 | mut reader | test.rs:172:26:172:36 | [post] &mut buffer [&ref] | provenance | MaD:16 |
| test.rs:171:26:171:70 | ...::new(...) | test.rs:171:13:171:22 | mut reader | provenance | |
| test.rs:171:52:171:67 | ...::stdin | test.rs:171:52:171:69 | ...::stdin(...) | provenance | Src:MaD:2 MaD:2 |
| test.rs:171:52:171:69 | ...::stdin(...) | test.rs:171:26:171:70 | ...::new(...) | provenance | MaD:37 |
| test.rs:172:26:172:36 | [post] &mut buffer [&ref] | test.rs:172:31:172:36 | [post] buffer | provenance | |
| test.rs:172:31:172:36 | [post] buffer | test.rs:173:15:173:20 | buffer | provenance | |
| test.rs:173:15:173:20 | buffer | test.rs:173:14:173:20 | &buffer | provenance | |
| test.rs:178:13:178:22 | mut reader | test.rs:179:33:179:43 | [post] &mut buffer [&ref] | provenance | MaD:17 |
| test.rs:178:26:178:70 | ...::new(...) | test.rs:178:13:178:22 | mut reader | provenance | |
| test.rs:178:52:178:67 | ...::stdin | test.rs:178:52:178:69 | ...::stdin(...) | provenance | Src:MaD:2 MaD:2 |
| test.rs:178:52:178:69 | ...::stdin(...) | test.rs:178:26:178:70 | ...::new(...) | provenance | MaD:37 |
| test.rs:179:33:179:43 | [post] &mut buffer [&ref] | test.rs:179:38:179:43 | [post] buffer | provenance | |
| test.rs:179:38:179:43 | [post] buffer | test.rs:180:15:180:20 | buffer | provenance | |
| test.rs:179:38:179:43 | [post] buffer | test.rs:181:14:181:22 | buffer[0] | provenance | |
| test.rs:180:15:180:20 | buffer | test.rs:180:14:180:20 | &buffer | provenance | |
| test.rs:185:13:185:28 | mut reader_split | test.rs:186:14:186:40 | reader_split.next_segment() [future, Ok, Some] | provenance | MaD:39 |
| test.rs:185:13:185:28 | mut reader_split | test.rs:187:33:187:59 | reader_split.next_segment() [future, Ok, Some] | provenance | MaD:39 |
| test.rs:185:32:185:76 | ...::new(...) | test.rs:185:32:185:88 | ... .split(...) | provenance | MaD:18 |
| test.rs:185:32:185:88 | ... .split(...) | test.rs:185:13:185:28 | mut reader_split | provenance | |
| test.rs:185:58:185:73 | ...::stdin | test.rs:185:58:185:75 | ...::stdin(...) | provenance | Src:MaD:2 MaD:2 |
| test.rs:185:58:185:75 | ...::stdin(...) | test.rs:185:32:185:76 | ...::new(...) | provenance | MaD:37 |
| test.rs:186:14:186:40 | reader_split.next_segment() [future, Ok, Some] | test.rs:186:14:186:46 | await ... [Ok, Some] | provenance | |
| test.rs:186:14:186:46 | await ... [Ok, Some] | test.rs:186:14:186:47 | TryExpr [Some] | provenance | |
| test.rs:186:14:186:47 | TryExpr [Some] | test.rs:186:14:186:56 | ... .unwrap() | provenance | MaD:28 |
| test.rs:187:19:187:29 | Some(...) [Some] | test.rs:187:24:187:28 | chunk | provenance | |
| test.rs:187:24:187:28 | chunk | test.rs:188:18:188:22 | chunk | provenance | |
| test.rs:187:33:187:59 | reader_split.next_segment() [future, Ok, Some] | test.rs:187:33:187:65 | await ... [Ok, Some] | provenance | |
| test.rs:187:33:187:65 | await ... [Ok, Some] | test.rs:187:33:187:66 | TryExpr [Some] | provenance | |
| test.rs:187:33:187:66 | TryExpr [Some] | test.rs:187:19:187:29 | Some(...) [Some] | provenance | |
| test.rs:193:13:193:18 | reader | test.rs:194:25:194:38 | reader.lines() | provenance | MaD:15 |
| test.rs:193:22:193:66 | ...::new(...) | test.rs:193:13:193:18 | reader | provenance | |
| test.rs:193:48:193:63 | ...::stdin | test.rs:193:48:193:65 | ...::stdin(...) | provenance | Src:MaD:2 MaD:2 |
| test.rs:193:48:193:65 | ...::stdin(...) | test.rs:193:22:193:66 | ...::new(...) | provenance | MaD:37 |
| test.rs:194:13:194:21 | mut lines | test.rs:195:14:195:30 | lines.next_line() [future, Ok, Some] | provenance | MaD:38 |
| test.rs:194:13:194:21 | mut lines | test.rs:196:32:196:48 | lines.next_line() [future, Ok, Some] | provenance | MaD:38 |
| test.rs:194:25:194:38 | reader.lines() | test.rs:194:13:194:21 | mut lines | provenance | |
| test.rs:195:14:195:30 | lines.next_line() [future, Ok, Some] | test.rs:195:14:195:36 | await ... [Ok, Some] | provenance | |
| test.rs:195:14:195:36 | await ... [Ok, Some] | test.rs:195:14:195:37 | TryExpr [Some] | provenance | |
| test.rs:195:14:195:37 | TryExpr [Some] | test.rs:195:14:195:46 | ... .unwrap() | provenance | MaD:28 |
| test.rs:196:19:196:28 | Some(...) [Some] | test.rs:196:24:196:27 | line | provenance | |
| test.rs:196:24:196:27 | line | test.rs:197:18:197:21 | line | provenance | |
| test.rs:196:32:196:48 | lines.next_line() [future, Ok, Some] | test.rs:196:32:196:54 | await ... [Ok, Some] | provenance | |
| test.rs:196:32:196:54 | await ... [Ok, Some] | test.rs:196:32:196:55 | TryExpr [Some] | provenance | |
| test.rs:196:32:196:55 | TryExpr [Some] | test.rs:196:19:196:28 | Some(...) [Some] | provenance | |
nodes
| test.rs:13:22:13:35 | ...::stdin | semmle.label | ...::stdin |
| test.rs:13:22:13:37 | ...::stdin(...) | semmle.label | ...::stdin(...) |
| test.rs:13:44:13:54 | [post] &mut buffer | semmle.label | [post] &mut buffer |
| test.rs:13:44:13:54 | [post] &mut buffer [&ref] | semmle.label | [post] &mut buffer [&ref] |
| test.rs:13:49:13:54 | [post] buffer | semmle.label | [post] buffer |
| test.rs:14:14:14:20 | &buffer | semmle.label | &buffer |
| test.rs:14:15:14:20 | buffer | semmle.label | buffer |
| test.rs:19:22:19:35 | ...::stdin | semmle.label | ...::stdin |
| test.rs:19:22:19:37 | ...::stdin(...) | semmle.label | ...::stdin(...) |
| test.rs:19:51:19:61 | [post] &mut buffer [&ref] | semmle.label | [post] &mut buffer [&ref] |
| test.rs:19:56:19:61 | [post] buffer | semmle.label | [post] buffer |
| test.rs:20:14:20:20 | &buffer | semmle.label | &buffer |
| test.rs:20:15:20:20 | buffer | semmle.label | buffer |
| test.rs:25:22:25:35 | ...::stdin | semmle.label | ...::stdin |
| test.rs:25:22:25:37 | ...::stdin(...) | semmle.label | ...::stdin(...) |
| test.rs:25:54:25:64 | [post] &mut buffer | semmle.label | [post] &mut buffer |
| test.rs:25:54:25:64 | [post] &mut buffer [&ref] | semmle.label | [post] &mut buffer [&ref] |
| test.rs:25:59:25:64 | [post] buffer | semmle.label | [post] buffer |
| test.rs:26:14:26:20 | &buffer | semmle.label | &buffer |
| test.rs:26:15:26:20 | buffer | semmle.label | buffer |
| test.rs:31:22:31:35 | ...::stdin | semmle.label | ...::stdin |
| test.rs:31:22:31:37 | ...::stdin(...) | semmle.label | ...::stdin(...) |
| test.rs:31:22:31:44 | ... .lock() | semmle.label | ... .lock() |
| test.rs:31:61:31:71 | [post] &mut buffer [&ref] | semmle.label | [post] &mut buffer [&ref] |
| test.rs:31:66:31:71 | [post] buffer | semmle.label | [post] buffer |
| test.rs:32:14:32:20 | &buffer | semmle.label | &buffer |
| test.rs:32:15:32:20 | buffer | semmle.label | buffer |
| test.rs:37:9:37:22 | ...::stdin | semmle.label | ...::stdin |
| test.rs:37:9:37:24 | ...::stdin(...) | semmle.label | ...::stdin(...) |
| test.rs:37:37:37:47 | [post] &mut buffer | semmle.label | [post] &mut buffer |
| test.rs:37:37:37:47 | [post] &mut buffer [&ref] | semmle.label | [post] &mut buffer [&ref] |
| test.rs:37:42:37:47 | [post] buffer | semmle.label | [post] buffer |
| test.rs:38:14:38:20 | &buffer | semmle.label | &buffer |
| test.rs:38:15:38:20 | buffer | semmle.label | buffer |
| test.rs:41:17:41:30 | ...::stdin | semmle.label | ...::stdin |
| test.rs:41:17:41:32 | ...::stdin(...) | semmle.label | ...::stdin(...) |
| test.rs:41:17:41:40 | ... .bytes() | semmle.label | ... .bytes() |
| test.rs:42:14:42:17 | byte | semmle.label | byte |
| test.rs:48:13:48:22 | mut reader | semmle.label | mut reader |
| test.rs:48:26:48:66 | ...::new(...) | semmle.label | ...::new(...) |
| test.rs:48:50:48:63 | ...::stdin | semmle.label | ...::stdin |
| test.rs:48:50:48:65 | ...::stdin(...) | semmle.label | ...::stdin(...) |
| test.rs:49:13:49:16 | data | semmle.label | data |
| test.rs:49:20:49:36 | reader.fill_buf() [Ok] | semmle.label | reader.fill_buf() [Ok] |
| test.rs:49:20:49:37 | TryExpr | semmle.label | TryExpr |
| test.rs:50:14:50:18 | &data | semmle.label | &data |
| test.rs:50:15:50:18 | data | semmle.label | data |
| test.rs:54:13:54:18 | reader | semmle.label | reader |
| test.rs:54:22:54:62 | ...::new(...) | semmle.label | ...::new(...) |
| test.rs:54:46:54:59 | ...::stdin | semmle.label | ...::stdin |
| test.rs:54:46:54:61 | ...::stdin(...) | semmle.label | ...::stdin(...) |
| test.rs:55:13:55:16 | data | semmle.label | data |
| test.rs:55:20:55:34 | reader.buffer() | semmle.label | reader.buffer() |
| test.rs:56:14:56:18 | &data | semmle.label | &data |
| test.rs:56:15:56:18 | data | semmle.label | data |
| test.rs:61:13:61:22 | mut reader | semmle.label | mut reader |
| test.rs:61:26:61:66 | ...::new(...) | semmle.label | ...::new(...) |
| test.rs:61:50:61:63 | ...::stdin | semmle.label | ...::stdin |
| test.rs:61:50:61:65 | ...::stdin(...) | semmle.label | ...::stdin(...) |
| test.rs:62:26:62:36 | [post] &mut buffer [&ref] | semmle.label | [post] &mut buffer [&ref] |
| test.rs:62:31:62:36 | [post] buffer | semmle.label | [post] buffer |
| test.rs:63:14:63:20 | &buffer | semmle.label | &buffer |
| test.rs:63:15:63:20 | buffer | semmle.label | buffer |
| test.rs:68:13:68:22 | mut reader | semmle.label | mut reader |
| test.rs:68:26:68:66 | ...::new(...) | semmle.label | ...::new(...) |
| test.rs:68:50:68:63 | ...::stdin | semmle.label | ...::stdin |
| test.rs:68:50:68:65 | ...::stdin(...) | semmle.label | ...::stdin(...) |
| test.rs:69:33:69:43 | [post] &mut buffer [&ref] | semmle.label | [post] &mut buffer [&ref] |
| test.rs:69:38:69:43 | [post] buffer | semmle.label | [post] buffer |
| test.rs:70:14:70:20 | &buffer | semmle.label | &buffer |
| test.rs:70:15:70:20 | buffer | semmle.label | buffer |
| test.rs:71:14:71:22 | buffer[0] | semmle.label | buffer[0] |
| test.rs:75:13:75:28 | mut reader_split | semmle.label | mut reader_split |
| test.rs:75:32:75:72 | ...::new(...) | semmle.label | ...::new(...) |
| test.rs:75:32:75:84 | ... .split(...) | semmle.label | ... .split(...) |
| test.rs:75:56:75:69 | ...::stdin | semmle.label | ...::stdin |
| test.rs:75:56:75:71 | ...::stdin(...) | semmle.label | ...::stdin(...) |
| test.rs:76:14:76:32 | reader_split.next() [Some, Ok] | semmle.label | reader_split.next() [Some, Ok] |
| test.rs:76:14:76:41 | ... .unwrap() [Ok] | semmle.label | ... .unwrap() [Ok] |
| test.rs:76:14:76:50 | ... .unwrap() | semmle.label | ... .unwrap() |
| test.rs:77:19:77:29 | Some(...) [Some, Ok] | semmle.label | Some(...) [Some, Ok] |
| test.rs:77:24:77:28 | chunk [Ok] | semmle.label | chunk [Ok] |
| test.rs:77:33:77:51 | reader_split.next() [Some, Ok] | semmle.label | reader_split.next() [Some, Ok] |
| test.rs:78:18:78:31 | chunk.unwrap() | semmle.label | chunk.unwrap() |
| test.rs:83:13:83:18 | reader | semmle.label | reader |
| test.rs:83:22:83:62 | ...::new(...) | semmle.label | ...::new(...) |
| test.rs:83:46:83:59 | ...::stdin | semmle.label | ...::stdin |
| test.rs:83:46:83:61 | ...::stdin(...) | semmle.label | ...::stdin(...) |
| test.rs:84:21:84:34 | reader.lines() | semmle.label | reader.lines() |
| test.rs:85:18:85:21 | line | semmle.label | line |
| test.rs:109:13:109:21 | mut stdin | semmle.label | mut stdin |
| test.rs:109:25:109:40 | ...::stdin | semmle.label | ...::stdin |
| test.rs:109:25:109:42 | ...::stdin(...) | semmle.label | ...::stdin(...) |
| test.rs:111:33:111:43 | [post] &mut buffer [&ref] | semmle.label | [post] &mut buffer [&ref] |
| test.rs:111:38:111:43 | [post] buffer | semmle.label | [post] buffer |
| test.rs:112:14:112:20 | &buffer | semmle.label | &buffer |
| test.rs:112:15:112:20 | buffer | semmle.label | buffer |
| test.rs:116:13:116:21 | mut stdin | semmle.label | mut stdin |
| test.rs:116:25:116:40 | ...::stdin | semmle.label | ...::stdin |
| test.rs:116:25:116:42 | ...::stdin(...) | semmle.label | ...::stdin(...) |
| test.rs:118:40:118:50 | [post] &mut buffer [&ref] | semmle.label | [post] &mut buffer [&ref] |
| test.rs:118:45:118:50 | [post] buffer | semmle.label | [post] buffer |
| test.rs:119:14:119:20 | &buffer | semmle.label | &buffer |
| test.rs:119:15:119:20 | buffer | semmle.label | buffer |
| test.rs:123:13:123:21 | mut stdin | semmle.label | mut stdin |
| test.rs:123:25:123:40 | ...::stdin | semmle.label | ...::stdin |
| test.rs:123:25:123:42 | ...::stdin(...) | semmle.label | ...::stdin(...) |
| test.rs:125:43:125:53 | [post] &mut buffer [&ref] | semmle.label | [post] &mut buffer [&ref] |
| test.rs:125:48:125:53 | [post] buffer | semmle.label | [post] buffer |
| test.rs:126:14:126:20 | &buffer | semmle.label | &buffer |
| test.rs:126:15:126:20 | buffer | semmle.label | buffer |
| test.rs:130:13:130:21 | mut stdin | semmle.label | mut stdin |
| test.rs:130:25:130:40 | ...::stdin | semmle.label | ...::stdin |
| test.rs:130:25:130:42 | ...::stdin(...) | semmle.label | ...::stdin(...) |
| test.rs:132:26:132:36 | [post] &mut buffer [&ref] | semmle.label | [post] &mut buffer [&ref] |
| test.rs:132:31:132:36 | [post] buffer | semmle.label | [post] buffer |
| test.rs:133:14:133:20 | &buffer | semmle.label | &buffer |
| test.rs:133:15:133:20 | buffer | semmle.label | buffer |
| test.rs:137:13:137:21 | mut stdin | semmle.label | mut stdin |
| test.rs:137:25:137:40 | ...::stdin | semmle.label | ...::stdin |
| test.rs:137:25:137:42 | ...::stdin(...) | semmle.label | ...::stdin(...) |
| test.rs:138:13:138:14 | v1 | semmle.label | v1 |
| test.rs:138:18:138:32 | stdin.read_u8() [future, Ok] | semmle.label | stdin.read_u8() [future, Ok] |
| test.rs:138:18:138:38 | await ... [Ok] | semmle.label | await ... [Ok] |
| test.rs:138:18:138:39 | TryExpr | semmle.label | TryExpr |
| test.rs:139:13:139:14 | v2 | semmle.label | v2 |
| test.rs:139:18:139:33 | stdin.read_i16() [future, Ok] | semmle.label | stdin.read_i16() [future, Ok] |
| test.rs:139:18:139:39 | await ... [Ok] | semmle.label | await ... [Ok] |
| test.rs:139:18:139:40 | TryExpr | semmle.label | TryExpr |
| test.rs:140:13:140:14 | v3 | semmle.label | v3 |
| test.rs:140:18:140:33 | stdin.read_f32() [future, Ok] | semmle.label | stdin.read_f32() [future, Ok] |
| test.rs:140:18:140:39 | await ... [Ok] | semmle.label | await ... [Ok] |
| test.rs:140:18:140:40 | TryExpr | semmle.label | TryExpr |
| test.rs:141:13:141:14 | v4 | semmle.label | v4 |
| test.rs:141:18:141:36 | stdin.read_i64_le() [future, Ok] | semmle.label | stdin.read_i64_le() [future, Ok] |
| test.rs:141:18:141:42 | await ... [Ok] | semmle.label | await ... [Ok] |
| test.rs:141:18:141:43 | TryExpr | semmle.label | TryExpr |
| test.rs:142:14:142:15 | v1 | semmle.label | v1 |
| test.rs:143:14:143:15 | v2 | semmle.label | v2 |
| test.rs:144:14:144:15 | v3 | semmle.label | v3 |
| test.rs:145:14:145:15 | v4 | semmle.label | v4 |
| test.rs:149:13:149:21 | mut stdin | semmle.label | mut stdin |
| test.rs:149:25:149:40 | ...::stdin | semmle.label | ...::stdin |
| test.rs:149:25:149:42 | ...::stdin(...) | semmle.label | ...::stdin(...) |
| test.rs:151:24:151:34 | [post] &mut buffer [&ref] | semmle.label | [post] &mut buffer [&ref] |
| test.rs:151:29:151:34 | [post] buffer | semmle.label | [post] buffer |
| test.rs:152:14:152:20 | &buffer | semmle.label | &buffer |
| test.rs:152:15:152:20 | buffer | semmle.label | buffer |
| test.rs:158:13:158:22 | mut reader | semmle.label | mut reader |
| test.rs:158:26:158:70 | ...::new(...) | semmle.label | ...::new(...) |
| test.rs:158:52:158:67 | ...::stdin | semmle.label | ...::stdin |
| test.rs:158:52:158:69 | ...::stdin(...) | semmle.label | ...::stdin(...) |
| test.rs:159:13:159:16 | data | semmle.label | data |
| test.rs:159:20:159:36 | reader.fill_buf() [future, Ok] | semmle.label | reader.fill_buf() [future, Ok] |
| test.rs:159:20:159:42 | await ... [Ok] | semmle.label | await ... [Ok] |
| test.rs:159:20:159:43 | TryExpr | semmle.label | TryExpr |
| test.rs:160:14:160:18 | &data | semmle.label | &data |
| test.rs:160:15:160:18 | data | semmle.label | data |
| test.rs:164:13:164:18 | reader | semmle.label | reader |
| test.rs:164:22:164:66 | ...::new(...) | semmle.label | ...::new(...) |
| test.rs:164:48:164:63 | ...::stdin | semmle.label | ...::stdin |
| test.rs:164:48:164:65 | ...::stdin(...) | semmle.label | ...::stdin(...) |
| test.rs:165:13:165:16 | data | semmle.label | data |
| test.rs:165:20:165:34 | reader.buffer() | semmle.label | reader.buffer() |
| test.rs:166:14:166:18 | &data | semmle.label | &data |
| test.rs:166:15:166:18 | data | semmle.label | data |
| test.rs:171:13:171:22 | mut reader | semmle.label | mut reader |
| test.rs:171:26:171:70 | ...::new(...) | semmle.label | ...::new(...) |
| test.rs:171:52:171:67 | ...::stdin | semmle.label | ...::stdin |
| test.rs:171:52:171:69 | ...::stdin(...) | semmle.label | ...::stdin(...) |
| test.rs:172:26:172:36 | [post] &mut buffer [&ref] | semmle.label | [post] &mut buffer [&ref] |
| test.rs:172:31:172:36 | [post] buffer | semmle.label | [post] buffer |
| test.rs:173:14:173:20 | &buffer | semmle.label | &buffer |
| test.rs:173:15:173:20 | buffer | semmle.label | buffer |
| test.rs:178:13:178:22 | mut reader | semmle.label | mut reader |
| test.rs:178:26:178:70 | ...::new(...) | semmle.label | ...::new(...) |
| test.rs:178:52:178:67 | ...::stdin | semmle.label | ...::stdin |
| test.rs:178:52:178:69 | ...::stdin(...) | semmle.label | ...::stdin(...) |
| test.rs:179:33:179:43 | [post] &mut buffer [&ref] | semmle.label | [post] &mut buffer [&ref] |
| test.rs:179:38:179:43 | [post] buffer | semmle.label | [post] buffer |
| test.rs:180:14:180:20 | &buffer | semmle.label | &buffer |
| test.rs:180:15:180:20 | buffer | semmle.label | buffer |
| test.rs:181:14:181:22 | buffer[0] | semmle.label | buffer[0] |
| test.rs:185:13:185:28 | mut reader_split | semmle.label | mut reader_split |
| test.rs:185:32:185:76 | ...::new(...) | semmle.label | ...::new(...) |
| test.rs:185:32:185:88 | ... .split(...) | semmle.label | ... .split(...) |
| test.rs:185:58:185:73 | ...::stdin | semmle.label | ...::stdin |
| test.rs:185:58:185:75 | ...::stdin(...) | semmle.label | ...::stdin(...) |
| test.rs:186:14:186:40 | reader_split.next_segment() [future, Ok, Some] | semmle.label | reader_split.next_segment() [future, Ok, Some] |
| test.rs:186:14:186:46 | await ... [Ok, Some] | semmle.label | await ... [Ok, Some] |
| test.rs:186:14:186:47 | TryExpr [Some] | semmle.label | TryExpr [Some] |
| test.rs:186:14:186:56 | ... .unwrap() | semmle.label | ... .unwrap() |
| test.rs:187:19:187:29 | Some(...) [Some] | semmle.label | Some(...) [Some] |
| test.rs:187:24:187:28 | chunk | semmle.label | chunk |
| test.rs:187:33:187:59 | reader_split.next_segment() [future, Ok, Some] | semmle.label | reader_split.next_segment() [future, Ok, Some] |
| test.rs:187:33:187:65 | await ... [Ok, Some] | semmle.label | await ... [Ok, Some] |
| test.rs:187:33:187:66 | TryExpr [Some] | semmle.label | TryExpr [Some] |
| test.rs:188:18:188:22 | chunk | semmle.label | chunk |
| test.rs:193:13:193:18 | reader | semmle.label | reader |
| test.rs:193:22:193:66 | ...::new(...) | semmle.label | ...::new(...) |
| test.rs:193:48:193:63 | ...::stdin | semmle.label | ...::stdin |
| test.rs:193:48:193:65 | ...::stdin(...) | semmle.label | ...::stdin(...) |
| test.rs:194:13:194:21 | mut lines | semmle.label | mut lines |
| test.rs:194:25:194:38 | reader.lines() | semmle.label | reader.lines() |
| test.rs:195:14:195:30 | lines.next_line() [future, Ok, Some] | semmle.label | lines.next_line() [future, Ok, Some] |
| test.rs:195:14:195:36 | await ... [Ok, Some] | semmle.label | await ... [Ok, Some] |
| test.rs:195:14:195:37 | TryExpr [Some] | semmle.label | TryExpr [Some] |
| test.rs:195:14:195:46 | ... .unwrap() | semmle.label | ... .unwrap() |
| test.rs:196:19:196:28 | Some(...) [Some] | semmle.label | Some(...) [Some] |
| test.rs:196:24:196:27 | line | semmle.label | line |
| test.rs:196:32:196:48 | lines.next_line() [future, Ok, Some] | semmle.label | lines.next_line() [future, Ok, Some] |
| test.rs:196:32:196:54 | await ... [Ok, Some] | semmle.label | await ... [Ok, Some] |
| test.rs:196:32:196:55 | TryExpr [Some] | semmle.label | TryExpr [Some] |
| test.rs:197:18:197:21 | line | semmle.label | line |
subpaths
testFailures
#select
| test.rs:14:14:14:20 | &buffer | test.rs:13:22:13:35 | ...::stdin | test.rs:14:14:14:20 | &buffer | $@ | test.rs:13:22:13:35 | ...::stdin | ...::stdin |
| test.rs:20:14:20:20 | &buffer | test.rs:19:22:19:35 | ...::stdin | test.rs:20:14:20:20 | &buffer | $@ | test.rs:19:22:19:35 | ...::stdin | ...::stdin |
| test.rs:26:14:26:20 | &buffer | test.rs:25:22:25:35 | ...::stdin | test.rs:26:14:26:20 | &buffer | $@ | test.rs:25:22:25:35 | ...::stdin | ...::stdin |
| test.rs:32:14:32:20 | &buffer | test.rs:31:22:31:35 | ...::stdin | test.rs:32:14:32:20 | &buffer | $@ | test.rs:31:22:31:35 | ...::stdin | ...::stdin |
| test.rs:38:14:38:20 | &buffer | test.rs:37:9:37:22 | ...::stdin | test.rs:38:14:38:20 | &buffer | $@ | test.rs:37:9:37:22 | ...::stdin | ...::stdin |
| test.rs:42:14:42:17 | byte | test.rs:41:17:41:30 | ...::stdin | test.rs:42:14:42:17 | byte | $@ | test.rs:41:17:41:30 | ...::stdin | ...::stdin |
| test.rs:50:14:50:18 | &data | test.rs:48:50:48:63 | ...::stdin | test.rs:50:14:50:18 | &data | $@ | test.rs:48:50:48:63 | ...::stdin | ...::stdin |
| test.rs:56:14:56:18 | &data | test.rs:54:46:54:59 | ...::stdin | test.rs:56:14:56:18 | &data | $@ | test.rs:54:46:54:59 | ...::stdin | ...::stdin |
| test.rs:63:14:63:20 | &buffer | test.rs:61:50:61:63 | ...::stdin | test.rs:63:14:63:20 | &buffer | $@ | test.rs:61:50:61:63 | ...::stdin | ...::stdin |
| test.rs:70:14:70:20 | &buffer | test.rs:68:50:68:63 | ...::stdin | test.rs:70:14:70:20 | &buffer | $@ | test.rs:68:50:68:63 | ...::stdin | ...::stdin |
| test.rs:71:14:71:22 | buffer[0] | test.rs:68:50:68:63 | ...::stdin | test.rs:71:14:71:22 | buffer[0] | $@ | test.rs:68:50:68:63 | ...::stdin | ...::stdin |
| test.rs:76:14:76:50 | ... .unwrap() | test.rs:75:56:75:69 | ...::stdin | test.rs:76:14:76:50 | ... .unwrap() | $@ | test.rs:75:56:75:69 | ...::stdin | ...::stdin |
| test.rs:78:18:78:31 | chunk.unwrap() | test.rs:75:56:75:69 | ...::stdin | test.rs:78:18:78:31 | chunk.unwrap() | $@ | test.rs:75:56:75:69 | ...::stdin | ...::stdin |
| test.rs:85:18:85:21 | line | test.rs:83:46:83:59 | ...::stdin | test.rs:85:18:85:21 | line | $@ | test.rs:83:46:83:59 | ...::stdin | ...::stdin |
| test.rs:112:14:112:20 | &buffer | test.rs:109:25:109:40 | ...::stdin | test.rs:112:14:112:20 | &buffer | $@ | test.rs:109:25:109:40 | ...::stdin | ...::stdin |
| test.rs:119:14:119:20 | &buffer | test.rs:116:25:116:40 | ...::stdin | test.rs:119:14:119:20 | &buffer | $@ | test.rs:116:25:116:40 | ...::stdin | ...::stdin |
| test.rs:126:14:126:20 | &buffer | test.rs:123:25:123:40 | ...::stdin | test.rs:126:14:126:20 | &buffer | $@ | test.rs:123:25:123:40 | ...::stdin | ...::stdin |
| test.rs:133:14:133:20 | &buffer | test.rs:130:25:130:40 | ...::stdin | test.rs:133:14:133:20 | &buffer | $@ | test.rs:130:25:130:40 | ...::stdin | ...::stdin |
| test.rs:142:14:142:15 | v1 | test.rs:137:25:137:40 | ...::stdin | test.rs:142:14:142:15 | v1 | $@ | test.rs:137:25:137:40 | ...::stdin | ...::stdin |
| test.rs:143:14:143:15 | v2 | test.rs:137:25:137:40 | ...::stdin | test.rs:143:14:143:15 | v2 | $@ | test.rs:137:25:137:40 | ...::stdin | ...::stdin |
| test.rs:144:14:144:15 | v3 | test.rs:137:25:137:40 | ...::stdin | test.rs:144:14:144:15 | v3 | $@ | test.rs:137:25:137:40 | ...::stdin | ...::stdin |
| test.rs:145:14:145:15 | v4 | test.rs:137:25:137:40 | ...::stdin | test.rs:145:14:145:15 | v4 | $@ | test.rs:137:25:137:40 | ...::stdin | ...::stdin |
| test.rs:152:14:152:20 | &buffer | test.rs:149:25:149:40 | ...::stdin | test.rs:152:14:152:20 | &buffer | $@ | test.rs:149:25:149:40 | ...::stdin | ...::stdin |
| test.rs:160:14:160:18 | &data | test.rs:158:52:158:67 | ...::stdin | test.rs:160:14:160:18 | &data | $@ | test.rs:158:52:158:67 | ...::stdin | ...::stdin |
| test.rs:166:14:166:18 | &data | test.rs:164:48:164:63 | ...::stdin | test.rs:166:14:166:18 | &data | $@ | test.rs:164:48:164:63 | ...::stdin | ...::stdin |
| test.rs:173:14:173:20 | &buffer | test.rs:171:52:171:67 | ...::stdin | test.rs:173:14:173:20 | &buffer | $@ | test.rs:171:52:171:67 | ...::stdin | ...::stdin |
| test.rs:180:14:180:20 | &buffer | test.rs:178:52:178:67 | ...::stdin | test.rs:180:14:180:20 | &buffer | $@ | test.rs:178:52:178:67 | ...::stdin | ...::stdin |
| test.rs:181:14:181:22 | buffer[0] | test.rs:178:52:178:67 | ...::stdin | test.rs:181:14:181:22 | buffer[0] | $@ | test.rs:178:52:178:67 | ...::stdin | ...::stdin |
| test.rs:186:14:186:56 | ... .unwrap() | test.rs:185:58:185:73 | ...::stdin | test.rs:186:14:186:56 | ... .unwrap() | $@ | test.rs:185:58:185:73 | ...::stdin | ...::stdin |
| test.rs:188:18:188:22 | chunk | test.rs:185:58:185:73 | ...::stdin | test.rs:188:18:188:22 | chunk | $@ | test.rs:185:58:185:73 | ...::stdin | ...::stdin |
| test.rs:195:14:195:46 | ... .unwrap() | test.rs:193:48:193:63 | ...::stdin | test.rs:195:14:195:46 | ... .unwrap() | $@ | test.rs:193:48:193:63 | ...::stdin | ...::stdin |
| test.rs:197:18:197:21 | line | test.rs:193:48:193:63 | ...::stdin | test.rs:197:18:197:21 | line | $@ | test.rs:193:48:193:63 | ...::stdin | ...::stdin |

View File

@@ -0,0 +1,36 @@
/**
* @kind path-problem
*/
import rust
import codeql.rust.dataflow.DataFlow
import codeql.rust.Concepts
import utils.test.InlineFlowTest
/**
* Configuration for flow from any threat model source to an argument of the function `sink`.
*/
module MyFlowConfig implements DataFlow::ConfigSig {
predicate isSource(DataFlow::Node source) { source instanceof ThreatModelSource }
predicate isSink(DataFlow::Node sink) {
any(CallExpr call |
call.getFunction().(PathExpr).getPath().getSegment().getIdentifier().getText() = "sink"
).getArgList().getAnArg() = sink.asExpr().getExpr()
}
predicate allowImplicitRead(DataFlow::Node node, DataFlow::ContentSet c) {
// flow out from any content at the sink.
isSink(node) and
exists(c)
}
}
module MyFlowTest = TaintFlowTest<MyFlowConfig>;
import MyFlowTest
import PathGraph
from PathNode source, PathNode sink
where flowPath(source, sink)
select sink, source, sink, "$@", source, source.toString()

View File

@@ -0,0 +1,26 @@
| test.rs:13:22:13:35 | ...::stdin | Flow source 'StdInSource' of type stdin (DEFAULT). |
| test.rs:19:22:19:35 | ...::stdin | Flow source 'StdInSource' of type stdin (DEFAULT). |
| test.rs:25:22:25:35 | ...::stdin | Flow source 'StdInSource' of type stdin (DEFAULT). |
| test.rs:31:22:31:35 | ...::stdin | Flow source 'StdInSource' of type stdin (DEFAULT). |
| test.rs:37:9:37:22 | ...::stdin | Flow source 'StdInSource' of type stdin (DEFAULT). |
| test.rs:41:17:41:30 | ...::stdin | Flow source 'StdInSource' of type stdin (DEFAULT). |
| test.rs:48:50:48:63 | ...::stdin | Flow source 'StdInSource' of type stdin (DEFAULT). |
| test.rs:54:46:54:59 | ...::stdin | Flow source 'StdInSource' of type stdin (DEFAULT). |
| test.rs:61:50:61:63 | ...::stdin | Flow source 'StdInSource' of type stdin (DEFAULT). |
| test.rs:68:50:68:63 | ...::stdin | Flow source 'StdInSource' of type stdin (DEFAULT). |
| test.rs:75:56:75:69 | ...::stdin | Flow source 'StdInSource' of type stdin (DEFAULT). |
| test.rs:83:46:83:59 | ...::stdin | Flow source 'StdInSource' of type stdin (DEFAULT). |
| test.rs:90:46:90:59 | ...::stdin | Flow source 'StdInSource' of type stdin (DEFAULT). |
| test.rs:96:46:96:59 | ...::stdin | Flow source 'StdInSource' of type stdin (DEFAULT). |
| test.rs:109:25:109:40 | ...::stdin | Flow source 'StdInSource' of type stdin (DEFAULT). |
| test.rs:116:25:116:40 | ...::stdin | Flow source 'StdInSource' of type stdin (DEFAULT). |
| test.rs:123:25:123:40 | ...::stdin | Flow source 'StdInSource' of type stdin (DEFAULT). |
| test.rs:130:25:130:40 | ...::stdin | Flow source 'StdInSource' of type stdin (DEFAULT). |
| test.rs:137:25:137:40 | ...::stdin | Flow source 'StdInSource' of type stdin (DEFAULT). |
| test.rs:149:25:149:40 | ...::stdin | Flow source 'StdInSource' of type stdin (DEFAULT). |
| test.rs:158:52:158:67 | ...::stdin | Flow source 'StdInSource' of type stdin (DEFAULT). |
| test.rs:164:48:164:63 | ...::stdin | Flow source 'StdInSource' of type stdin (DEFAULT). |
| test.rs:171:52:171:67 | ...::stdin | Flow source 'StdInSource' of type stdin (DEFAULT). |
| test.rs:178:52:178:67 | ...::stdin | Flow source 'StdInSource' of type stdin (DEFAULT). |
| test.rs:185:58:185:73 | ...::stdin | Flow source 'StdInSource' of type stdin (DEFAULT). |
| test.rs:193:48:193:63 | ...::stdin | Flow source 'StdInSource' of type stdin (DEFAULT). |

View File

@@ -0,0 +1,2 @@
query: queries/summary/TaintSources.ql
postprocess: utils/test/InlineExpectationsTestQuery.ql

View File

@@ -0,0 +1,5 @@
qltest_cargo_check: true
qltest_dependencies:
- bytes = { version = "1.10.1" }
- futures = { version = "0.3" }
- tokio = { version = "1.43.0", features = ["full"] }

View File

@@ -0,0 +1,219 @@
fn sink<T>(_: T) { }
// --- tests ---
use std::io::{Read, BufRead};
use tokio::io::{AsyncReadExt, AsyncBufReadExt};
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::<u8>::new();
let _bytes = std::io::stdin().read_to_end(&mut buffer)?; // $ Alert[rust/summary/taint-sources]
sink(&buffer); // $ 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::<u8>::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()); // $ 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(())
}
async fn test_tokio_stdin() -> Result<(), Box<dyn std::error::Error>> {
// --- 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::<u8>::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::<u8>::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); // $ 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); // $ hasTaintFlow
}
}
Ok(())
}
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
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),
}
Ok(())
}

View File

@@ -146,207 +146,6 @@ async fn test_hyper_http(case: i64) -> Result<(), Box<dyn std::error::Error>> {
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::<u8>::new();
let _bytes = std::io::stdin().read_to_end(&mut buffer)?; // $ Alert[rust/summary/taint-sources]
sink(&buffer); // $ 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::<u8>::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()); // $ 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<dyn std::error::Error>> {
// --- 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::<u8>::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::<u8>::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); // $ 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); // $ hasTaintFlow
}
}
Ok(())
}
use std::net::ToSocketAddrs;
async fn test_std_tcpstream(case: i64) -> std::io::Result<()> {
@@ -777,18 +576,6 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
Err(e) => println!("error: {}", e),
}
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_std_tcpstream...");
match futures::executor::block_on(test_std_tcpstream(case)) {
Ok(_) => println!("complete"),