You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Although lockfiles introduce protection against sha1 collision attacks when resolving artifacts since PyPI is de-facto all sha256 fingerprinted, Pex internal caches all use sha1.
The text was updated successfully, but these errors were encountered:
It seems like protection against external (downloaded) artifacts is enough here. The other inputs to a PEX file are the local interpreter and local --source added to the PEX. Both of these are implicitly trusted. Switching the built_wheels and installed_wheels caches to use sha256 should be enough. The unzipped_pexes and venvs caches are composed from those and guarded by the pex_hash in PEX-INFO which is a sha1 hash of the PEX-INFO json which includes the sha256 hashes of all contained dependency artifacts. I'm no security expert, but to create an attack on that sha1 the only attack surface is the local code hash (which is sha1) and other PEX-INFO settings. All of these items are under local control and so implicitly trusted again.
Previously Pex used Pip's `--target` scheme which had both known bugs
(pypa/pip#7658) and unknown quirks that Pex
was failing to fully be able to work around. Switch to the `--prefix`
scheme which exactly mirrors the scheme venvs use so that venvs can be
created with content of all sorts placed where it belongs.
This removes fragile parsing and interpretation of the RECORD; now Pex
only creates a RECORD, which is much more straight forward, when
building a venv.
Partially addresses #1655 by switching to sha256 for all external
artifact hashing. Only internal hashing remains for:
1. `interpreters` / INTERP-INFO
2. `venvs` and `unzipped_pexes` / PEX-INFO pex_hash (but this is a hash
that includes all distributions' sha256 hashes).
Fixes#1656Closes#1662
Although lockfiles introduce protection against sha1 collision attacks when resolving artifacts since PyPI is de-facto all sha256 fingerprinted, Pex internal caches all use sha1.
The text was updated successfully, but these errors were encountered: