Skip to content

Commit

Permalink
chore(rubocop): allow use of YAML.load for _mapdata.rb [skip ci]
Browse files Browse the repository at this point in the history
* Automated using myii/ssf-formula#296
  • Loading branch information
baby-gnu authored and myii committed Feb 23, 2021
1 parent 9f8e5a3 commit c75701a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ Metrics/BlockLength:
- describe
# Increase from default of `25`
Max: 30
Security/YAMLLoad:
Exclude:
- test/integration/**/_mapdata.rb

# General settings across all cops in this formula
AllCops:
Expand Down
2 changes: 1 addition & 1 deletion test/integration/default/controls/_mapdata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
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)

Expand Down

0 comments on commit c75701a

Please sign in to comment.