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

Mitigate against PyYaml CVE-2017-18342 #1808

Closed
wants to merge 1 commit into from
Closed

Conversation

ssbarnea
Copy link
Member

@ssbarnea ssbarnea commented Mar 6, 2019

While we already use only safe_load on molecule we are better-of
forcing use of a version on PyYaml which is not affected by this
security issue.

Fixes: #1806
Signed-off-by: Sorin Sbarnea ssbarnea@redhat.com

Please include details of what it is, how to use it, how it's been tested

PR Type

  • Bugfix Pull Request

@ssbarnea ssbarnea self-assigned this Mar 6, 2019
@ssbarnea ssbarnea added the bug label Mar 6, 2019
@ssbarnea ssbarnea requested a review from gundalow March 6, 2019 18:35
requirements.txt Outdated Show resolved Hide resolved
@decentral1se
Copy link
Contributor

I'd be inclined to leave this off based on #1808 (comment) and #1806 (comment).

@decentral1se
Copy link
Contributor

Awaits yaml/pyyaml#259 👍

@ssbarnea
Copy link
Member Author

ssbarnea commented Mar 8, 2019

I am not sure if that closing is the right way to deal with it because is not really resolved, we are just waiting for an external dependency but our core is still affected by the use of an unsafe library.

@decentral1se
Copy link
Contributor

I am not sure if that closing is the right way to deal with it because is not really resolved

Sorry if my meaning didn't come across well (or, it always feels bad to get a PR closed!) but #1806 (comment) remains open and is IMHO sufficient to track the progress of the new release of the library. I prefer to minimise noise in the PR/issues list where possible.

@webknjaz
Copy link
Member

webknjaz commented Mar 9, 2019

@ssbarnea we can always reopen/resubmit this once the external requirement is fulfilled. Besides, I'd like to emphasize that it is not a security issue so no need to rush.

Oh, and also it might be wise first ensure that any other dists which are usually installed along with Molecule itself will not suffer the dependencies conflict. I can imagine that if some of our (direct or transitive) deps is following typical semver practices and has pyyaml >=3,<4 to avoid unexpected breaking changes we can get pretty much unusable (impossible to install) software by locking >5.
On Molecule side we already use safe API.

@decentral1se decentral1se deleted the fix/1806-pyyaml branch March 10, 2019 09:08
@ssbarnea ssbarnea restored the fix/1806-pyyaml branch March 13, 2019 16:44
@ssbarnea
Copy link
Member Author

cc

@ssbarnea ssbarnea reopened this Mar 13, 2019
@webknjaz
Copy link
Member

cc #1806 (comment)

Copy link
Contributor

@decentral1se decentral1se left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool! Just missing DCO --signoff again ...

@@ -12,7 +12,7 @@ Jinja2==2.10
pbr==5.1.1
pexpect==4.6.0
psutil==5.4.6; sys_platform!="win32" and sys_platform!="cygwin"
PyYAML==3.13
PyYAML>=5.1 # MIT
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why MIT? Also, this might deserve a major release.

cc @decentral1se

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@webknjaz The comment is only informative, I have seen documenting licenses of dependencies as comments as a common practice in OpenStack and even outside.

I think it does not hurt to start documentig licenses this way.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I doubt we need a major release only for bumping some requirments. As long we do not break our API everything would count as minor.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The API remains unchanged, so think we're looking at a minor release here. Shall we add a change log entry for this? For the comments: it may confuse contributors to see comments with licenses on some dependencies and not on others (is this optional? What is this for? Should I do this?), so I'd rather just avoid this additional practice for our dependency management on this project.

Let's merge this soon!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changelog entry: yes
merge: move to setup.cfg

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would refrain from migrating more into setup.cfg until packaging is fixed. I am considering proposing revert of the famous packaging change from last week #1966.

I think it was too early as it was not tested enough.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not broken. Your use-case is not supported and you didn't provide steps to reproduce so it doesn't count. It works as long as you use it as designed.

While we already use only safe_load on molecule we are better-of
forcing use of a version on PyYaml which is not affected by this
security issue.

Fixes: #1806
Signed-off-by: Sorin Sbarnea <ssbarnea@redhat.com>
@webknjaz webknjaz dismissed their stale review April 17, 2019 16:12

this review is not relevant anymore

@webknjaz
Copy link
Member

Closing as it should be done via #1806 (comment). Feel free to start doing that.

@webknjaz webknjaz closed this Apr 25, 2019
@ssbarnea ssbarnea deleted the fix/1806-pyyaml branch September 20, 2019 08:04
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.

PyYAML update CVE-2017-18342
3 participants