@bagder I find the statement that Rust rewrites of curl would have 67 vulnerabilities misleading, not just because it buckets all "not memory safety" bugs into one category (ignoring other safety-relevant aspects of Rust such as the rich type system for instance with enums, the error handling story, the careful standard library APIs, etc. which _can_ be used properly to reduce the risk of bugs), but most importantly because I don't think AI slop 1:1 rewrites of curl are a relevant benchmark.
The benchmark should be actual established libraries with similar functionality as curl, such as https://docs.rs/reqwest.
According to https://rustsec.org/search.html?q=reqwest, there have been 0 vulnerabilities reported in it (this year and in general). Is it because of under-reporting of vulnerabilities, or is reqwest legitimately safer? One clear pitfall is that the Rust advisory database doesn't list vulnerabilities in transitive dependencies (indeed, rustls had 5 low/medium vulnerabilities reported this year: https://rustsec.org/packages/rustls.html). I think the honest truth is that the analysis is inconclusive. We can't claim that reqwest had 0 vulnerabilities discovered this year, but we also can't claim that it had 67.
One may argue that reqwest doesn't have feature parity with curl (I haven't checked), which would explain a lower vulnerability rate. But I think that'd be a very different story because it becomes a trade-off between more features vs. smaller API surface and security.