inspec_tools 2.0.1.pre3 → 2.0.1.pre4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +13 -1
- data/lib/inspec_tools/cli.rb +0 -4
- data/lib/inspec_tools/plugin_cli.rb +1 -4
- data/lib/inspec_tools/{xlsx.rb → xlsx_tool.rb} +6 -5
- data/lib/inspec_tools.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d2586a67f71f35174ae21e09e02136705d3e09662e176f6f36e81ca92af9b8cc
|
|
4
|
+
data.tar.gz: fd59d2d3ba2c8b4dcb98cfbd4c217743ff987e57fca5f244e04536bd47ad1c05
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e124c707c7d52ad506b82f0f0de235b6093701725bd2b9afe6cb00e886772a9295602d7468977e41383dd2079eede8718e27c047d8dfed54f8e3bab9e0a4947b
|
|
7
|
+
data.tar.gz: 53e215d32e5cc505946c553470455bb61470f1ddb8c8baf839aa7e9c82e883d3bf4ef35f2736de0de67ebc977686650b0825bf641c241897a2ed59ff275d25b7
|
data/CHANGELOG.md
CHANGED
|
@@ -2,7 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased](https://github.com/mitre/inspec_tools/tree/HEAD)
|
|
4
4
|
|
|
5
|
-
[Full Changelog](https://github.com/mitre/inspec_tools/compare/v2.0.1.
|
|
5
|
+
[Full Changelog](https://github.com/mitre/inspec_tools/compare/v2.0.1.pre3...HEAD)
|
|
6
|
+
|
|
7
|
+
**Closed issues:**
|
|
8
|
+
|
|
9
|
+
- consider how to convert impact 0 to Severity in inspec2ckl [\#60](https://github.com/mitre/inspec_tools/issues/60)
|
|
10
|
+
|
|
11
|
+
**Merged pull requests:**
|
|
12
|
+
|
|
13
|
+
- Apply fixes from CodeFactor [\#129](https://github.com/mitre/inspec_tools/pull/129) ([aaronlippold](https://github.com/aaronlippold))
|
|
14
|
+
|
|
15
|
+
## [v2.0.1.pre3](https://github.com/mitre/inspec_tools/tree/v2.0.1.pre3) (2020-04-03)
|
|
16
|
+
|
|
17
|
+
[Full Changelog](https://github.com/mitre/inspec_tools/compare/v2.0.1.pre2...v2.0.1.pre3)
|
|
6
18
|
|
|
7
19
|
**Merged pull requests:**
|
|
8
20
|
|
data/lib/inspec_tools/cli.rb
CHANGED
|
@@ -3,10 +3,6 @@ require 'json'
|
|
|
3
3
|
|
|
4
4
|
require 'inspec-objects'
|
|
5
5
|
require 'inspec'
|
|
6
|
-
require_relative 'version'
|
|
7
|
-
|
|
8
|
-
require_relative '../utilities/inspec_util'
|
|
9
|
-
require_relative '../utilities/csv_util'
|
|
10
6
|
require_relative './plugin_cli.rb'
|
|
11
7
|
|
|
12
8
|
# This tells the ruby cli app to use the same argument parsing as the plugin
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
require 'yaml'
|
|
2
2
|
require 'json'
|
|
3
|
-
|
|
4
3
|
require 'roo'
|
|
5
|
-
require_relative 'version'
|
|
6
|
-
|
|
7
4
|
require_relative '../utilities/inspec_util'
|
|
8
5
|
require_relative '../utilities/csv_util'
|
|
9
6
|
|
|
@@ -17,7 +14,7 @@ module InspecTools
|
|
|
17
14
|
autoload :Inspec, 'inspec_tools/inspec'
|
|
18
15
|
autoload :Summary, 'inspec_tools/summary'
|
|
19
16
|
autoload :Threshold, 'inspec_tools/threshold'
|
|
20
|
-
autoload :XLSXTool, 'inspec_tools/
|
|
17
|
+
autoload :XLSXTool, 'inspec_tools/xlsx_tool'
|
|
21
18
|
end
|
|
22
19
|
|
|
23
20
|
# rubocop:disable Style/GuardClause
|
|
@@ -3,6 +3,7 @@ require 'inspec-objects'
|
|
|
3
3
|
require 'word_wrap'
|
|
4
4
|
require 'yaml'
|
|
5
5
|
require 'digest'
|
|
6
|
+
require 'roo'
|
|
6
7
|
|
|
7
8
|
require_relative '../utilities/inspec_util'
|
|
8
9
|
|
|
@@ -51,7 +52,7 @@ module InspecTools
|
|
|
51
52
|
if row[3].is_a? Numeric
|
|
52
53
|
cis_to_nist[row[3].to_s] = row[0]
|
|
53
54
|
else
|
|
54
|
-
|
|
55
|
+
cis_to_nist[row[2].to_s] = row[0] unless (row[2] == '') || row[2].to_i.nil?
|
|
55
56
|
end
|
|
56
57
|
end
|
|
57
58
|
cis_to_nist
|
|
@@ -70,7 +71,7 @@ module InspecTools
|
|
|
70
71
|
@profile['attributes'] = []
|
|
71
72
|
@profile['generator'] = {
|
|
72
73
|
'name': 'inspec_tools',
|
|
73
|
-
'version': VERSION
|
|
74
|
+
'version': ::InspecTools::VERSION
|
|
74
75
|
}
|
|
75
76
|
end
|
|
76
77
|
|
|
@@ -122,10 +123,10 @@ module InspecTools
|
|
|
122
123
|
|
|
123
124
|
if cis_tags[:sub_section].nil? || cis_tags[:sub_section].blank?
|
|
124
125
|
control['tags']['cis_controls'] << cis_tags[:section]
|
|
125
|
-
control['tags']['nist'] << get_nist_control_for_cis(
|
|
126
|
+
control['tags']['nist'] << get_nist_control_for_cis(cis_tags[:section])
|
|
126
127
|
else
|
|
127
128
|
control['tags']['cis_controls'] << "#{cis_tags[:section]}.#{cis_tags[:sub_section]}"
|
|
128
|
-
control['tags']['nist'] << get_nist_control_for_cis(
|
|
129
|
+
control['tags']['nist'] << get_nist_control_for_cis(cis_tags[:section], cis_tags[:sub_section])
|
|
129
130
|
end
|
|
130
131
|
|
|
131
132
|
control['tags']['nist'] << LATEST_NIST_REV unless control['tags']['nist'].nil?
|
|
@@ -134,7 +135,7 @@ module InspecTools
|
|
|
134
135
|
control
|
|
135
136
|
end
|
|
136
137
|
|
|
137
|
-
def get_nist_control_for_cis(section, sub_section=nil)
|
|
138
|
+
def get_nist_control_for_cis(section, sub_section = nil)
|
|
138
139
|
return @cis_to_nist[section] if sub_section.nil?
|
|
139
140
|
|
|
140
141
|
@cis_to_nist["#{section}.#{sub_section}"]
|
data/lib/inspec_tools.rb
CHANGED
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: 2.0.1.
|
|
4
|
+
version: 2.0.1.pre4
|
|
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: 2020-04-
|
|
14
|
+
date: 2020-04-06 00:00:00.000000000 Z
|
|
15
15
|
dependencies:
|
|
16
16
|
- !ruby/object:Gem::Dependency
|
|
17
17
|
name: colorize
|
|
@@ -321,7 +321,7 @@ files:
|
|
|
321
321
|
- lib/inspec_tools/summary.rb
|
|
322
322
|
- lib/inspec_tools/version.rb
|
|
323
323
|
- lib/inspec_tools/xccdf.rb
|
|
324
|
-
- lib/inspec_tools/
|
|
324
|
+
- lib/inspec_tools/xlsx_tool.rb
|
|
325
325
|
- lib/inspec_tools_plugin.rb
|
|
326
326
|
- lib/overrides/false_class.rb
|
|
327
327
|
- lib/overrides/nil_class.rb
|