@@ -16,21 +16,21 @@ use std::task::{Context, Poll};
16
16
17
17
async fn test_futures_rustls_futures_io ( ) -> io:: Result < ( ) > {
18
18
let url = "www.example.com:443" ;
19
- let tcp = TcpStream :: connect ( url) . await ?; // $ MISSING: Alert[rust/summary/taint-sources]
20
- sink ( & tcp) ; // $ MISSING: hasTaintFlow=url
19
+ let tcp = TcpStream :: connect ( url) . await ?; // $ Alert[rust/summary/taint-sources]
20
+ sink ( & tcp) ; // $ hasTaintFlow=url
21
21
let config = rustls:: ClientConfig :: builder ( )
22
22
. with_root_certificates ( rustls:: RootCertStore :: empty ( ) )
23
23
. with_no_client_auth ( ) ;
24
24
let connector = TlsConnector :: from ( Arc :: new ( config) ) ;
25
25
let server_name = rustls:: pki_types:: ServerName :: try_from ( "www.example.com" ) . unwrap ( ) ;
26
26
let mut reader = connector. connect ( server_name, tcp) . await ?;
27
- sink ( & reader) ; // $ MISSING: hasTaintFlow=url
27
+ sink ( & reader) ; // $ hasTaintFlow=url
28
28
29
29
{
30
30
// using the `AsyncRead` trait (low-level)
31
31
let mut buffer = [ 0u8 ; 64 ] ;
32
32
let mut pinned = Pin :: new ( & mut reader) ;
33
- sink ( & pinned) ; // $ MISSING: hasTaintFlow=url
33
+ sink ( & pinned) ; // $ hasTaintFlow=url
34
34
let mut cx = Context :: from_waker ( futures:: task:: noop_waker_ref ( ) ) ;
35
35
let bytes_read = pinned. poll_read ( & mut cx, & mut buffer) ; // we cannot correctly resolve this call, since it relies on `Deref`
36
36
if let Poll :: Ready ( Ok ( n) ) = bytes_read {
@@ -52,12 +52,12 @@ async fn test_futures_rustls_futures_io() -> io::Result<()> {
52
52
}
53
53
54
54
let mut reader2 = futures:: io:: BufReader :: new ( reader) ;
55
- sink ( & reader2) ; // $ MISSING: hasTaintFlow=url
55
+ sink ( & reader2) ; // $ hasTaintFlow=url
56
56
57
57
{
58
58
// using the `AsyncBufRead` trait (low-level)
59
59
let mut pinned = Pin :: new ( & mut reader2) ;
60
- sink ( & pinned) ; // $ MISSING: hasTaintFlow=url
60
+ sink ( & pinned) ; // $ hasTaintFlow=url
61
61
let mut cx = Context :: from_waker ( futures:: task:: noop_waker_ref ( ) ) ;
62
62
let buffer = pinned. poll_fill_buf ( & mut cx) ;
63
63
if let Poll :: Ready ( Ok ( buf) ) = buffer {
@@ -88,7 +88,7 @@ async fn test_futures_rustls_futures_io() -> io::Result<()> {
88
88
// using the `AsyncRead` trait (low-level)
89
89
let mut buffer = [ 0u8 ; 64 ] ;
90
90
let mut pinned = Pin :: new ( & mut reader2) ;
91
- sink ( & pinned) ; // $ MISSING: hasTaintFlow=url
91
+ sink ( & pinned) ; // $ hasTaintFlow=url
92
92
let mut cx = Context :: from_waker ( futures:: task:: noop_waker_ref ( ) ) ;
93
93
let bytes_read = pinned. poll_read ( & mut cx, & mut buffer) ;
94
94
sink ( & buffer) ; // $ MISSING: hasTaintFlow=url
@@ -111,7 +111,7 @@ async fn test_futures_rustls_futures_io() -> io::Result<()> {
111
111
{
112
112
// using the `AsyncBufRead` trait (low-level)
113
113
let mut pinned = Pin :: new ( & mut reader2) ;
114
- sink ( & pinned) ; // $ MISSING: hasTaintFlow=url
114
+ sink ( & pinned) ; // $ hasTaintFlow=url
115
115
let mut cx = Context :: from_waker ( futures:: task:: noop_waker_ref ( ) ) ;
116
116
let buffer = pinned. poll_fill_buf ( & mut cx) ;
117
117
sink ( & buffer) ; // $ MISSING: hasTaintFlow=url
0 commit comments