inspec_tools 1.4.2 → 1.7.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +244 -36
- data/README.md +34 -41
- data/Rakefile +6 -0
- data/exe/inspec_tools +1 -1
- data/lib/data/NIST_Map_02052020_CIS_Controls_Version_7.1_Implementation_Groups_1.2.xlsx +0 -0
- data/lib/data/README.TXT +1 -1
- data/lib/data/attributes.yml +8 -7
- data/lib/happy_mapper_tools/stig_checklist.rb +0 -1
- data/lib/inspec_tools.rb +1 -0
- data/lib/inspec_tools/cli.rb +26 -199
- data/lib/inspec_tools/csv.rb +2 -4
- data/lib/inspec_tools/inspec.rb +2 -2
- data/lib/inspec_tools/pdf.rb +2 -3
- data/lib/inspec_tools/plugin.rb +15 -0
- data/lib/inspec_tools/plugin_cli.rb +275 -0
- data/lib/inspec_tools/summary.rb +1 -1
- data/lib/inspec_tools/version.rb +1 -1
- data/lib/inspec_tools/xccdf.rb +2 -3
- data/lib/inspec_tools/xlsx.rb +117 -0
- data/lib/inspec_tools_plugin.rb +7 -0
- data/lib/utilities/inspec_util.rb +93 -34
- metadata +56 -53
- data/lib/data/debug_text +0 -5941
- data/lib/inspec_tools/command.rb +0 -50
- data/test/unit/inspec_tools/csv_test.rb +0 -30
- data/test/unit/inspec_tools/inspec_test.rb +0 -54
- data/test/unit/inspec_tools/pdf_test.rb +0 -24
- data/test/unit/inspec_tools/summary_test.rb +0 -42
- data/test/unit/inspec_tools/xccdf_test.rb +0 -50
- data/test/unit/inspec_tools_test.rb +0 -7
- data/test/unit/test_helper.rb +0 -5
- data/test/unit/utils/inspec_util_test.rb +0 -44
data/lib/inspec_tools/summary.rb
CHANGED
@@ -48,7 +48,7 @@ module InspecTools
|
|
48
48
|
@summary[:buckets][:passed] = select_by_status(@data, 'NotAFinding')
|
49
49
|
@summary[:buckets][:no_impact] = select_by_status(@data, 'Not_Applicable')
|
50
50
|
@summary[:buckets][:skipped] = select_by_status(@data, 'Not_Reviewed')
|
51
|
-
@summary[:buckets][:error] = select_by_status(@data, '
|
51
|
+
@summary[:buckets][:error] = select_by_status(@data, 'Profile_Error')
|
52
52
|
|
53
53
|
@summary[:status] = {}
|
54
54
|
@summary[:status][:failed] = tally_by_impact(@summary[:buckets][:failed])
|
data/lib/inspec_tools/version.rb
CHANGED
data/lib/inspec_tools/xccdf.rb
CHANGED
@@ -4,7 +4,6 @@ require_relative '../utilities/inspec_util'
|
|
4
4
|
|
5
5
|
require 'digest'
|
6
6
|
require 'json'
|
7
|
-
require 'inspec'
|
8
7
|
|
9
8
|
module InspecTools
|
10
9
|
# rubocop:disable Metrics/ClassLength
|
@@ -109,8 +108,8 @@ module InspecTools
|
|
109
108
|
@profile['supports'] = []
|
110
109
|
@profile['attributes'] = []
|
111
110
|
@profile['generator'] = {
|
112
|
-
'name': '
|
113
|
-
'version':
|
111
|
+
'name': 'inspec_tools',
|
112
|
+
'version': VERSION
|
114
113
|
}
|
115
114
|
@profile['plaintext'] = @benchmark.plaintext.plaintext
|
116
115
|
@profile['status'] = "#{@benchmark.status} on #{@benchmark.release_date.release_date}"
|
@@ -0,0 +1,117 @@
|
|
1
|
+
require 'nokogiri'
|
2
|
+
require 'inspec/objects'
|
3
|
+
require 'word_wrap'
|
4
|
+
require 'yaml'
|
5
|
+
require 'digest'
|
6
|
+
|
7
|
+
require_relative '../utilities/inspec_util'
|
8
|
+
|
9
|
+
# rubocop:disable Metrics/AbcSize
|
10
|
+
# rubocop:disable Metrics/PerceivedComplexity
|
11
|
+
# rubocop:disable Metrics/CyclomaticComplexity
|
12
|
+
|
13
|
+
module InspecTools
|
14
|
+
# Methods for converting from XLS to various formats
|
15
|
+
class XLSXTool
|
16
|
+
def initialize(xlsx, mapping, name, verbose = false)
|
17
|
+
@name = name
|
18
|
+
@xlsx = xlsx
|
19
|
+
@mapping = mapping
|
20
|
+
@verbose = verbose
|
21
|
+
end
|
22
|
+
|
23
|
+
def to_ckl
|
24
|
+
# TODO
|
25
|
+
end
|
26
|
+
|
27
|
+
def to_xccdf
|
28
|
+
# TODO
|
29
|
+
end
|
30
|
+
|
31
|
+
def to_inspec(control_prefix)
|
32
|
+
@controls = []
|
33
|
+
@cci_xml = nil
|
34
|
+
@profile = {}
|
35
|
+
insert_json_metadata
|
36
|
+
parse_cis_controls(control_prefix)
|
37
|
+
@profile['controls'] = @controls
|
38
|
+
@profile['sha256'] = Digest::SHA256.hexdigest @profile.to_s
|
39
|
+
@profile
|
40
|
+
end
|
41
|
+
|
42
|
+
private
|
43
|
+
|
44
|
+
def insert_json_metadata
|
45
|
+
@profile['name'] = @name
|
46
|
+
@profile['title'] = 'InSpec Profile'
|
47
|
+
@profile['maintainer'] = 'The Authors'
|
48
|
+
@profile['copyright'] = 'The Authors'
|
49
|
+
@profile['copyright_email'] = 'you@example.com'
|
50
|
+
@profile['license'] = 'Apache-2.0'
|
51
|
+
@profile['summary'] = 'An InSpec Compliance Profile'
|
52
|
+
@profile['version'] = '0.1.0'
|
53
|
+
@profile['supports'] = []
|
54
|
+
@profile['attributes'] = []
|
55
|
+
@profile['generator'] = {
|
56
|
+
'name': 'inspec_tools',
|
57
|
+
'version': VERSION
|
58
|
+
}
|
59
|
+
end
|
60
|
+
|
61
|
+
def parse_cis_controls(control_prefix)
|
62
|
+
cis2NistXls = Roo::Spreadsheet.open(File.join(File.dirname(__FILE__), "../data/NIST_Map_02052020_CIS_Controls_Version_7.1_Implementation_Groups_1.2.xlsx"))
|
63
|
+
cis2Nist = {}
|
64
|
+
cis2NistXls.sheet(3).each do |row|
|
65
|
+
if row[3].is_a? Numeric
|
66
|
+
cis2Nist[row[3].to_s] = row[0]
|
67
|
+
else
|
68
|
+
cis2Nist[row[2].to_s] = row[0] unless (row[2] == "") || (row[2].to_i.nil?)
|
69
|
+
end
|
70
|
+
end
|
71
|
+
[ 1, 2 ].each do |level|
|
72
|
+
@xlsx.sheet(level).each_row_streaming do |row|
|
73
|
+
if row[@mapping['control.id']].nil? || !/^\d+\.?\d*$/.match(row[@mapping['control.id']].formatted_value)
|
74
|
+
next
|
75
|
+
end
|
76
|
+
tag_pos = @mapping['control.tags']
|
77
|
+
control = {}
|
78
|
+
control['tags'] = {}
|
79
|
+
control['id'] = control_prefix + '-' + row[@mapping['control.id']].formatted_value unless @mapping['control.id'].nil? || row[@mapping['control.id']].nil?
|
80
|
+
control['title'] = row[@mapping['control.title']].formatted_value unless @mapping['control.title'].nil? || row[@mapping['control.title']].nil?
|
81
|
+
control['desc'] = ""
|
82
|
+
control['desc'] = row[@mapping['control.desc']].formatted_value unless row[@mapping['control.desc']].nil?
|
83
|
+
control['tags']['rationale'] = row[tag_pos['rationale']].formatted_value unless row[tag_pos['rationale']].nil?
|
84
|
+
|
85
|
+
control['tags']['severity'] = level == 1 ? 'medium' : 'high'
|
86
|
+
control['impact'] = Utils::InspecUtil.get_impact(control['tags']['severity'])
|
87
|
+
control['tags']['ref'] = row[@mapping['control.ref']].formatted_value unless @mapping['control.ref'].nil? || row[@mapping['control.ref']].nil?
|
88
|
+
control['tags']['cis_level'] = level unless level.nil?
|
89
|
+
|
90
|
+
# cis_control must be extracted from CIS control column via regex
|
91
|
+
cis_tags = row[tag_pos['cis_controls']].formatted_value.scan(/CONTROL:v(\d) (\d+)\.?(\d*)/)
|
92
|
+
control['tags']['cis_controls'] = []
|
93
|
+
control['tags']['nist'] = []
|
94
|
+
cis_tags.each do |cis_tag|
|
95
|
+
if cis_tag[2].nil? || cis_tag[2] == ""
|
96
|
+
control['tags']['cis_controls'] << cis_tag[1].to_s
|
97
|
+
control['tags']['nist'] << cis2Nist[cis_tag[1]]
|
98
|
+
else
|
99
|
+
control['tags']['cis_controls'] << cis_tag[1].to_s + "." + cis_tag[2].to_s
|
100
|
+
control['tags']['nist'] << cis2Nist[cis_tag[1].to_s + "." + cis_tag[2].to_s]
|
101
|
+
end
|
102
|
+
end
|
103
|
+
if not control['tags']['nist'].nil?
|
104
|
+
control['tags']['nist'] << "Rev_4"
|
105
|
+
end
|
106
|
+
control['tags']['cis_controls'] << "Rev_" + cis_tags.first[0] unless cis_tags[0].nil?
|
107
|
+
|
108
|
+
control['tags']['cis_rid'] = row[@mapping['control.id']].formatted_value unless @mapping['control.id'].nil? || row[@mapping['control.id']].nil?
|
109
|
+
control['tags']['check'] = row[tag_pos['check']].formatted_value unless tag_pos['check'].nil? || row[tag_pos['check']].nil?
|
110
|
+
control['tags']['fix'] = row[tag_pos['fix']].formatted_value unless tag_pos['fix'].nil? || row[tag_pos['fix']].nil?
|
111
|
+
|
112
|
+
@controls << control
|
113
|
+
end
|
114
|
+
end
|
115
|
+
end
|
116
|
+
end
|
117
|
+
end
|
@@ -1,11 +1,41 @@
|
|
1
1
|
require 'inspec/objects'
|
2
|
-
require 'inspec/impact'
|
3
2
|
require 'word_wrap'
|
4
3
|
require 'pp'
|
5
4
|
require 'uri'
|
6
5
|
require 'net/http'
|
7
6
|
require 'fileutils'
|
8
7
|
|
8
|
+
# Add rails style blank? method to all classes
|
9
|
+
class NilClass
|
10
|
+
def blank?
|
11
|
+
true
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
class String
|
16
|
+
def blank?
|
17
|
+
self.strip.empty?
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
class FalseClass
|
22
|
+
def blank?
|
23
|
+
true
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
class TrueClass
|
28
|
+
def blank?
|
29
|
+
false
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
class Object
|
34
|
+
def blank?
|
35
|
+
respond_to?(:empty?) ? empty? : !self
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
9
39
|
# rubocop:disable Metrics/ClassLength
|
10
40
|
# rubocop:disable Metrics/AbcSize
|
11
41
|
# rubocop:disable Metrics/PerceivedComplexity
|
@@ -17,6 +47,15 @@ module Utils
|
|
17
47
|
class InspecUtil
|
18
48
|
DATA_NOT_FOUND_MESSAGE = 'N/A'.freeze
|
19
49
|
WIDTH = 80
|
50
|
+
IMPACT_SCORES = {
|
51
|
+
"none" => 0.0,
|
52
|
+
"low" => 0.1,
|
53
|
+
"medium" => 0.4,
|
54
|
+
"high" => 0.7,
|
55
|
+
"critical" => 0.9,
|
56
|
+
}.freeze
|
57
|
+
|
58
|
+
class ImpactError; end
|
20
59
|
|
21
60
|
def self.parse_data_for_xccdf(json)
|
22
61
|
data = {}
|
@@ -97,10 +136,14 @@ module Utils
|
|
97
136
|
data[c_id][:message] = []
|
98
137
|
if control.key?('results')
|
99
138
|
control['results'].each do |result|
|
139
|
+
if !result['backtrace'].nil?
|
140
|
+
result['status'] = 'error'
|
141
|
+
end
|
100
142
|
data[c_id][:status].push(result['status'])
|
101
143
|
data[c_id][:message].push("SKIPPED -- Test: #{result['code_desc']}\nMessage: #{result['skip_message']}\n") if result['status'] == 'skipped'
|
102
144
|
data[c_id][:message].push("FAILED -- Test: #{result['code_desc']}\nMessage: #{result['message']}\n") if result['status'] == 'failed'
|
103
145
|
data[c_id][:message].push("PASS -- #{result['code_desc']}\n") if result['status'] == 'passed'
|
146
|
+
data[c_id][:message].push("PROFILE_ERROR -- Test: #{result['code_desc']}\nMessage: #{result['backtrace']}\n") if result['status'] == 'error'
|
104
147
|
end
|
105
148
|
end
|
106
149
|
if data[c_id][:impact].to_f.zero?
|
@@ -128,18 +171,18 @@ module Utils
|
|
128
171
|
|
129
172
|
def self.control_status(control)
|
130
173
|
status_list = control[:status].uniq
|
131
|
-
if status_list.include?('
|
174
|
+
if status_list.include?('error')
|
175
|
+
result = 'Profile_Error'
|
176
|
+
elsif control[:impact].to_f.zero?
|
177
|
+
result = 'Not_Applicable'
|
178
|
+
elsif status_list.include?('failed')
|
132
179
|
result = 'Open'
|
133
|
-
elsif status_list.include?('skipped')
|
134
|
-
result = 'Not_Reviewed'
|
135
180
|
elsif status_list.include?('passed')
|
136
181
|
result = 'NotAFinding'
|
137
|
-
|
138
|
-
# result = 'Not_Tested' ## STIGViewer does not allow Not_Tested as a possible status.
|
182
|
+
elsif status_list.include?('skipped')
|
139
183
|
result = 'Not_Reviewed'
|
140
|
-
|
141
|
-
|
142
|
-
result = 'Not_Applicable'
|
184
|
+
else
|
185
|
+
result = 'Profile_Error'
|
143
186
|
end
|
144
187
|
result
|
145
188
|
end
|
@@ -149,7 +192,7 @@ module Utils
|
|
149
192
|
result = "All Automated tests passed for the control \n\n #{control[:message].join}" if control_clk_status == 'NotAFinding'
|
150
193
|
result = "Automated test skipped due to known accepted condition in the control : \n\n#{control[:message].join}" if control_clk_status == 'Not_Reviewed'
|
151
194
|
result = "Justification: \n #{control[:message].join}" if control_clk_status == 'Not_Applicable'
|
152
|
-
result = 'No test available for this control' if control_clk_status == '
|
195
|
+
result = 'No test available or some test errors occurred for this control' if control_clk_status == 'Profile_Error'
|
153
196
|
result
|
154
197
|
end
|
155
198
|
|
@@ -179,7 +222,13 @@ module Utils
|
|
179
222
|
end
|
180
223
|
|
181
224
|
def self.get_impact_string(impact)
|
182
|
-
|
225
|
+
return if impact.nil?
|
226
|
+
value = impact.to_f
|
227
|
+
raise ImpactError, "'#{value}' is not a valid impact score. Valid impact scores: [0.0 - 1.0]." if value < 0 || value > 1
|
228
|
+
|
229
|
+
IMPACT_SCORES.reverse_each do |name, impact|
|
230
|
+
return name if value >= impact
|
231
|
+
end
|
183
232
|
end
|
184
233
|
|
185
234
|
def self.unpack_inspec_json(directory, inspec_json, separated, output_format)
|
@@ -204,36 +253,46 @@ module Utils
|
|
204
253
|
private_class_method def self.generate_controls(inspec_json)
|
205
254
|
controls = []
|
206
255
|
inspec_json['controls'].each do |json_control|
|
207
|
-
control = Inspec::Control.new
|
256
|
+
control = ::Inspec::Object::Control.new
|
208
257
|
if (defined? control.desc).nil?
|
209
258
|
control.descriptions[:default] = json_control['desc']
|
259
|
+
control.descriptions[:rationale] = json_control['tags']['rationale']
|
260
|
+
control.descriptions[:check] = json_control['tags']['check']
|
261
|
+
control.descriptions[:fix] = json_control['tags']['fix']
|
210
262
|
else
|
211
263
|
control.desc = json_control['desc']
|
212
264
|
end
|
213
265
|
control.id = json_control['id']
|
214
266
|
control.title = json_control['title']
|
215
267
|
control.impact = get_impact(json_control['impact'])
|
216
|
-
|
217
|
-
|
218
|
-
control.add_tag(Inspec::Tag.new(
|
219
|
-
|
220
|
-
|
221
|
-
control.add_tag(Inspec::Tag.new('
|
222
|
-
control.add_tag(Inspec::Tag.new('
|
223
|
-
control.add_tag(Inspec::Tag.new('
|
224
|
-
control.add_tag(Inspec::Tag.new('
|
225
|
-
control.add_tag(Inspec::Tag.new('
|
226
|
-
control.add_tag(Inspec::Tag.new('
|
227
|
-
control.add_tag(Inspec::Tag.new('
|
228
|
-
control.add_tag(Inspec::Tag.new('
|
229
|
-
control.add_tag(Inspec::Tag.new('
|
230
|
-
control.add_tag(Inspec::Tag.new('
|
231
|
-
control.add_tag(Inspec::Tag.new('
|
232
|
-
control.add_tag(Inspec::Tag.new('
|
233
|
-
control.add_tag(Inspec::Tag.new('
|
234
|
-
control.add_tag(Inspec::Tag.new('
|
235
|
-
control.add_tag(Inspec::Tag.new('
|
236
|
-
control.add_tag(Inspec::Tag.new('
|
268
|
+
|
269
|
+
#json_control['tags'].each do |tag|
|
270
|
+
# control.add_tag(Inspec::Object::Tag.new(tag.key, tag.value)
|
271
|
+
#end
|
272
|
+
|
273
|
+
control.add_tag(::Inspec::Object::Tag.new('severity', json_control['tags']['severity']))
|
274
|
+
control.add_tag(::Inspec::Object::Tag.new('gtitle', json_control['tags']['gtitle']))
|
275
|
+
control.add_tag(::Inspec::Object::Tag.new('satisfies', json_control['tags']['satisfies'])) if json_control['tags']['satisfies']
|
276
|
+
control.add_tag(::Inspec::Object::Tag.new('gid', json_control['tags']['gid']))
|
277
|
+
control.add_tag(::Inspec::Object::Tag.new('rid', json_control['tags']['rid']))
|
278
|
+
control.add_tag(::Inspec::Object::Tag.new('stig_id', json_control['tags']['stig_id']))
|
279
|
+
control.add_tag(::Inspec::Object::Tag.new('fix_id', json_control['tags']['fix_id']))
|
280
|
+
control.add_tag(::Inspec::Object::Tag.new('cci', json_control['tags']['cci']))
|
281
|
+
control.add_tag(::Inspec::Object::Tag.new('nist', json_control['tags']['nist']))
|
282
|
+
control.add_tag(::Inspec::Object::Tag.new('cis_level', json_control['tags']['cis_level'])) unless json_control['tags']['cis_level'].blank?
|
283
|
+
control.add_tag(::Inspec::Object::Tag.new('cis_controls', json_control['tags']['cis_controls'])) unless json_control['tags']['cis_controls'].blank?
|
284
|
+
control.add_tag(::Inspec::Object::Tag.new('cis_rid', json_control['tags']['cis_rid'])) unless json_control['tags']['cis_rid'].blank?
|
285
|
+
control.add_tag(::Inspec::Object::Tag.new('ref', json_control['tags']['ref'])) unless json_control['tags']['ref'].blank?
|
286
|
+
control.add_tag(::Inspec::Object::Tag.new('false_negatives', json_control['tags']['false_negatives'])) unless json_control['tags']['false_positives'].blank?
|
287
|
+
control.add_tag(::Inspec::Object::Tag.new('false_positives', json_control['tags']['false_positives'])) unless json_control['tags']['false_positives'].blank?
|
288
|
+
control.add_tag(::Inspec::Object::Tag.new('documentable', json_control['tags']['documentable'])) unless json_control['tags']['documentable'].blank?
|
289
|
+
control.add_tag(::Inspec::Object::Tag.new('mitigations', json_control['tags']['mitigations'])) unless json_control['tags']['mitigations'].blank?
|
290
|
+
control.add_tag(::Inspec::Object::Tag.new('severity_override_guidance', json_control['tags']['documentable'])) unless json_control['tags']['severity_override_guidance'].blank?
|
291
|
+
control.add_tag(::Inspec::Object::Tag.new('potential_impacts', json_control['tags']['potential_impacts'])) unless json_control['tags']['potential_impacts'].blank?
|
292
|
+
control.add_tag(::Inspec::Object::Tag.new('third_party_tools', json_control['tags']['third_party_tools'])) unless json_control['tags']['third_party_tools'].blank?
|
293
|
+
control.add_tag(::Inspec::Object::Tag.new('mitigation_controls', json_control['tags']['mitigation_controls'])) unless json_control['tags']['mitigation_controls'].blank?
|
294
|
+
control.add_tag(::Inspec::Object::Tag.new('responsibility', json_control['tags']['responsibility'])) unless json_control['tags']['responsibility'].blank?
|
295
|
+
control.add_tag(::Inspec::Object::Tag.new('ia_controls', json_control['tags']['ia_controls'])) unless json_control['tags']['ia_controls'].blank?
|
237
296
|
|
238
297
|
controls << control
|
239
298
|
end
|
@@ -268,7 +327,7 @@ module Utils
|
|
268
327
|
else
|
269
328
|
license_content = inspec_json['license']
|
270
329
|
end
|
271
|
-
rescue StandardError =>
|
330
|
+
rescue StandardError => _e
|
272
331
|
license_content = inspec_json['license']
|
273
332
|
end
|
274
333
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: inspec_tools
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.7.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Robert Thew
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: exe
|
13
13
|
cert_chain: []
|
14
|
-
date:
|
14
|
+
date: 2020-03-23 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: colorize
|
@@ -28,25 +28,19 @@ dependencies:
|
|
28
28
|
- !ruby/object:Gem::Version
|
29
29
|
version: '0'
|
30
30
|
- !ruby/object:Gem::Dependency
|
31
|
-
name: inspec
|
31
|
+
name: inspec-objects
|
32
32
|
requirement: !ruby/object:Gem::Requirement
|
33
33
|
requirements:
|
34
34
|
- - ">="
|
35
35
|
- !ruby/object:Gem::Version
|
36
|
-
version: '
|
37
|
-
- - "<"
|
38
|
-
- !ruby/object:Gem::Version
|
39
|
-
version: '5.0'
|
36
|
+
version: '0'
|
40
37
|
type: :runtime
|
41
38
|
prerelease: false
|
42
39
|
version_requirements: !ruby/object:Gem::Requirement
|
43
40
|
requirements:
|
44
41
|
- - ">="
|
45
42
|
- !ruby/object:Gem::Version
|
46
|
-
version: '
|
47
|
-
- - "<"
|
48
|
-
- !ruby/object:Gem::Version
|
49
|
-
version: '5.0'
|
43
|
+
version: '0'
|
50
44
|
- !ruby/object:Gem::Dependency
|
51
45
|
name: nokogiri
|
52
46
|
requirement: !ruby/object:Gem::Requirement
|
@@ -115,14 +109,14 @@ dependencies:
|
|
115
109
|
requirements:
|
116
110
|
- - "~>"
|
117
111
|
- !ruby/object:Gem::Version
|
118
|
-
version: '2.
|
112
|
+
version: '2.8'
|
119
113
|
type: :runtime
|
120
114
|
prerelease: false
|
121
115
|
version_requirements: !ruby/object:Gem::Requirement
|
122
116
|
requirements:
|
123
117
|
- - "~>"
|
124
118
|
- !ruby/object:Gem::Version
|
125
|
-
version: '2.
|
119
|
+
version: '2.8'
|
126
120
|
- !ruby/object:Gem::Dependency
|
127
121
|
name: thor
|
128
122
|
requirement: !ruby/object:Gem::Requirement
|
@@ -144,9 +138,6 @@ dependencies:
|
|
144
138
|
- - "~>"
|
145
139
|
- !ruby/object:Gem::Version
|
146
140
|
version: '1.0'
|
147
|
-
- - "~>"
|
148
|
-
- !ruby/object:Gem::Version
|
149
|
-
version: 1.0.0
|
150
141
|
type: :runtime
|
151
142
|
prerelease: false
|
152
143
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -154,49 +145,46 @@ dependencies:
|
|
154
145
|
- - "~>"
|
155
146
|
- !ruby/object:Gem::Version
|
156
147
|
version: '1.0'
|
157
|
-
- - "~>"
|
158
|
-
- !ruby/object:Gem::Version
|
159
|
-
version: 1.0.0
|
160
148
|
- !ruby/object:Gem::Dependency
|
161
149
|
name: bundler
|
162
150
|
requirement: !ruby/object:Gem::Requirement
|
163
151
|
requirements:
|
164
|
-
- - "
|
152
|
+
- - ">="
|
165
153
|
- !ruby/object:Gem::Version
|
166
|
-
version: '
|
154
|
+
version: '0'
|
167
155
|
type: :development
|
168
156
|
prerelease: false
|
169
157
|
version_requirements: !ruby/object:Gem::Requirement
|
170
158
|
requirements:
|
171
|
-
- - "
|
159
|
+
- - ">="
|
172
160
|
- !ruby/object:Gem::Version
|
173
|
-
version: '
|
161
|
+
version: '0'
|
174
162
|
- !ruby/object:Gem::Dependency
|
175
163
|
name: minitest
|
176
164
|
requirement: !ruby/object:Gem::Requirement
|
177
165
|
requirements:
|
178
|
-
- - "
|
166
|
+
- - ">="
|
179
167
|
- !ruby/object:Gem::Version
|
180
|
-
version: '
|
168
|
+
version: '0'
|
181
169
|
type: :development
|
182
170
|
prerelease: false
|
183
171
|
version_requirements: !ruby/object:Gem::Requirement
|
184
172
|
requirements:
|
185
|
-
- - "
|
173
|
+
- - ">="
|
186
174
|
- !ruby/object:Gem::Version
|
187
|
-
version: '
|
175
|
+
version: '0'
|
188
176
|
- !ruby/object:Gem::Dependency
|
189
177
|
name: pry
|
190
178
|
requirement: !ruby/object:Gem::Requirement
|
191
179
|
requirements:
|
192
|
-
- - "
|
180
|
+
- - ">="
|
193
181
|
- !ruby/object:Gem::Version
|
194
182
|
version: '0'
|
195
183
|
type: :development
|
196
184
|
prerelease: false
|
197
185
|
version_requirements: !ruby/object:Gem::Requirement
|
198
186
|
requirements:
|
199
|
-
- - "
|
187
|
+
- - ">="
|
200
188
|
- !ruby/object:Gem::Version
|
201
189
|
version: '0'
|
202
190
|
- !ruby/object:Gem::Dependency
|
@@ -205,14 +193,42 @@ dependencies:
|
|
205
193
|
requirements:
|
206
194
|
- - ">="
|
207
195
|
- !ruby/object:Gem::Version
|
208
|
-
version: '
|
209
|
-
type: :
|
196
|
+
version: '0'
|
197
|
+
type: :development
|
198
|
+
prerelease: false
|
199
|
+
version_requirements: !ruby/object:Gem::Requirement
|
200
|
+
requirements:
|
201
|
+
- - ">="
|
202
|
+
- !ruby/object:Gem::Version
|
203
|
+
version: '0'
|
204
|
+
- !ruby/object:Gem::Dependency
|
205
|
+
name: codeclimate-test-reporter
|
206
|
+
requirement: !ruby/object:Gem::Requirement
|
207
|
+
requirements:
|
208
|
+
- - ">="
|
209
|
+
- !ruby/object:Gem::Version
|
210
|
+
version: '0'
|
211
|
+
type: :development
|
212
|
+
prerelease: false
|
213
|
+
version_requirements: !ruby/object:Gem::Requirement
|
214
|
+
requirements:
|
215
|
+
- - ">="
|
216
|
+
- !ruby/object:Gem::Version
|
217
|
+
version: '0'
|
218
|
+
- !ruby/object:Gem::Dependency
|
219
|
+
name: simplecov
|
220
|
+
requirement: !ruby/object:Gem::Requirement
|
221
|
+
requirements:
|
222
|
+
- - ">="
|
223
|
+
- !ruby/object:Gem::Version
|
224
|
+
version: '0'
|
225
|
+
type: :development
|
210
226
|
prerelease: false
|
211
227
|
version_requirements: !ruby/object:Gem::Requirement
|
212
228
|
requirements:
|
213
229
|
- - ">="
|
214
230
|
- !ruby/object:Gem::Version
|
215
|
-
version: '
|
231
|
+
version: '0'
|
216
232
|
description: Converter utils for Inspec that can be included as a gem or used from
|
217
233
|
the command line
|
218
234
|
email:
|
@@ -228,12 +244,12 @@ files:
|
|
228
244
|
- README.md
|
229
245
|
- Rakefile
|
230
246
|
- exe/inspec_tools
|
247
|
+
- lib/data/NIST_Map_02052020_CIS_Controls_Version_7.1_Implementation_Groups_1.2.xlsx
|
231
248
|
- lib/data/NIST_Map_09212017B_CSC-CIS_Critical_Security_Controls_VER_6.1_Excel_9.1.2016.xlsx
|
232
249
|
- lib/data/README.TXT
|
233
250
|
- lib/data/U_CCI_List.xml
|
234
251
|
- lib/data/attributes.yml
|
235
252
|
- lib/data/cci2html.xsl
|
236
|
-
- lib/data/debug_text
|
237
253
|
- lib/data/mapping.yml
|
238
254
|
- lib/data/stig.csv
|
239
255
|
- lib/data/threshold.yaml
|
@@ -244,7 +260,6 @@ files:
|
|
244
260
|
- lib/inspec_tools.rb
|
245
261
|
- lib/inspec_tools/ckl.rb
|
246
262
|
- lib/inspec_tools/cli.rb
|
247
|
-
- lib/inspec_tools/command.rb
|
248
263
|
- lib/inspec_tools/csv.rb
|
249
264
|
- lib/inspec_tools/help.rb
|
250
265
|
- lib/inspec_tools/help/compliance.md
|
@@ -257,23 +272,19 @@ files:
|
|
257
272
|
- lib/inspec_tools/help/xccdf2inspec.md
|
258
273
|
- lib/inspec_tools/inspec.rb
|
259
274
|
- lib/inspec_tools/pdf.rb
|
275
|
+
- lib/inspec_tools/plugin.rb
|
276
|
+
- lib/inspec_tools/plugin_cli.rb
|
260
277
|
- lib/inspec_tools/summary.rb
|
261
278
|
- lib/inspec_tools/version.rb
|
262
279
|
- lib/inspec_tools/xccdf.rb
|
280
|
+
- lib/inspec_tools/xlsx.rb
|
281
|
+
- lib/inspec_tools_plugin.rb
|
263
282
|
- lib/utilities/csv_util.rb
|
264
283
|
- lib/utilities/extract_nist_cis_mapping.rb
|
265
284
|
- lib/utilities/extract_pdf_text.rb
|
266
285
|
- lib/utilities/inspec_util.rb
|
267
286
|
- lib/utilities/parser.rb
|
268
287
|
- lib/utilities/text_cleaner.rb
|
269
|
-
- test/unit/inspec_tools/csv_test.rb
|
270
|
-
- test/unit/inspec_tools/inspec_test.rb
|
271
|
-
- test/unit/inspec_tools/pdf_test.rb
|
272
|
-
- test/unit/inspec_tools/summary_test.rb
|
273
|
-
- test/unit/inspec_tools/xccdf_test.rb
|
274
|
-
- test/unit/inspec_tools_test.rb
|
275
|
-
- test/unit/test_helper.rb
|
276
|
-
- test/unit/utils/inspec_util_test.rb
|
277
288
|
homepage: https://github.com/mitre/inspec_tools
|
278
289
|
licenses:
|
279
290
|
- Apache-2.0
|
@@ -285,9 +296,9 @@ require_paths:
|
|
285
296
|
- lib
|
286
297
|
required_ruby_version: !ruby/object:Gem::Requirement
|
287
298
|
requirements:
|
288
|
-
- - "
|
299
|
+
- - "~>"
|
289
300
|
- !ruby/object:Gem::Version
|
290
|
-
version: '
|
301
|
+
version: '2.3'
|
291
302
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
292
303
|
requirements:
|
293
304
|
- - ">="
|
@@ -298,12 +309,4 @@ rubygems_version: 3.0.3
|
|
298
309
|
signing_key:
|
299
310
|
specification_version: 4
|
300
311
|
summary: Converter utils for Inspec
|
301
|
-
test_files:
|
302
|
-
- test/unit/inspec_tools/csv_test.rb
|
303
|
-
- test/unit/inspec_tools/inspec_test.rb
|
304
|
-
- test/unit/inspec_tools/pdf_test.rb
|
305
|
-
- test/unit/inspec_tools/summary_test.rb
|
306
|
-
- test/unit/inspec_tools/xccdf_test.rb
|
307
|
-
- test/unit/inspec_tools_test.rb
|
308
|
-
- test/unit/test_helper.rb
|
309
|
-
- test/unit/utils/inspec_util_test.rb
|
312
|
+
test_files: []
|