Skip to content

Commit b8e3c2c

Browse files
baby-gnumyii
authored andcommitted
chore(rubocop): allow use of YAML.load for _mapdata.rb [skip ci]
* Automated using myii/ssf-formula#296
1 parent 1cf2ec9 commit b8e3c2c

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

.rubocop.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,8 @@ Metrics/BlockLength:
1212
- describe
1313
# Increase from default of `25`
1414
Max: 30
15+
Security/YAMLLoad:
16+
Exclude:
17+
- test/integration/**/_mapdata.rb
1518

1619
# Any offenses that should be fixed, e.g. collected via. `rubocop --auto-gen-config`

test/integration/default/controls/_mapdata.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
mapdata_file_path = "_mapdata/#{platform_finger}.yaml"
2424
# Load the mapdata from profile, into a YAML structure
2525
# https://docs.chef.io/inspec/profiles/#profile-files
26-
mapdata_file_yaml = YAML.safe_load(inspec.profile.file(mapdata_file_path))
26+
mapdata_file_yaml = YAML.load(inspec.profile.file(mapdata_file_path))
2727
# Dump the YAML back into a string for comparison
2828
mapdata_file_dump = YAML.dump(mapdata_file_yaml)
2929

0 commit comments

Comments
 (0)