package verification

28 views
Skip to first unread message

Ioakim Ioakim

unread,
Jul 25, 2019, 1:30:43 PM7/25/19
to pypa-dev
Hi

Does anyone know where in the source code a package gets verified before being installed?

Thanks

Sviatoslav Sydorenko

unread,
Jul 25, 2019, 1:31:41 PM7/25/19
to Ioakim Ioakim, pypa-dev
Are you talking about `--require-hashes` in Pip?

чт, 25 лип. 2019 о 19:30 Ioakim Ioakim <ioak...@gmail.com> пише:
Hi

Does anyone know where in the source code a package gets verified before being installed?

Thanks

--
You received this message because you are subscribed to the Google Groups "pypa-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pypa-dev+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pypa-dev/89e6ae88-8fb6-40eb-b1a5-d04b94f32710%40googlegroups.com.


--
Kind regards,

Sviatoslav Sydorenko
Message has been deleted
Message has been deleted
Message has been deleted

Ioakim Ioakim

unread,
Jul 26, 2019, 7:57:56 AM7/26/19
to pypa-dev
I am not sure. I am just looking to find where in the source code a package gets verified before being installed on a client's machine

Brett Cannon

unread,
Jul 26, 2019, 12:41:14 PM7/26/19
to Ioakim Ioakim, pypa-dev
Sviatoslav


On Fri, Jul 26, 2019 at 4:58 AM Ioakim Ioakim <ioak...@gmail.com> wrote:
I am not sure. I am just looking to find where in the source code a package gets verified before being installed on a client's machine

Unfortunately something stripped out what you were replying to,  Ioakim, but I assume it was to Sviatoslav and his --require-hashes suggestion, in which case that's what you're looking for if you want to verify what you downloaded matches what PyPI has.

Ian Stapleton Cordasco

unread,
Jul 26, 2019, 7:29:45 PM7/26/19
to Brett Cannon, Ioakim Ioakim, pypa-dev
To be clear, there is no verification or scanning of source code. Not is there verification of origin. PyPI generates hashes that are used to verify the integrity of what was uploaded there and then downloaded

Sent from my phone with my typo-happy thumbs. Please excuse my brevity

--
You received this message because you are subscribed to the Google Groups "pypa-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pypa-dev+u...@googlegroups.com.

Ioakim Ioakim

unread,
Jul 27, 2019, 8:11:18 AM7/27/19
to pypa-dev
Thanks guys


On Saturday, 27 July 2019 00:29:45 UTC+1, Ian Stapleton Cordasco wrote:
To be clear, there is no verification or scanning of source code. Not is there verification of origin. PyPI generates hashes that are used to verify the integrity of what was uploaded there and then downloaded

Sent from my phone with my typo-happy thumbs. Please excuse my brevity

On Fri, Jul 26, 2019, 11:41 Brett Cannon <br...@python.org> wrote:
Sviatoslav


On Fri, Jul 26, 2019 at 4:58 AM Ioakim Ioakim <ioak...@gmail.com> wrote:
I am not sure. I am just looking to find where in the source code a package gets verified before being installed on a client's machine

Unfortunately something stripped out what you were replying to,  Ioakim, but I assume it was to Sviatoslav and his --require-hashes suggestion, in which case that's what you're looking for if you want to verify what you downloaded matches what PyPI has.

--
You received this message because you are subscribed to the Google Groups "pypa-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pypa...@googlegroups.com.

Chris Jerdonek

unread,
Jul 27, 2019, 5:33:31 PM7/27/19
to Ioakim Ioakim, pypa-dev
On Fri, Jul 26, 2019 at 4:57 AM Ioakim Ioakim <ioak...@gmail.com> wrote:
I am not sure. I am just looking to find where in the source code a package gets verified before being installed on a client's machine

If you're using pip with e.g. --require-hashes, it looks like these (after a quick search) are the two main places in pip's code where pip checks the hashes of downloaded files:

--Chris

Ioakim Ioakim

unread,
Jul 28, 2019, 7:01:50 AM7/28/19
to pypa-dev
thanks
Reply all
Reply to author
Forward
0 new messages