@@ -330,6 +330,25 @@ async fn test_tokio_stdin() -> Result<(), Box<dyn std::error::Error>> {
330330 sink ( & buffer) ; // $ MISSING: hasTaintFlow
331331 }
332332
333+ {
334+ let mut stdin = tokio:: io:: stdin ( ) ; // $ MISSING: Alert[rust/summary/taint-sources]
335+ let v1 = stdin. read_u8 ( ) . await ?;
336+ let v2 = stdin. read_i16 ( ) . await ?;
337+ let v3 = stdin. read_f32 ( ) . await ?;
338+ let v4 = stdin. read_i64_le ( ) . await ?;
339+ sink ( v1) ; // $ MISSING: hasTaintFlow
340+ sink ( v2) ; // $ MISSING: hasTaintFlow
341+ sink ( v3) ; // $ MISSING: hasTaintFlow
342+ sink ( v4) ; // $ MISSING: hasTaintFlow
343+ }
344+
345+ {
346+ let mut stdin = tokio:: io:: stdin ( ) ; // $ MISSING: Alert[rust/summary/taint-sources]
347+ let mut buffer = bytes:: BytesMut :: new ( ) ;
348+ stdin. read_buf ( & mut buffer) . await ?;
349+ sink ( & buffer) ; // $ MISSING: hasTaintFlow
350+ }
351+
333352 // --- async reading from stdin (BufReader) ---
334353
335354 {
@@ -495,6 +514,23 @@ async fn test_tokio_file() -> std::io::Result<()> {
495514 sink ( & buffer) ; // $ MISSING: hasTaintFlow="file.txt"
496515 }
497516
517+ {
518+ let v1 = file. read_u8 ( ) . await ?;
519+ let v2 = file. read_i16 ( ) . await ?;
520+ let v3 = file. read_f32 ( ) . await ?;
521+ let v4 = file. read_i64_le ( ) . await ?;
522+ sink ( v1) ; // $ MISSING: hasTaintFlow
523+ sink ( v2) ; // $ MISSING: hasTaintFlow
524+ sink ( v3) ; // $ MISSING: hasTaintFlow
525+ sink ( v4) ; // $ MISSING: hasTaintFlow
526+ }
527+
528+ {
529+ let mut buffer = bytes:: BytesMut :: new ( ) ;
530+ file. read_buf ( & mut buffer) . await ?;
531+ sink ( & buffer) ; // $ MISSING: hasTaintFlow
532+ }
533+
498534 // --- misc operations ---
499535
500536 {
0 commit comments