-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Get rid of sha1 for fixed-output derivations in nixpkgs #77238
Comments
related to: NixOS#77238
We can script most of this by using
|
@grahamc Thanks for looking into this. I think these types of security related fixes are important! I was wondering how you determined the list of files using sha1? I wanted to fix the haskell-related files ( |
I did a simple search of |
Once we clean up all the generators, we can rerun with |
All the packages in For example, acorn 4.0.13 doesn't have a sha512 hash:
{
"shasum": "105495ae5361d697bd195c825192e1ad7f253787",
"tarball": "https://registry.npmjs.org/acorn/-/acorn-4.0.13.tgz"
} but version 7.1.0 does:
{
"integrity": "sha512-kL5CuoXA/dgxlBbVrflsflzQ3PAas7RYZB52NOm/6839iVYJgKMJ3cQJD+t2i5+qFa8h3MDpEOJiS64E8JLnSQ==",
"shasum": "949d36f2c292535da602283586c2477c57eb2d6c",
"tarball": "https://registry.npmjs.org/acorn/-/acorn-7.1.0.tgz",
"fileCount": 11,
"unpackedSize": 1104477,
"npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdibjuCRA9TVsSAnZWagAAmQgQAIkJPo9i+wdBLLZY8yjT\nHI82RsWU5OvIQxhE6H9qLiEfF57ZSn3LfKVugsEocc84loCiJkkd7vsGsidJ\nRMbkEIK2ENjH1VcUHdHq8PnA/HgnMgHNq6nGg+h6aXLsN/H5SFdyvWedoLXw\n5bwhLbfURV/00bx2himrt/RBNL8SxfowdpQ/ps5+mAWUzLTf7D2+PchYktve\nRJ1lSwpshrgu4AxUdbRmqDEH7+Wm5SutB/EMkQPxQV/sJviFzB8qqFlQopJS\n83RuvIhQb7ZNUQeh5A1+pQocFU+yd227m9tAr69UeES8vinI+0FYVh5GNh0y\nk5MoiQiG3LROtO1RNea0uYGv8W7cU9CK/6MnHbDMUgr+fpEeU/VGItZfOLhB\nTg10PpYCKtQCsF+Z36YLTXgxeWEoRvvKWmJET/MDQzBM/pRzMRpPHiWn6E9T\nl9wt1WLix2qM1jymwaq+0H6hcCtu0ioY7qn4GGeCAfVlBxWYcydNR11Rb++n\nO3oXEqhc8oxKy+hIDHIMDDz/YfCrJ9q7ZzMO9Ie5dzOqeLxty4fbuDeLcD9U\nkbuA+I8dfEFmO2UtRwyx3k9yjX2Tsf2oAC8VOTINN8TXiauyTjWyU//lSKDX\nmUHBDXXZhKWgygi3TMNW7gvmzYuzmDcbkienQeoADvONpCuJNmraVaC33n1h\ncQmj\r\n=blZm\r\n-----END PGP SIGNATURE-----\r\n"
} |
related NixOS#77238 (cherry picked from commit 741db8c)
texlive: it has one "sha1 =" string but the code is generic – |
@grahamc I removed this as a blocker because I'm not convinced it's something we should block release on. Thoughts? |
|
|
|
|
@vcunat (edit: I should be asking @veprbl) I can do the sha1 -> sha256 conversion for texlive. Now the increase is 498k -> 676k. Just give a thumbs up if you'd like a PR (or a thumbs down!). |
Well, I don't maintain texlive anymore, for years already. But I assume that what I wrote above still holds (approximately). |
i think the remaining sha1-packages are all related to |
Whenever available use the SRI hashes from the integrity field to create the fetchurl calls instead of entirely relying on the `resolved` sha1 which may or may not exist with recent yarn versions. Related issues: - nix-community/yarn2nix#125 - NixOS#77238
yarn2nix will now use the We probably still want to port the TOFU script https://github.com/NixOS/nixpkgs/blob/bb9bd465b625bfc971908c5d3d84ce517e1c0691/pkgs/development/tools/yarn2nix-moretea/yarn2nix/lib/fixPkgAddMissingSha1.js to a different hash schema and maybe even switch to TOFU for packages using sha1 in |
I sent a draft PR #149834 |
Whenever available use the SRI hashes from the integrity field to create the fetchurl calls instead of entirely relying on the `resolved` sha1 which may or may not exist with recent yarn versions. Related issues: - nix-community/yarn2nix#125 - NixOS#77238
Whenever available use the SRI hashes from the integrity field to create the fetchurl calls instead of entirely relying on the `resolved` sha1 which may or may not exist with recent yarn versions. Related issues: - nix-community/yarn2nix#125 - NixOS#77238
Whenever available use the SRI hashes from the integrity field to create the fetchurl calls instead of entirely relying on the `resolved` sha1 which may or may not exist with recent yarn versions. Related issues: - nix-community/yarn2nix#125 - NixOS#77238
Hello, I would like to help with this, any suggestions where I can get started? |
I went and updated the list in the issue, checking all files not yet marked as done (in some cases updating their path) and adding a few I found with PS: I looked through the remaining cases, and
The most sensible approach for |
Issue description
We're in 2020 and:
Biggest usage of sha1 is files generated for Node packages:
Steps to resolve, higher level
Files to address
pkgs/applications/graphics/gcolor2/default.nix
pkgs/applications/networking/browsers/mozilla-plugins/google-talk-plugin/default.nix
spacegun: remove #232957pkgs/applications/networking/cluster/spacegun/node-packages.nix
pkgs/applications/networking/instant-messengers/matrix-recorder/node-packages.nix
pkgs/applications/networking/instant-messengers/riot/riot-desktop-yarndeps.nix
0f59dbapkgs/applications/office/grisbi/default.nix
pkgs/applications/version-management/gitlab/yarnPkgs.nix
2d1057fpkgs/build-support/vm/rpm/rpm-closure.pl
pkgs/development/compilers/elm/packages/
pkgs/development/compilers/graalvm/default.nix
pkgs/development/haskell-modules/configuration-common.nix
(false positive)pkgs/development/haskell-modules/configuration-hackage2nix.yaml
(false positive)pkgs/development/libraries/wxsqlite3/default.nix
pkgs/development/libraries/wxsqliteplus/default.nix
pkgs/development/tools/google-clasp/default.nix
pkgs/development/mobile/androidenv/repo.json
pkgs/development/mobile/androidenv/compose-android-packages.nix
pkgs/development/node-packages/node-env.nix
pkgs/development/node-packages/node-packages.nix
pkgs/development/tools/unity3d/default.nix
pkgs/development/tools/yarn2nix-moretea/yarn2nix/yarn.lock
pkgs/development/tools/yarn2nix-moretea/yarn2nix/yarn.nix
pkgs/development/web/netlify-cli/node-packages.nix
pkgs/development/web/remarkjs/node-packages.nix
pkgs/games/minecraft-servers/versions.json
pkgs/misc/base16-builder/node-packages-generated.nix
pkgs/servers/gotify/yarndeps.nix
gotify-server: use fetchYarnDeps #253565pkgs/servers/matrix-synapse/matrix-appservice-slack/
pkgs/servers/monitoring/prometheus/webui-yarndeps.nix
c319107pkgs/servers/rippled/package.nix
pkgs/servers/web-apps/codimd/yarn.nix
149fb9c1c0cc01pkgs/servers/web-apps/cryptpad/node-packages-generated.nix
airfield: remove #232907pkgs/tools/networking/airfield/node-packages.nix
nixui: remove #174200pkgs/tools/package-management/nixui/node-packages.nix
pkgs/tools/typesetting/tex/texlive/default.nix
The text was updated successfully, but these errors were encountered: