Conversation

When the left-pad debacle happened, I feared that people would conclude “dependencies are bad”. (Instead of the logical conclusion, which is “don’t allow dependencies to be deleted from package registries.”) That prediction turned out to be true. :(
13
86
It's worth keeping in mind that Git hashes and signed commits / tags entirely depend on sha1 though. It's increasingly a bad idea to depend on any of it for security. Unfortunately, Git doesn't offer a solution and sources really need to be distributed in signed archive files.
2
2
Replying to
That's why I said it's an increasingly bad idea to depend on it. It doesn't make sense to be building infrastructure today that depends on sha1 and has no real migration plan away from it. Creating a dependency on Git revisions or signed commits / tags today isn't a good plan.
1
Replying to and
Something being known also doesn't imply that it's public. The reasoning that you're using is flawed. Publicly disclosed vulnerabilities or attacks aren't the full picture. It's known to have serious weaknesses and an accelerating pace of the disclosed attacks being improved.
2
Replying to and
As I mentioned, it's also very bad practice to be exposing so much attack surface before verification rather than after verification. For example, it isn't considered appropriate for a binary package manager to extract files from an archive before verifying yet it's way simpler.
1
Replying to and
So if we're talking about security, exposing a massive amount of attack surface from Git doesn't seem like a good move. It's not designed or implemented in a way that's secure. It's a bunch of non-battle-hardened C code not following security best practices + also using sha1.
1
Replying to and
A package manager with decent security has proper package signing, and that includes source packages. I don't think this can be achieved on top of Git and GPG. Each dependency is attack surface for an attacker to find a compromised key. If there isn't signing, then not even that.