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

@langyizhao langyizhao commented Sep 30, 2020

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 this to the 0.4.0 milestone Oct 2, 2020
Copy link
Member

@kezhenxu94 kezhenxu94 left a comment

Test codes only, LGTM

…ern_B506
@kezhenxu94 kezhenxu94 merged commit cbf689f into apache:master Oct 8, 2020
5 checks passed
5 checks passed
Build (3.5)
Details
Build (3.6)
Details
Build (3.7)
Details
Build (3.8)
Details
musedev Complete (1 min, 3/7 checks) no new bugs found
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.