Skip to content

Commit

Permalink
Replace unsafe pyyaml loader with SafeLoader
Browse files Browse the repository at this point in the history
  • Loading branch information
pixee-b1171e79b0e16eb5[bot] authored May 24, 2024
1 parent 0431aca commit e4f468b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions introduction/lab_code/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
'''
import yaml, subprocess
stream = open('/home/fox/test.yaml', 'r')
data = yaml.load(stream)
data = yaml.load(stream, Loader=yaml.SafeLoader)

'''
stdout, stderr = data.communicate()
Expand All @@ -26,4 +26,4 @@
'''
print(data + "\n")
# print(stdout + "\n")
# print(stderr + "\n")
# print(stderr + "\n")

0 comments on commit e4f468b

Please sign in to comment.