heimdall_tools 1.3.33 → 1.3.34

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 707be020e9cf4d9f075c3e2983c86d44b9087f4345e4960e4d295773fa0fab4f
4
- data.tar.gz: '059030a7e38f58c5860ff8aea88950e430b70a0e46681ba274a575d443118151'
3
+ metadata.gz: d54d4b22df45a476f595fcb5e915848a0ab4afdedab5bc01aed87a4aeb98daba
4
+ data.tar.gz: 9f0b90c76302fe9eea2508d04b9b6df33907ed7a1d775ffc7ac0cc1150573f09
5
5
  SHA512:
6
- metadata.gz: 7c675158a5a7a264f5dd20788551f3c49b23d38cac185c6804f059a6f65ef121078bb32b4d2ff68cf6eb586430999a032f3d182abc57b49944369fcdf39660fe
7
- data.tar.gz: 40f87b241c1cdb1b0959a9438a2b5ca9947925a85218e1d37d643573b2233f97c3f44fda766bcfba593b1da8d8f71a5e09c6dc153bf62e1abbeb85d1fc527c8b
6
+ metadata.gz: c2d99103ccb593b133e51cf5df81d9fa6d31426b24ba4b311840bdcbbf8aaa611c16db127eae2a10a6994113ce182e1d80f0716b341838e7bd1fa1120eced474
7
+ data.tar.gz: 8368dd53348c22851413faef53ee02515b64a8ef69a5ca02b81174d491b7db3129d158c02ce96733157e21d48bfa2e2922f5c0ab899465761256f4bf58027489
@@ -43,7 +43,7 @@ module HeimdallTools
43
43
  begin
44
44
  @project = JSON.parse(nikto_json)
45
45
  rescue StandardError => e
46
- raise "Invalid Nikto JSON file provided Exception: #{e}"
46
+ raise "Invalid Nikto JSON file provided\nNote: nikto_mapper does not support multi-target scan results\n\nException: #{e}"
47
47
  end
48
48
  end
49
49
 
@@ -66,8 +66,6 @@ module HeimdallTools
66
66
  finding['status'] = 'failed'
67
67
  finding['code_desc'] = "URL : #{vulnerability['url'].to_s } Method: #{vulnerability['method'].to_s}"
68
68
  finding['run_time'] = NA_FLOAT
69
-
70
- # Nikto results JSON does not profile scan timestamp; using current time to satisfy HDF format
71
69
  finding['start_time'] = NA_STRING
72
70
  [finding]
73
71
  end
@@ -93,21 +91,20 @@ module HeimdallTools
93
91
  { "data": data || NA_STRING, "label": label || NA_STRING }
94
92
  end
95
93
 
96
- # Nikto report could have multiple vulnerability entries for multiple findings of same issue type.
97
- # The meta data is identical across entries
98
- # method collapse_duplicates return unique controls with applicable findings collapsed into it.
99
- def collapse_duplicates(controls)
100
- unique_controls = []
101
-
102
- controls.map { |x| x['id'] }.uniq.each do |id|
103
- collapsed_results = controls.select { |x| x['id'].eql?(id) }.map {|x| x['results']}
104
- unique_control = controls.find { |x| x['id'].eql?(id) }
105
- unique_control['results'] = collapsed_results.flatten
106
- unique_controls << unique_control
107
- end
108
- unique_controls
109
- end
110
-
94
+ # Nikto report could have multiple vulnerability entries for multiple findings of same issue type.
95
+ # The meta data is identical across entries
96
+ # method collapse_duplicates return unique controls with applicable findings collapsed into it.
97
+ def collapse_duplicates(controls)
98
+ unique_controls = []
99
+
100
+ controls.map { |x| x['id'] }.uniq.each do |id|
101
+ collapsed_results = controls.select { |x| x['id'].eql?(id) }.map {|x| x['results']}
102
+ unique_control = controls.find { |x| x['id'].eql?(id) }
103
+ unique_control['results'] = collapsed_results.flatten
104
+ unique_controls << unique_control
105
+ end
106
+ unique_controls
107
+ end
111
108
 
112
109
  def to_hdf
113
110
  controls = []
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.33
4
+ version: 1.3.34
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: 2020-08-17 00:00:00.000000000 Z
13
+ date: 2020-08-19 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: nokogiri