diff --git a/.rubocop.yml b/.rubocop.yml index 7fd75ac..9367e99 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -12,5 +12,8 @@ Metrics/BlockLength: - describe # Increase from default of `25` Max: 30 +Security/YAMLLoad: + Exclude: + - test/integration/**/_mapdata.rb # Any offenses that should be fixed, e.g. collected via. `rubocop --auto-gen-config` diff --git a/test/integration/v3000-py2/controls/_mapdata.rb b/test/integration/v3000-py2/controls/_mapdata.rb index b0232ad..b2b0541 100644 --- a/test/integration/v3000-py2/controls/_mapdata.rb +++ b/test/integration/v3000-py2/controls/_mapdata.rb @@ -23,7 +23,7 @@ control 'salt._mapdata' do mapdata_file_path = "_mapdata/#{platform_finger}.yaml" # Load the mapdata from profile, into a YAML structure # https://docs.chef.io/inspec/profiles/#profile-files - mapdata_file_yaml = YAML.safe_load(inspec.profile.file(mapdata_file_path)) + mapdata_file_yaml = YAML.load(inspec.profile.file(mapdata_file_path)) # Dump the YAML back into a string for comparison mapdata_file_dump = YAML.dump(mapdata_file_yaml) diff --git a/test/integration/v3000-py3/controls/_mapdata.rb b/test/integration/v3000-py3/controls/_mapdata.rb index b0232ad..b2b0541 100644 --- a/test/integration/v3000-py3/controls/_mapdata.rb +++ b/test/integration/v3000-py3/controls/_mapdata.rb @@ -23,7 +23,7 @@ control 'salt._mapdata' do mapdata_file_path = "_mapdata/#{platform_finger}.yaml" # Load the mapdata from profile, into a YAML structure # https://docs.chef.io/inspec/profiles/#profile-files - mapdata_file_yaml = YAML.safe_load(inspec.profile.file(mapdata_file_path)) + mapdata_file_yaml = YAML.load(inspec.profile.file(mapdata_file_path)) # Dump the YAML back into a string for comparison mapdata_file_dump = YAML.dump(mapdata_file_yaml) diff --git a/test/integration/v3001-py3/controls/_mapdata.rb b/test/integration/v3001-py3/controls/_mapdata.rb index b0232ad..b2b0541 100644 --- a/test/integration/v3001-py3/controls/_mapdata.rb +++ b/test/integration/v3001-py3/controls/_mapdata.rb @@ -23,7 +23,7 @@ control 'salt._mapdata' do mapdata_file_path = "_mapdata/#{platform_finger}.yaml" # Load the mapdata from profile, into a YAML structure # https://docs.chef.io/inspec/profiles/#profile-files - mapdata_file_yaml = YAML.safe_load(inspec.profile.file(mapdata_file_path)) + mapdata_file_yaml = YAML.load(inspec.profile.file(mapdata_file_path)) # Dump the YAML back into a string for comparison mapdata_file_dump = YAML.dump(mapdata_file_yaml) diff --git a/test/integration/v3002-py3/controls/_mapdata.rb b/test/integration/v3002-py3/controls/_mapdata.rb index b0232ad..b2b0541 100644 --- a/test/integration/v3002-py3/controls/_mapdata.rb +++ b/test/integration/v3002-py3/controls/_mapdata.rb @@ -23,7 +23,7 @@ control 'salt._mapdata' do mapdata_file_path = "_mapdata/#{platform_finger}.yaml" # Load the mapdata from profile, into a YAML structure # https://docs.chef.io/inspec/profiles/#profile-files - mapdata_file_yaml = YAML.safe_load(inspec.profile.file(mapdata_file_path)) + mapdata_file_yaml = YAML.load(inspec.profile.file(mapdata_file_path)) # Dump the YAML back into a string for comparison mapdata_file_dump = YAML.dump(mapdata_file_yaml)