Class: InspecTools::XLSXTool
Overview
Methods for converting from XLS to various formats
Constant Summary collapse
- CIS_2_NIST_XLSX =
Roo::Spreadsheet.open(File.join(File.dirname(__FILE__), '../data/NIST_Map_02052020_CIS_Controls_Version_7.1_Implementation_Groups_1.2.xlsx'))
- LATEST_NIST_REV =
'Rev_4'.freeze
Instance Method Summary collapse
-
#initialize(xlsx, mapping, name, verbose = false) ⇒ XLSXTool
constructor
A new instance of XLSXTool.
- #to_ckl ⇒ Object
- #to_inspec(control_prefix) ⇒ Object
- #to_xccdf ⇒ Object
Constructor Details
#initialize(xlsx, mapping, name, verbose = false) ⇒ XLSXTool
Returns a new instance of XLSXTool.
20 21 22 23 24 25 26 |
# File 'lib/inspec_tools/xlsx_tool.rb', line 20 def initialize(xlsx, mapping, name, verbose = false) @name = name @xlsx = xlsx @mapping = mapping @verbose = verbose @cis_to_nist = get_cis_to_nist_control_mapping(CIS_2_NIST_XLSX) end |
Instance Method Details
#to_ckl ⇒ Object
28 29 30 |
# File 'lib/inspec_tools/xlsx_tool.rb', line 28 def to_ckl # TODO end |
#to_inspec(control_prefix) ⇒ Object
36 37 38 39 40 41 42 43 44 45 |
# File 'lib/inspec_tools/xlsx_tool.rb', line 36 def to_inspec(control_prefix) @controls = [] @cci_xml = nil @profile = {} parse_cis_controls(control_prefix) @profile['controls'] = @controls @profile['sha256'] = Digest::SHA256.hexdigest @profile.to_s @profile end |
#to_xccdf ⇒ Object
32 33 34 |
# File 'lib/inspec_tools/xlsx_tool.rb', line 32 def to_xccdf # TODO end |