make msft security adv url generator if given cve ids
This commit is contained in:
parent
f69712b823
commit
88ea2b738b
1 changed files with 16 additions and 0 deletions
16
classes/microsoft_security_advisor_url_generator.rb
Normal file
16
classes/microsoft_security_advisor_url_generator.rb
Normal file
|
@ -0,0 +1,16 @@
|
|||
#!/usr/bin/env ruby
|
||||
# frozen_string_literal: true
|
||||
|
||||
# take a list of cve and spit out microsoft security advisory urls for them
|
||||
|
||||
class MicrosoftSecurityAdvisoryUrlGenerator
|
||||
def initialize(cve_ids)
|
||||
@cve_ids = cve_ids
|
||||
end
|
||||
|
||||
def generate_url
|
||||
@cve_ids.map do |cve|
|
||||
"https://portal.msrc.microsoft.com/en-US/security-guidance/advisory/#{cve}"
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Add table
Reference in a new issue