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 +4 -4
- data/lib/heimdall_tools/aws_config_mapper.rb +1 -2
- data/lib/heimdall_tools/burpsuite_mapper.rb +1 -2
- data/lib/heimdall_tools/cli.rb +0 -11
- data/lib/heimdall_tools/dbprotect_mapper.rb +5 -9
- data/lib/heimdall_tools/fortify_mapper.rb +1 -2
- data/lib/heimdall_tools/jfrog_xray_mapper.rb +1 -2
- data/lib/heimdall_tools/nessus_mapper.rb +3 -3
- data/lib/heimdall_tools/netsparker_mapper.rb +9 -13
- data/lib/heimdall_tools/nikto_mapper.rb +1 -2
- data/lib/heimdall_tools/snyk_mapper.rb +1 -2
- data/lib/heimdall_tools/zap_mapper.rb +1 -2
- 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: 87936a7488cf8da17690bb3c35d5138a2e9442d8d4c48b307307f4d44423b987
|
4
|
+
data.tar.gz: 28f172cc25391e697910bb1b2b79fea29c82956cbca953f1e7978080b4e1d646
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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
|
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
|
data/lib/heimdall_tools/cli.rb
CHANGED
@@ -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
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
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
|
@@ -39,9 +39,8 @@ end
|
|
39
39
|
|
40
40
|
module HeimdallTools
|
41
41
|
class NessusMapper
|
42
|
-
def initialize(nessus_xml
|
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
|
-
|
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
|
25
|
-
@
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
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
|
@@ -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
|
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.
|
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-
|
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
|