Live data from Hacker News

Crev: dependency vetting with a web of trust

github.com

31–40 of 43 posts

Re: Crev: dependency vetting with a web of trust

#31
post #4

Some background on this: Cargo makes it very easy to add dependencies. Rust has the same culture of small, single-purpose libraries as npm (there is https://crates.io/crates/left_pad if you're wondering). This of course raises the question: what if someone puts some malware in a crate? Cargo itself has an OK security (and working on more end-to-end integrity checks), so it's unlikely that someone will inject malware…

> Rust is not a sandbox language. Even the "safe" subset of the language is still just about preventing bugs, but nowhere near a watertight sandbox required to protect programmers and users from straight-up malware running in their own program.

Not only that, but even just the act of building a dependency is unsafe as dependencies can specify build scripts (which is just Rust code that's compiled and executed prior to building the crate).

Re: Crev: dependency vetting with a web of trust

#32
post #27

This doesnt prevent trusted people from doing stupid things like this https://news.ycombinator.com/item?id=18534392 We need to trust the code not the programmer

It doesn't, but now both the original author and some number of independent reviewers have to do stupid things in order to cause harm. That's an improvement to the current situation where you mainly trust the author in most cases.

A review is only valid for a specific version/hash of a set of files, so if you only upgrade your dependencies once they have enough trusted reviews you should be safe.

Re: Crev: dependency vetting with a web of trust

#33
post #26

Earlier quoted context omitted.

Who would trust those?

Then the question becomes, how do you know who to trust ? Are you supposed to also vet the id-hashes of the signers ?

I guess you will trust coworkers, people you know irl, well known developers, companies you pay for review subscriptions. You don't have to trust all of them 100%if you require multiple reviews per dependency.

Re: Crev: dependency vetting with a web of trust

#34
post #18

How does Crev's web of trust work !? What if the malicious user creates a bunch of fake id's to sign the compromised code ?

I have a similar thought. WoT relies upon authentication. How does Crev do authentication? What methods are used for key revocation, etc? It didn't seem to me that they were tackling that directly but relying on a proper use of underlying technology. Possibly I'm wrong or possibly they haven't got that far, but I'd love to see a more explicit description of exactly what they've thought out so far.

Re: Crev: dependency vetting with a web of trust

#35
post #12

Earlier quoted context omitted.

I'm pretty sure the left-pad crate is a joke. That functionality is in the standard library...

The only dependency of left_pad: https://crates.io/crates/kik "waiting for a takedown notice :P"

That's not a dependent on left pad, that's something which depends on left pad.

Re: Crev: dependency vetting with a web of trust

#37

It would be really cool if this could express claims about copyright and license, as well as code quality.

This seems like something you need a lawyer for. Perhaps a web of lawyers. The hardest part with (L)GPL compliance has a lot to do with the significance of the linked GPL’d code and how enforceable these licenses are. Not easy questions to answer for nonexpeerts and even experts will disagree.

Re: Crev: dependency vetting with a web of trust

#38

If something’s malicious, shouldn’t we just flag and remove it? Why is a concept of trust needed here?

Well, because that itself would become another attack vector. You need some sort of post-review after something is flagged malicious to prevent arbitrary take downs.

Re: Crev: dependency vetting with a web of trust

#39
post #4

Some background on this: Cargo makes it very easy to add dependencies. Rust has the same culture of small, single-purpose libraries as npm (there is https://crates.io/crates/left_pad if you're wondering). This of course raises the question: what if someone puts some malware in a crate? Cargo itself has an OK security (and working on more end-to-end integrity checks), so it's unlikely that someone will inject malware…

Cargo makes it very easy to add dependencies. Rust has the same culture of small, single-purpose libraries as npm

This of course raises the question: what if someone puts some malware in a crate?

Do decentralized web of trust schemes actually work? What are the precedents? AFAIK, only centralized webs of trust work, and even those still leak around the edges and take some degree of active policing to defend. Basically, someone (or maybe a few competing someones) with authority establishes a canonical boundary and publishes a canonical list.

Re: Crev: dependency vetting with a web of trust

#40

If something’s malicious, shouldn’t we just flag and remove it? Why is a concept of trust needed here?

You would, but that doesn't help you until someone figures out that it is malicious. This lets you track who has actually verified that the package is not malicious.
Post reply on HN