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
Secure bootstrap technique #63
Comments
Original comment by jaraco (Bitbucket: jaraco, GitHub: jaraco): I don't believe it's viable to deprecate the use of ez_setup for bootstrapping for two reasons: bootstrapping needs to be easy and bootstrapping needs to be programmatic. Ease of UseMost end users of setuptools aren't drawn to setuptools for its shiny features or functionality. Many install setuptools because the package they really want depends on it. As a result, many users are already in a pre-requisite step for their desired goals. For that reason, and the fact that many users may not even be Python programmers or necessarily proficient with computers, the installation should be simple and as close to a "one-click install" as possible. While "download, unpack, and run setup.py" sounds like a fairly straightforward step, when you extract the implicit steps, especially on Windows, it comes out to many steps:
(and if I really wanted to be pedantic and explicit, I would provide instructions on how to start Internet Explorer, where to click to enter a URL, etc.) Even the current process, which is what Distribute promoted, was considered burdensome for novice users compared to setuptools, which provided Windows installers. Programmatic OperationIn addition to the manual invocation as advertised in the installation instructions, ez_setup.py is also used mechanically by projects that choose to bootstrap setuptools as part of their own package (via the As a result, I suggest we focus on security the bootstrap script, whether that means bringing back bundled checksums or signing releases or another technique (perhaps shelling out to a system HTTP client). |
Original comment by qwcode (Bitbucket: qwcode, GitHub: qwcode): thanks for the effort, but it bugs me that it can still be insecure w/o curl or powershell. couldn't
|
…apping setuptools, leveraging system tools for trust validation.
Originally reported by: jaraco (Bitbucket: jaraco, GitHub: jaraco)
@dstufft has pointed out that the bootstrap technique for setuptools uses Python's urllib for downloading tarballs, and this technique, even though it uses SSL, does not do proper certificate validation, so is still subject to a man-in-the-middle attack.
One proposed suggestion is to simply deprecate the use of ez_setup and change the bootstrap instructions to direct users to download, extract, and install the tarball directly (presumably using a secure HTTP client).
Another possible approach is to secure the bootstrap script itself, such as is being discussed in #11.
The text was updated successfully, but these errors were encountered: