Skip to content
This repository has been archived by the owner on May 20, 2021. It is now read-only.

Force a move from sha1 to sha256 or sha512 #125

Open
grahamc opened this issue Jan 7, 2020 · 2 comments
Open

Force a move from sha1 to sha256 or sha512 #125

grahamc opened this issue Jan 7, 2020 · 2 comments

Comments

@grahamc
Copy link
Member

grahamc commented Jan 7, 2020

sha1 is pretty broken: https://sha-mbles.github.io/

I think it is time to force a move to sha256. If npm isn't providing better than sha1, I think we should fetch the file, validate the sha1 matches, and then calculate a sha256.

What do you think about that? Right now, yarn2nix-built packages represent the vast majority of sha1 references in Nixpkgs, which we're trying to get rid of: NixOS/nixpkgs#77238

@grahamc grahamc changed the title Force a move to sha1 Force a move from sha1 to sha256 or sha512 Jan 7, 2020
@Pauan
Copy link

Pauan commented Jan 8, 2020

Just a note that since 2017 both yarn and npm use sha512 by default (sha1 is only used for compatibility with legacy packages).

The integrity field in the yarn.lock file contains the sha512.

@grahamc
Copy link
Member Author

grahamc commented Jan 8, 2020

Sounds good, then it won't require many packages to be rehashed to get a sha-512.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants