replace YAML.parse with YAML.safe_load in release tool

YAML.parse returns Psych nodes that then need to be converted to plain ruby objects.

Calling YAML.safe_load outputs basic ruby objects already and also increases security as it greatly restricts the classes it deserializes.

Fixes #11208
This commit is contained in:
João Duarte 2019-10-11 09:31:17 +01:00 committed by João Duarte
parent afcb045774
commit a6f02a3826

View file

@ -96,7 +96,7 @@ puts "Pushing commit.."
`git remote add upstream git@github.com:elastic/logstash.git`
`git push upstream #{branch_name}`
current_release = YAML.parse(IO.read("versions.yml"))["logstash"]
current_release = YAML.safe_load(IO.read("versions.yml"))["logstash"]
puts "Creating Pull Request"
pr_title = "bump lock file for #{current_release}"