Subject
reqwest 0.13.4 is a high-level async HTTP client for Rust built on top of hyper, hyper-util, and tower. It supports HTTP/1.1, HTTP/2 (feature-gated), and experimental HTTP/3 (QUIC), with rustls as the default TLS backend and native-tls as an alternative. The public API exposes a Client/ClientBuilder pair for the async interface and a blocking::Client/blocking::ClientBuilder pair that wraps the async implementation with a thread-park bridge. The crate also has a wasm32 target that delegates to the browser Fetch API.
Methodology
The published crate contents were compared against the upstream Git repository at the commit recorded in .cargo_vcs_info.json using diff -rq. All source files under src/ (~40 files, ~10,000 LOC total) were read; the security-sensitive files (src/redirect.rs, src/proxy.rs, src/connect.rs, src/tls.rs, src/cookie.rs, src/async_impl/client.rs, src/blocking/body.rs, src/retry.rs, src/util.rs) were read in full. The grep-based source survey from the runbook was applied. Integration tests exist in the VCS at tests/ (17 test files); unit tests were counted from the source. Dependency descriptions were written from source analysis.
Results
The diff against VCS shows no source-file differences. Only the auto-generated Cargo.toml normalization and files excluded from the published crate (tests, examples, CHANGELOG, .github) differ. No binary artifacts are present, justifying has-binaries. There is no build.rs, justifying has-build-exec and has-install-exec.
The crate is not a proc-macro and performs no I/O at compile time. It opens TCP connections and performs TLS at runtime, justifying uses-network. No filesystem operations occur in the crate's own code; File appears only in documentation examples, justifying uses-filesystem.
Three unsafe blocks exist across two files. The two blocks in src/connect.rs (verbose tracing wrapper, lines 1990-2008) carry inline SAFETY comments and correctly advance a hyper ReadBufCursor only by the number of bytes confirmed filled. The three blocks in src/blocking/body.rs (lines 307-339) zero-initialize newly reserved BytesMut capacity before transmuting MaybeUninit<u8> to u8, and advance the buffer only by the number of bytes the Read impl returned. The blocking body blocks lack SAFETY comments but their invariants are upheld by the immediately preceding logic. All five blocks justify uses-unsafe; the transmute pattern is minimal and necessary for bridging BytesMut's uninitialized-capacity API with a synchronous Read trait, justifying unsafe-minimal and unsafe-safe. SAFETY comments in connect.rs justify unsafe-documented; their absence in blocking/body.rs is a quality note but does not affect soundness.
The redirect policy (src/redirect.rs, lines 239-252) strips Authorization, Cookie, cookie2, Proxy-Authorization, and WWW-Authenticate on any cross-origin redirect (different host, port, or scheme). HTTPS-to-HTTP downgrades on the same host also trigger stripping. The logic is tested with four unit tests including a scheme-downgrade case. This justifies network-safe and network-secure.
Proxy configuration supports explicit Proxy::http/https/all/custom constructors and system proxy discovery (enabled by default via the system-proxy feature, delegated to hyper-util). The NO_PROXY/no_proxy environment variables are read via NoProxy::from_env() in src/proxy.rs. Only documented proxy-configuration variables are consumed; the environment is not enumerated or forwarded, justifying uses-environment and environment-safe.
TLS defaults to rustls backed by rustls-platform-verifier for certificate validation against the platform's native trust store. Both hostname verification and certificate verification are on by default. NoVerifier (which skips all certificate checks) is only reachable via an explicit danger_accept_invalid_certs(true) call. TLS 1.0 and 1.1 are not in the supported-versions list. These behaviors justify uses-crypto and crypto-safe.
The cookie jar (src/cookie.rs) uses cookie_store::CookieStore, which handles origin-scoped cookie storage. The Jar implementation wraps it in a std::sync::RwLock, and the CookieStore trait requires Send + Sync. Concurrent access is correctly synchronized, justifying uses-concurrency, concurrency-safe, and concurrency-documented.
No obfuscated code, base64-encoded payloads, suspicious network endpoints, or telemetry was found, justifying is-benign. The codebase was reviewed for cryptographic implementations, parsers, interpreters, JIT compilers, protocols, data structures, concurrency primitives, and algorithms — none are implemented here; all are delegated to dependencies. This justifies impl-crypto, impl-parser, impl-interpreter, impl-jit, impl-protocol, impl-datastructure, impl-concurrency, and impl-algorithm. No child process execution was found (uses-exec). No JIT compiler is used (uses-jit). No embedded interpreter is used (uses-interpreter). unsafe-tested was not evaluated; reqwest does not run miri or sanitizers in its CI configuration.
One medium-severity finding (FINDING-1) was identified: the default Client has no request timeout, read timeout, or connect timeout. This is explicitly documented as a deliberate design decision, but callers who do not configure a timeout are exposed to indefinitely stalled connections, which can cause resource exhaustion in server or proxy contexts.
Unit tests total 100 inline #[test] items across the source; integration tests cover redirect, proxy, cookie, retry, timeout, decompression, multipart, and blocking behaviors in the VCS tests directory, justifying has-unit-tests and has-integration-tests. No fuzz or property tests exist, justifying has-fuzz-tests and has-property-tests.
Conclusion
reqwest 0.13.4 is a large, well-structured crate with a clear tower-based middleware architecture. The five unsafe blocks were reviewed and found sound; the redirect sensitive-header stripping is correct and tested; TLS defaults are conservative. One medium-severity finding concerns the absence of a default request timeout, which is documented but operationally significant for server-side users who do not explicitly configure one.