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

[RST-6280] Support for YAML 6.0+ #2

Merged
merged 2 commits into from Nov 8, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion copyrightify/copyrightify.py
Expand Up @@ -168,7 +168,7 @@ def process_paths(paths, recursive, config, context):

def main():
try:
config = yaml.load(resource_string(__name__, 'config.yaml'))
config = yaml.load(resource_string(__name__, 'config.yaml'), Loader=yaml.FullLoader)

Choose a reason for hiding this comment

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

I think it is generally recommended to use the safe_load command instead of the load command.
https://security.openstack.org/guidelines/dg_avoid-dangerous-input-parsing-libraries.html
Which I think is basically the equivalent of Loader=yaml.SafeLoader.


parser = argparse.ArgumentParser()
parser.add_argument('paths', type=str, nargs='+', help='Path to process')
Expand Down