File tree Expand file tree Collapse file tree 6 files changed +6
-6
lines changed Expand file tree Collapse file tree 6 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ def format_code_desc(issue)
63
63
end
64
64
65
65
def nist_tag ( cweid )
66
- entries = @cwe_nist_mapping . select { |x | cweid . include? x [ :cweid ] . to_s }
66
+ entries = @cwe_nist_mapping . select { |x | cweid . include? ( x [ :cweid ] . to_s ) && ! x [ :nistid ] . nil? }
67
67
tags = entries . map { |x | [ x [ :nistid ] , "Rev_#{ x [ :rev ] } " ] }
68
68
tags . empty? ? DEFAULT_NIST_TAG : tags . flatten . uniq
69
69
end
Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ def finding(vulnerability)
58
58
end
59
59
60
60
def nist_tag ( cweid )
61
- entries = @cwe_nist_mapping . select { |x | cweid . include? x [ :cweid ] . to_s }
61
+ entries = @cwe_nist_mapping . select { |x | cweid . include? ( x [ :cweid ] . to_s ) && ! x [ :nistid ] . nil? }
62
62
tags = entries . map { |x | x [ :nistid ] }
63
63
tags . empty? ? DEFAULT_NIST_TAG : tags . flatten . uniq
64
64
end
Original file line number Diff line number Diff line change @@ -140,7 +140,7 @@ def cci_nist_tag(cci_refs)
140
140
end
141
141
142
142
def plugin_nist_tag ( pluginfamily , pluginid )
143
- entries = @cwe_nist_mapping . select { |x | ( x [ :pluginfamily ] . eql? ( pluginfamily ) && ( x [ :pluginid ] . eql? ( '*' ) || x [ :pluginid ] . eql? ( pluginid . to_i ) ) ) }
143
+ entries = @cwe_nist_mapping . select { |x | ( x [ :pluginfamily ] . eql? ( pluginfamily ) && ( x [ :pluginid ] . eql? ( '*' ) || x [ :pluginid ] . eql? ( pluginid . to_i ) ) ) && ! x [ :nistid ] . nil? }
144
144
tags = entries . map { |x | [ x [ :nistid ] . split ( '|' ) , "Rev_#{ x [ :rev ] } " ] }
145
145
tags . empty? ? DEFAULT_NIST_TAG : tags . flatten . uniq
146
146
end
Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ def finding(vulnerability)
71
71
end
72
72
73
73
def nist_tag ( niktoid )
74
- entries = @nikto_nist_mapping . select { |x | niktoid . eql? ( x [ :niktoid ] . to_s ) }
74
+ entries = @nikto_nist_mapping . select { |x | niktoid . eql? ( x [ :niktoid ] . to_s ) && ! x [ :nistid ] . nil? }
75
75
tags = entries . map { |x | x [ :nistid ] }
76
76
tags . empty? ? DEFAULT_NIST_TAG : tags . flatten . uniq
77
77
end
Original file line number Diff line number Diff line change @@ -74,7 +74,7 @@ def finding(vulnerability)
74
74
end
75
75
76
76
def nist_tag ( cweid )
77
- entries = @cwe_nist_mapping . select { |x | cweid . include? x [ :cweid ] . to_s }
77
+ entries = @cwe_nist_mapping . select { |x | cweid . include? ( x [ :cweid ] . to_s ) && ! x [ :nistid ] . nil? }
78
78
tags = entries . map { |x | x [ :nistid ] }
79
79
tags . empty? ? DEFAULT_NIST_TAG : tags . flatten . uniq
80
80
end
Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ def format_code_desc(code_desc)
65
65
end
66
66
67
67
def nist_tag ( cweid )
68
- entries = @cwe_nist_mapping . select { |x | x [ :cweid ] . to_s . eql? ( cweid . to_s ) }
68
+ entries = @cwe_nist_mapping . select { |x | x [ :cweid ] . to_s . eql? ( cweid . to_s ) && ! x [ :nistid ] . nil? }
69
69
tags = entries . map { |x | [ x [ :nistid ] , "Rev_#{ x [ :rev ] } " ] }
70
70
tags . empty? ? DEFAULT_NIST_TAG : tags . flatten . uniq
71
71
end
You can’t perform that action at this time.
0 commit comments