Skip to content

Commit

Permalink
Fix code execution vulnerability by switching to yaml.safe_load
Browse files Browse the repository at this point in the history
  • Loading branch information
ypid committed Feb 21, 2017
1 parent c4c6ce3 commit e0c0845
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/ansiblereview/examples/standards.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def rolesfile_contains_scm_in_src(candidate, settings):
def files_should_have_actual_content(candidate, settings):
errors = []
with codecs.open(candidate.path, mode='rb', encoding='utf-8') as f:
content = yaml.load(f.read())
content = yaml.safe_load(f.read())
if not content:
errors = [Error(None, "%s appears to have no useful content" % candidate)]
return Result(candidate.path, errors)
Expand Down

0 comments on commit e0c0845

Please sign in to comment.