Method: InspecPlugins::InspecToolsPlugin::CliCommand#generate_map

Defined in:
lib/inspec_tools/plugin_cli.rb

#generate_mapObject



138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
# File 'lib/inspec_tools/plugin_cli.rb', line 138

def generate_map
  template = '
  # Setting csv_header to true will skip the csv file header
  skip_csv_header: true
  width   : 80


  control.id: 0
  control.title: 15
  control.desc: 16
  control.tags:
          severity: 1
          rid: 8
          stig_id: 3
          cci: 2
          check: 12
          fix: 10
  '
  myfile = File.new('mapping.yml', 'w')
  myfile.puts template
  myfile.close
end