inspec_tools 1.3.6 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +16 -0
- data/lib/inspec_tools.rb +0 -2
- data/lib/inspec_tools/inspec.rb +20 -3
- data/lib/inspec_tools/version.rb +1 -1
- data/lib/utilities/inspec_util.rb +5 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5a1dee9a9941b2324ad4e6c58f3033e8d642f64bc0a9acf92686aac51484bac6
|
4
|
+
data.tar.gz: 11954720bf60d4234d9833a04c7533e51cda15b32b83b499a230394868332f77
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 81e3d4f1e59c9b2ebdc39063055d66950c1702dd03223dc6116aa089d21bea2fbb636b102032f88206bd2c6a1940c4d4878eba5fdcf6332188b66caaa08782b0
|
7
|
+
data.tar.gz: b7fd78e8af38c8dbaefaef49c518b5dd58983d209c8a8a112c515771fe39c00091a9971649d70d895b0f3f1cec2770d899e5e00afb7e248bd923c871c95bd90f
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,21 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
+
## [v1.3.6](https://github.com/mitre/inspec_tools/tree/v1.3.6) (2019-05-02)
|
4
|
+
[Full Changelog](https://github.com/mitre/inspec_tools/compare/v1.3.5...v1.3.6)
|
5
|
+
|
6
|
+
**Implemented enhancements:**
|
7
|
+
|
8
|
+
- remove 'severity' from conversion [\#57](https://github.com/mitre/inspec_tools/pull/57) ([aaronlippold](https://github.com/aaronlippold))
|
9
|
+
|
10
|
+
**Fixed bugs:**
|
11
|
+
|
12
|
+
- document new metadata.json file and creation of file in README.md [\#53](https://github.com/mitre/inspec_tools/issues/53)
|
13
|
+
|
14
|
+
**Closed issues:**
|
15
|
+
|
16
|
+
- While working with STIGViewer there were some missing TAGs [\#50](https://github.com/mitre/inspec_tools/issues/50)
|
17
|
+
- remove severity tag in xccdf to inspec converted [\#44](https://github.com/mitre/inspec_tools/issues/44)
|
18
|
+
|
3
19
|
## [v1.3.5](https://github.com/mitre/inspec_tools/tree/v1.3.5) (2019-05-01)
|
4
20
|
[Full Changelog](https://github.com/mitre/inspec_tools/compare/v1.3.4...v1.3.5)
|
5
21
|
|
data/lib/inspec_tools.rb
CHANGED
data/lib/inspec_tools/inspec.rb
CHANGED
@@ -120,10 +120,27 @@ module InspecTools
|
|
120
120
|
%w{
|
121
121
|
Vuln_Num Severity Group_Title Rule_ID Rule_Ver Rule_Title Vuln_Discuss
|
122
122
|
Check_Content Fix_Text CCI_REF
|
123
|
-
}.each do |
|
123
|
+
}.each do |attrib|
|
124
|
+
if attrib == 'Severity'
|
125
|
+
key = :impact
|
126
|
+
else
|
127
|
+
key = attrib.downcase.to_sym
|
128
|
+
end
|
129
|
+
|
130
|
+
next if control[key].nil?
|
131
|
+
|
132
|
+
if attrib == 'Severity'
|
133
|
+
value = Utils::InspecUtil.get_impact_string(control[key])
|
134
|
+
next if value == 'none'
|
135
|
+
|
136
|
+
value = 'high' if value == 'critical'
|
137
|
+
else
|
138
|
+
value = control[key]
|
139
|
+
end
|
140
|
+
|
124
141
|
stigdata = HappyMapperTools::StigChecklist::StigData.new
|
125
|
-
stigdata.attrib =
|
126
|
-
stigdata.data =
|
142
|
+
stigdata.attrib = attrib
|
143
|
+
stigdata.data = value
|
127
144
|
stig_data_list.push(stigdata)
|
128
145
|
end
|
129
146
|
|
data/lib/inspec_tools/version.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'inspec/objects'
|
2
|
+
require 'inspec/impact'
|
2
3
|
require 'word_wrap'
|
3
4
|
require 'pp'
|
4
5
|
require 'uri'
|
@@ -176,6 +177,10 @@ module Utils
|
|
176
177
|
end
|
177
178
|
end
|
178
179
|
|
180
|
+
def self.get_impact_string(impact)
|
181
|
+
Inspec::Impact.string_from_impact(impact) unless impact.nil?
|
182
|
+
end
|
183
|
+
|
179
184
|
def self.unpack_inspec_json(directory, inspec_json, separated, output_format)
|
180
185
|
if directory == 'id'
|
181
186
|
directory = inspec_json['name']
|
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.4.0
|
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: 2019-05-
|
14
|
+
date: 2019-05-17 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: colorize
|