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

Bump minimum requests version to 2.20.0 #491

Merged
merged 1 commit into from
Nov 6, 2018

Conversation

ob-stripe
Copy link
Contributor

r? @brandur-stripe
cc @stripe/api-libraries

GitHub reports a security alert on the repo because the version of requests currently mentioned in Pipfile.lock is 2.19.1, which is subject to this vulnerability: https://nvd.nist.gov/vuln/detail/CVE-2018-18074.

Pipfile.lock is only used in development and has no impact on library users, but we might as well bump the minimum version of requests to 2.20.0 to ensure users are not affected by this vulnerability.

@ob-stripe
Copy link
Contributor Author

Hrm, looks like one of the upgraded packages broke compatibility with 2.7 and 3.4.

@brandur-stripe
Copy link
Contributor

Oof, what a pain. Did you happen to take a look to see if maybe the Request people are going to backport the fix?

The only good news here is that from my reading of the CVE, I think we're relatively safe — we only target our own hostname and I don't think we ever do an https-to-http redirect on the backend anywhere.

@ob-stripe
Copy link
Contributor Author

The compatibility issue wasn't caused by requests itself, but by another updated package (pipenv will only update all packages at once). It was caused by pytest, which requires the pathlib2 module on older Python versions (https://github.com/pytest-dev/pytest/blob/ccdb248397fb54325675c5a359de6804d27f9b4d/setup.py#L16).

The module wasn't installed because our Pipfile.lock is created with Python 3.7. I've updated the CI command to add the --skip-lock flag to avoid this and ensure that the correct dependencies are installed for each Python version. This is also how the requests package handles this (https://github.com/requests/requests/blob/943a5c8e89db1758ae24adbbedacb3b05c32df4a/Makefile#L4).

ptal @brandur-stripe

@brandur-stripe
Copy link
Contributor

Nice investigation! LGTM.

@ob-stripe ob-stripe merged commit 42fcb50 into master Nov 6, 2018
@ob-stripe ob-stripe deleted the ob-bump-min-requests-version branch November 6, 2018 18:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants