Skip to content
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

Missing SSL context when downloading classifiers. #57

Closed
abravalheri opened this issue Sep 1, 2022 · 0 comments
Closed

Missing SSL context when downloading classifiers. #57

abravalheri opened this issue Sep 1, 2022 · 0 comments

Comments

@abravalheri
Copy link
Owner

abravalheri commented Sep 1, 2022

pypa/setuptools#3575

I got this report through our security reports from an anonymous individual:

Running a static code analyser over a codebase including setuptools has identified that urlopen is used without passing an SSL config here https://github.com/pypa/setuptools/blob/main/setuptools/config/_validate_pyproject/formats.py#L118 – which means that the SSL certificate isn’t verified.
This isn’t an area I’m an expert in, but documentation suggests that we should be passing e.g. context=ssl.create_default_context() - see https://docs.python.org/3.5/library/urllib.request.html and https://docs.python.org/3.5/library/ssl.html#ssl.create_default_context

I agree there may be a security concern, but I deem it low impact (worst case, a malicious actor could inject invalid classifiers or remove valid ones, merely causing disruption to a build in a local context), so safe to disclose.

abravalheri added a commit that referenced this issue Sep 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant