heimdall_tools 1.3.44 → 1.3.45

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: 75e8a6020d8b250e1c11bc8c90de7b73196d430925eb8adcfe8dfa5e2b27771e
4
- data.tar.gz: dc2596fca0d74044f64c61cba90eae4490c58268545cd68a9f7a02e794c2b8a4
3
+ metadata.gz: 87936a7488cf8da17690bb3c35d5138a2e9442d8d4c48b307307f4d44423b987
4
+ data.tar.gz: 28f172cc25391e697910bb1b2b79fea29c82956cbca953f1e7978080b4e1d646
5
5
  SHA512:
6
- metadata.gz: f51de7c47656ea8e36df9bc8e8cbe30c3f956c77a6997f65e50da918268223b70a59a3efb84aa0c9eabd45123bd347275ee5ff6952ede11dd9c86db144549a26
7
- data.tar.gz: a49c2241be26e5d8f4d4db2db7ead81de00f6a0e506160c89040f61af079a9af266ec734c9f0e2f79d5f450ccfb5c347c0fa1125383a8280274a22fdbeb811e2
6
+ metadata.gz: bf394cd989527e58e45755881a01ad5d91761201f0a054e5a92a69ae3ac9b943569ef400298d31afee4514b72f3f7b77212b8bcc189107e355c45e1c2758e41d
7
+ data.tar.gz: 54c1a3447b631b28c024f0bc77559834464bccc518463a2fee0313d7b19f6252db9d624058eda3118423178f736e080ccffa5601b2cc7ec2daa98332a90d1e8f
@@ -18,8 +18,7 @@ INSUFFICIENT_DATA_MSG = 'Not enough data has been collectd to determine complian
18
18
  #
19
19
  module HeimdallTools
20
20
  class AwsConfigMapper
21
- def initialize(custom_mapping, endpoint = nil, verbose = false)
22
- @verbose = verbose
21
+ def initialize(custom_mapping, endpoint = nil)
23
22
  @default_mapping = get_rule_mapping(AWS_CONFIG_MAPPING_FILE)
24
23
  @custom_mapping = custom_mapping.nil? ? {} : get_rule_mapping(custom_mapping)
25
24
  if endpoint.nil?
@@ -20,9 +20,8 @@ DEFAULT_NIST_TAG = %w{SA-11 RA-5 Rev_4}.freeze
20
20
 
21
21
  module HeimdallTools
22
22
  class BurpSuiteMapper
23
- def initialize(burps_xml, _name = nil, verbose = false)
23
+ def initialize(burps_xml, _name = nil)
24
24
  @burps_xml = burps_xml
25
- @verbose = verbose
26
25
 
27
26
  begin
28
27
  @cwe_nist_mapping = parse_mapper
@@ -6,7 +6,6 @@ module HeimdallTools
6
6
  long_desc Help.text(:fortify_mapper)
7
7
  option :fvdl, required: true, aliases: '-f'
8
8
  option :output, required: true, aliases: '-o'
9
- option :verbose, type: :boolean, aliases: '-V'
10
9
  def fortify_mapper
11
10
  hdf = HeimdallTools::FortifyMapper.new(File.read(options[:fvdl])).to_hdf
12
11
  File.write(options[:output], hdf)
@@ -17,7 +16,6 @@ module HeimdallTools
17
16
  option :json, required: true, aliases: '-j'
18
17
  option :name, required: true, aliases: '-n'
19
18
  option :output, required: true, aliases: '-o'
20
- option :verbose, type: :boolean, aliases: '-V'
21
19
  def zap_mapper
22
20
  hdf = HeimdallTools::ZapMapper.new(File.read(options[:json]), options[:name]).to_hdf
23
21
  File.write(options[:output], hdf)
@@ -29,7 +27,6 @@ module HeimdallTools
29
27
  option :api_url, required: true, aliases: '-u'
30
28
  option :auth, type: :string, required: false
31
29
  option :output, required: true, aliases: '-o'
32
- option :verbose, type: :boolean, aliases: '-V'
33
30
  def sonarqube_mapper
34
31
  hdf = HeimdallTools::SonarQubeMapper.new(options[:name], options[:api_url], options[:auth]).to_hdf
35
32
  File.write(options[:output], hdf)
@@ -39,7 +36,6 @@ module HeimdallTools
39
36
  long_desc Help.text(:burpsuite_mapper)
40
37
  option :xml, required: true, aliases: '-x'
41
38
  option :output, required: true, aliases: '-o'
42
- option :verbose, type: :boolean, aliases: '-V'
43
39
  def burpsuite_mapper
44
40
  hdf = HeimdallTools::BurpSuiteMapper.new(File.read(options[:xml])).to_hdf
45
41
  File.write(options[:output], hdf)
@@ -49,7 +45,6 @@ module HeimdallTools
49
45
  long_desc Help.text(:nessus_mapper)
50
46
  option :xml, required: true, aliases: '-x'
51
47
  option :output_prefix, required: true, aliases: '-o'
52
- option :verbose, type: :boolean, aliases: '-V'
53
48
  def nessus_mapper
54
49
  hdfs = HeimdallTools::NessusMapper.new(File.read(options[:xml])).to_hdf
55
50
 
@@ -64,7 +59,6 @@ module HeimdallTools
64
59
  long_desc Help.text(:snyk_mapper)
65
60
  option :json, required: true, aliases: '-j'
66
61
  option :output_prefix, required: true, aliases: '-o'
67
- option :verbose, type: :boolean, aliases: '-V'
68
62
  def snyk_mapper
69
63
  hdfs = HeimdallTools::SnykMapper.new(File.read(options[:json]), options[:name]).to_hdf
70
64
  puts "\r\HDF Generated:\n"
@@ -78,7 +72,6 @@ module HeimdallTools
78
72
  long_desc Help.text(:nikto_mapper)
79
73
  option :json, required: true, aliases: '-j'
80
74
  option :output, required: true, aliases: '-o'
81
- option :verbose, type: :boolean, aliases: '-V'
82
75
  def nikto_mapper
83
76
  hdf = HeimdallTools::NiktoMapper.new(File.read(options[:json])).to_hdf
84
77
  File.write(options[:output], hdf)
@@ -90,7 +83,6 @@ module HeimdallTools
90
83
  long_desc Help.text(:jfrog_xray_mapper)
91
84
  option :json, required: true, aliases: '-j'
92
85
  option :output, required: true, aliases: '-o'
93
- option :verbose, type: :boolean, aliases: '-V'
94
86
  def jfrog_xray_mapper
95
87
  hdf = HeimdallTools::JfrogXrayMapper.new(File.read(options[:json])).to_hdf
96
88
  File.write(options[:output], hdf)
@@ -102,7 +94,6 @@ module HeimdallTools
102
94
  long_desc Help.text(:dbprotect_mapper)
103
95
  option :xml, required: true, aliases: '-x'
104
96
  option :output, required: true, aliases: '-o'
105
- option :verbose, type: :boolean, aliases: '-V'
106
97
  def dbprotect_mapper
107
98
  hdf = HeimdallTools::DBProtectMapper.new(File.read(options[:xml])).to_hdf
108
99
  File.write(options[:output], hdf)
@@ -114,7 +105,6 @@ module HeimdallTools
114
105
  long_desc Help.text(:aws_config_mapper)
115
106
  # option :custom_mapping, required: false, aliases: '-m'
116
107
  option :output, required: true, aliases: '-o'
117
- option :verbose, type: :boolean, aliases: '-V'
118
108
  def aws_config_mapper
119
109
  hdf = HeimdallTools::AwsConfigMapper.new(options[:custom_mapping]).to_hdf
120
110
  File.write(options[:output], hdf)
@@ -126,7 +116,6 @@ module HeimdallTools
126
116
  long_desc Help.text(:netsparker_mapper)
127
117
  option :xml, required: true, aliases: '-x'
128
118
  option :output, required: true, aliases: '-o'
129
- option :verbose, type: :boolean, aliases: '-V'
130
119
  def netsparker_mapper
131
120
  hdf = HeimdallTools::NetsparkerMapper.new(File.read(options[:xml])).to_hdf
132
121
  File.write(options[:output], hdf)
@@ -12,15 +12,11 @@ IMPACT_MAPPING = {
12
12
 
13
13
  module HeimdallTools
14
14
  class DBProtectMapper
15
- def initialize(xml, _name = nil, verbose = false)
16
- @verbose = verbose
17
-
18
- begin
19
- dataset = xml_to_hash(xml)
20
- @entries = compile_findings(dataset['dataset'])
21
- rescue StandardError => e
22
- raise "Invalid DBProtect XML file provided Exception: #{e};\nNote that XML must be of kind `Check Results Details`."
23
- end
15
+ def initialize(xml, _name = nil)
16
+ dataset = xml_to_hash(xml)
17
+ @entries = compile_findings(dataset['dataset'])
18
+ rescue StandardError => e
19
+ raise "Invalid DBProtect XML file provided Exception: #{e};\nNote that XML must be of kind `Check Results Details`."
24
20
  end
25
21
 
26
22
  def to_hdf
@@ -7,9 +7,8 @@ DEFAULT_NIST_TAG = %w{SA-11 RA-5}.freeze
7
7
 
8
8
  module HeimdallTools
9
9
  class FortifyMapper
10
- def initialize(fvdl, verbose = false)
10
+ def initialize(fvdl)
11
11
  @fvdl = fvdl
12
- @verbose = verbose
13
12
 
14
13
  begin
15
14
  data = xml_to_hash(fvdl)
@@ -27,9 +27,8 @@ end
27
27
 
28
28
  module HeimdallTools
29
29
  class JfrogXrayMapper
30
- def initialize(xray_json, _name = nil, verbose = false)
30
+ def initialize(xray_json, _name = nil)
31
31
  @xray_json = xray_json
32
- @verbose = verbose
33
32
 
34
33
  begin
35
34
  @cwe_nist_mapping = parse_mapper
@@ -39,9 +39,8 @@ end
39
39
 
40
40
  module HeimdallTools
41
41
  class NessusMapper
42
- def initialize(nessus_xml, verbose = false)
42
+ def initialize(nessus_xml)
43
43
  @nessus_xml = nessus_xml
44
- @verbose = verbose
45
44
  read_cci_xml
46
45
  begin
47
46
  @cwe_nist_mapping = parse_mapper
@@ -72,7 +71,8 @@ module HeimdallTools
72
71
  info = {}
73
72
 
74
73
  info['policyName'] = policy['policyName']
75
- info['version'] = policy['Preferences']['ServerPreferences']['preference'].select { |x| x['name'].eql? 'sc_version' }.first['value']
74
+ scanner_version = policy['Preferences']['ServerPreferences']['preference'].select { |x| x['name'].eql? 'sc_version' }
75
+ info['version'] = scanner_version.empty? ? NA_STRING : scanner_version.first['value']
76
76
  info
77
77
  rescue StandardError => e
78
78
  raise "Invalid Nessus XML file provided Exception: #{e}"
@@ -21,19 +21,15 @@ DEFAULT_NIST_TAG = %w{SA-11 RA-5}.freeze
21
21
 
22
22
  module HeimdallTools
23
23
  class NetsparkerMapper
24
- def initialize(xml, _name = nil, verbose = false)
25
- @verbose = verbose
26
-
27
- begin
28
- @cwe_nist_mapping = parse_mapper(CWE_NIST_MAPPING_FILE)
29
- @owasp_nist_mapping = parse_mapper(OWASP_NIST_MAPPING_FILE)
30
- data = xml_to_hash(xml)
31
-
32
- @vulnerabilities = data['netsparker-enterprise']['vulnerabilities']['vulnerability']
33
- @scan_info = data['netsparker-enterprise']['target']
34
- rescue StandardError => e
35
- raise "Invalid Netsparker XML file provided Exception: #{e}"
36
- end
24
+ def initialize(xml, _name = nil)
25
+ @cwe_nist_mapping = parse_mapper(CWE_NIST_MAPPING_FILE)
26
+ @owasp_nist_mapping = parse_mapper(OWASP_NIST_MAPPING_FILE)
27
+ data = xml_to_hash(xml)
28
+
29
+ @vulnerabilities = data['netsparker-enterprise']['vulnerabilities']['vulnerability']
30
+ @scan_info = data['netsparker-enterprise']['target']
31
+ rescue StandardError => e
32
+ raise "Invalid Netsparker XML file provided Exception: #{e}"
37
33
  end
38
34
 
39
35
  def to_hdf
@@ -26,9 +26,8 @@ end
26
26
 
27
27
  module HeimdallTools
28
28
  class NiktoMapper
29
- def initialize(nikto_json, _name = nil, verbose = false)
29
+ def initialize(nikto_json, _name = nil)
30
30
  @nikto_json = nikto_json
31
- @verbose = verbose
32
31
 
33
32
  begin
34
33
  @nikto_nist_mapping = parse_mapper
@@ -29,9 +29,8 @@ end
29
29
 
30
30
  module HeimdallTools
31
31
  class SnykMapper
32
- def initialize(synk_json, _name = nil, verbose = false)
32
+ def initialize(synk_json, _name = nil)
33
33
  @synk_json = synk_json
34
- @verbose = verbose
35
34
 
36
35
  begin
37
36
  @cwe_nist_mapping = parse_mapper
@@ -12,9 +12,8 @@ DEFAULT_NIST_TAG = %w{SA-11 RA-5}.freeze
12
12
 
13
13
  module HeimdallTools
14
14
  class ZapMapper
15
- def initialize(zap_json, name, verbose = false)
15
+ def initialize(zap_json, name)
16
16
  @zap_json = zap_json
17
- @verbose = verbose
18
17
 
19
18
  begin
20
19
  data = JSON.parse(zap_json, symbolize_names: true)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: heimdall_tools
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.44
4
+ version: 1.3.45
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robert Thew
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: exe
12
12
  cert_chain: []
13
- date: 2021-04-23 00:00:00.000000000 Z
13
+ date: 2021-05-01 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: aws-sdk-configservice