<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://legoktm.com/w/index.php?action=history&amp;feed=atom&amp;title=RustConf_24%2FAudit_Rust_dependencies</id>
	<title>RustConf 24/Audit Rust dependencies - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://legoktm.com/w/index.php?action=history&amp;feed=atom&amp;title=RustConf_24%2FAudit_Rust_dependencies"/>
	<link rel="alternate" type="text/html" href="https://legoktm.com/w/index.php?title=RustConf_24/Audit_Rust_dependencies&amp;action=history"/>
	<updated>2026-04-19T12:55:52Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.17</generator>
	<entry>
		<id>https://legoktm.com/w/index.php?title=RustConf_24/Audit_Rust_dependencies&amp;diff=297&amp;oldid=prev</id>
		<title>Legoktm: new page</title>
		<link rel="alternate" type="text/html" href="https://legoktm.com/w/index.php?title=RustConf_24/Audit_Rust_dependencies&amp;diff=297&amp;oldid=prev"/>
		<updated>2024-09-16T17:23:19Z</updated>

		<summary type="html">&lt;p&gt;new page&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Notes from the RustConf &amp;#039;24 Unconference session about auditing Rust dependencies:&lt;br /&gt;
&lt;br /&gt;
* Half of Fuschia is third-party code&lt;br /&gt;
** Rigorous auditing of Rust code, &lt;br /&gt;
** uses cargo-vet, safe-to-deploy, etc.&lt;br /&gt;
** unsafe review for all crates, no unsoundness, guidelines on how to review unsafe at 5 levels&lt;br /&gt;
*** async Task is incredibly complicated, took longer than 10x bigger and more unsafe crates&lt;br /&gt;
** want better ways to audit dependencies&lt;br /&gt;
* zcash uses cargo-vet, also depends on Fuschia&amp;#039;s reviews&lt;br /&gt;
** cryptographic audits specifically&lt;br /&gt;
* Google (not Fuschia) has its crypto people review any crypto code&lt;br /&gt;
* solarwinds (also xz-utils) really kicked off discussion of supply chain attacks&lt;br /&gt;
* cargo-crev (GPG-style web of trust) and cargo-vet&lt;br /&gt;
* is anyone auditing C libraries/native code that people depend upon?&lt;br /&gt;
** ocassionally have to audit inline assembly (ring?)&lt;br /&gt;
*** is this better than openssl? (uses perl for assembly generator)&lt;br /&gt;
* do we have a way of marking negative reviews?&lt;br /&gt;
** not in cargo-vet&lt;br /&gt;
** also need to mark skipping specific targets and featuresets&lt;br /&gt;
*** e.g. pull in nix crate, 50% of it is super exotic OSes like PlayStation Vita&lt;br /&gt;
** e.g. a crate was approved as long as you set a &amp;quot;no-unsafe&amp;quot; flag&lt;br /&gt;
** we can add comments, but that breaks down cargo-vet&amp;#039;s mechanical&lt;br /&gt;
* ongoing.dev - *who* is in your dependency graph&lt;br /&gt;
** anonymous and drive by contributors are not necessarily bad&lt;br /&gt;
** a crate is in a group, you can see who has reviewed but not necessarily who all is in a position to inject code&lt;br /&gt;
** would like to look at source tree to see if e.g. &amp;quot;Jia Tan&amp;quot; contributed anything&lt;br /&gt;
* crates.io are just zipped up source, cannot reliably go from crates.io to a tag in a git repo&lt;br /&gt;
** there&amp;#039;s a .vcs-info file, generates hash of the commit checked out during publish&lt;br /&gt;
** questionable provenance&lt;br /&gt;
** there&amp;#039;s a new RfC open for trusted publishing with OIDC, trust github&lt;br /&gt;
*** people also publish their own code on random git hosts which don&amp;#039;t have OIDC&lt;br /&gt;
*** would knockout 80%-ish&lt;br /&gt;
** no guarantee there&amp;#039;s a VCS repository&lt;br /&gt;
** new cargo includes a dirty=true&lt;br /&gt;
* another RfC in progress about improving provenance&lt;br /&gt;
* any difference in publishing and source is already a red flag&lt;br /&gt;
* in previous cargo session, discussion about how ring/aws-lc ship object files so windows users don&amp;#039;t need nasm&lt;br /&gt;
** should be done reproducibly, but automated, no one wants to do it by hand&lt;br /&gt;
* Fuschia checks-in generated code, sometimes reviews generator or generated, will cross-reference the two.&lt;br /&gt;
* how much do you review unsafe?&lt;br /&gt;
** in SecureDrop, small team, just look for a comment that makes logical sense&lt;br /&gt;
** using a crate is trusting people and their expertise, if you&amp;#039;re gonna read all the docs, etc. then you could just write it yourself&lt;br /&gt;
*** Actually that&amp;#039;s what Google does, read MS docs and blogs to understand, etc.&lt;br /&gt;
*** Found a bug in socket2 this way regarding null terminated strings&lt;br /&gt;
* easily-nerd sniped people who do reviews, often end up more thorough than needed&lt;br /&gt;
* at Google, aspiring to make the bar for unsafe Rust to be higher than C/C++&lt;br /&gt;
** need better tooling for unsafe Rust. Code review tools aren&amp;#039;t suited to this kind of review&lt;br /&gt;
** Want easy tool to upstream // SAFETY comments (median crate will say &amp;quot;thank you that&amp;#039;s awesome&amp;quot;!)&lt;br /&gt;
** no guide to understand and audit unsafe Rust.&lt;br /&gt;
*** need comphreensive unsafe rust guide&lt;br /&gt;
*** nominomicon is a dictionary&lt;br /&gt;
** had to fight the perception that unsafe Rust is worse than C/C++ (which there&amp;#039;s a sanitizer for)&lt;br /&gt;
** touching a file with unsafe Rust triggers an unsafe reviewer&lt;br /&gt;
* semgrep rule to find unsafe blocks/code&lt;br /&gt;
** maybe bigger scope e.g. if safe code has a necessary invariant&lt;br /&gt;
* room for a different FFI dialect? in between safe and unsafe&lt;br /&gt;
** still fully unsafe because C, but makes reviewing easier with condition that you trust underlying C library&lt;br /&gt;
** a suite of macros for unsafe FFI, just need to verify the macro is invoked correctly&lt;br /&gt;
* do you use miri in unsafe reviews? would like to but it doesn&amp;#039;t work if you have FFI&lt;br /&gt;
* a Rust ubsan would be nice (apparently rustc supports this on some platforms)&lt;br /&gt;
** an edge/FFI sanitizer&lt;br /&gt;
* nix gives us the safe bindings, if we had safe bindings for everything that would be fine&lt;br /&gt;
** scaling that up to every FFI needed for every library is unsolved&lt;br /&gt;
* crates that use 10 windows functions and generate their own bindings instead of using the heavy windows crate&lt;br /&gt;
** also some other crate in your dependency tree is going to have the heavy crate anyways, so you&amp;#039;ve now duplicated stuff&lt;br /&gt;
* process?&lt;br /&gt;
** just go file by file, can mostly eyeball safe Rust (exception: crypto code), harder to do that for unsafe Rust&lt;br /&gt;
*** auditing crypto requires a person good with unsafe Rust and crypto (often not the same person!)&lt;br /&gt;
* easier to go C -&amp;gt; Rust than Rust -&amp;gt; Haskell, hope community starts to look at effects&lt;br /&gt;
** can write code like that, but need to also audit for effect safety&lt;br /&gt;
* (what if: unsafe was a value instead of a keyword?)&lt;br /&gt;
* sunfishcode (does WASI stuff) has a mirror of std fs/net/etc. that is based on sandboxed capabilities&lt;br /&gt;
* need to spend more man-hours on improving cargo-vet (less than expected forward dev from Mozilla) - get in touch&lt;/div&gt;</summary>
		<author><name>Legoktm</name></author>
	</entry>
</feed>