inspec_tools 2.0.1.pre3 → 2.0.1.pre4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9821cf8b386c55599d08754287c0e15cf461c2cf1885e9c4e2006f89c560427b
4
- data.tar.gz: b07b4ea7ab7f79da47fa1ef3fc2dc52c09d98a7f6a8b24e140d0ba47aae7d435
3
+ metadata.gz: d2586a67f71f35174ae21e09e02136705d3e09662e176f6f36e81ca92af9b8cc
4
+ data.tar.gz: fd59d2d3ba2c8b4dcb98cfbd4c217743ff987e57fca5f244e04536bd47ad1c05
5
5
  SHA512:
6
- metadata.gz: b0375514656589efc9171cdc47d2106376a3da86b84e5eb6bf753c8778819784074204bfbc8763536cf4aa1c720236c9692527239d5c2250d0f881f3c882104b
7
- data.tar.gz: ecaa2419766fa3fe9f1ad9722e029002b19eb2e080309e8aeb797ad501ffbcf86ad5da3cc8968bfb8be83268f381261c69ca911315981ca5e1e8f8e356aabf2a
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.pre2...HEAD)
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
 
@@ -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/xlsx'
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
- cis2Nist[row[2].to_s] = row[0] unless (row[2] == '') || row[2].to_i.nil?
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([cis_tags[:section]])
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([cis_tags[:section], cis_tags[:sub_section]])
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
@@ -13,5 +13,5 @@ module InspecTools
13
13
  autoload :Inspec, 'inspec_tools/inspec'
14
14
  autoload :Summary, 'inspec_tools/summary'
15
15
  autoload :Threshold, 'inspec_tools/threshold'
16
- autoload :XLSXTool, 'inspec_tools/xlsx.rb'
16
+ autoload :XLSXTool, 'inspec_tools/xlsx_tool'
17
17
  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: 2.0.1.pre3
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-03 00:00:00.000000000 Z
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/xlsx.rb
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