adjust reject filter
This commit is contained in:
parent
a3c6da611d
commit
1045a44ddc
1 changed files with 3 additions and 1 deletions
|
@ -12,6 +12,8 @@ class MicrosoftKbChecker
|
|||
attr_accessor :options
|
||||
|
||||
# options hash {:cve_id => 'cve-2020-1234', :os_name => 'Windows Server 2012'}
|
||||
# you can also pass in an advisory number as it uses the same API endpoint
|
||||
# eg... {:cve_id => 'ADV180002', :os_name => "Windows Server 2012 R2"}
|
||||
def initialize(options)
|
||||
@options = options
|
||||
end
|
||||
|
@ -115,7 +117,7 @@ class MicrosoftKbChecker
|
|||
kbs = articles.map do |article_info|
|
||||
num = article_info[:article_num]
|
||||
os_json.values_at("articleTitle#{num}")
|
||||
end.flatten.reject! { |kb| kb == '' }
|
||||
end.flatten.reject { |kb| kb == '' }
|
||||
{
|
||||
os_name: os_json['name'],
|
||||
cve_id: options[:cve_id],
|
||||
|
|
Loading…
Add table
Reference in a new issue