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 unsafe yaml loading #76

Conversation

langyizhao
Copy link
Contributor

This is to mitigate security issue Use of unsafe yaml load found in https://console.muse.dev/result/ayorra/skywalking-python/01EK1BP85DHDEV2RJTTEYFNV9G?tab=results

According to https://pyyaml.org/wiki/PyYAMLDocumentation
Ideally we should always use safe_load in place of load when the source of yaml can be untrusted (which IS the case because it's from the web)

But I understand that we also want to use CLoader for the sake of performance.
This is a mitigation following https://github.com/yaml/pyyaml/blob/2f463cf5b0e98a52bc20e348d1e69761bf263b86/tests/lib/test_yaml_ext.py#L37

@kezhenxu94 kezhenxu94 added chore Project chores test test labels Oct 2, 2020
@kezhenxu94 kezhenxu94 added this to the 0.4.0 milestone Oct 2, 2020
Copy link
Member

@kezhenxu94 kezhenxu94 left a comment

Choose a reason for hiding this comment

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

Test codes only, LGTM

@kezhenxu94 kezhenxu94 merged commit cbf689f into apache:master Oct 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Project chores test test
Projects
None yet
3 participants