Module: Vulnerability::Severity
- Defined in:
- lib/puppet_x/vulnerability/implementation/severity.rb
Overview
Implementation of puppet function vulnerability::severity
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(base) ⇒ Object
9 10 11 12 13 14 |
# File 'lib/puppet_x/vulnerability/implementation/severity.rb', line 9 def self.included(base) base.dispatch :severity do param 'Vulnerability::Level', :level return_type 'Array[String[1]]' end end |
Instance Method Details
#severity(level) ⇒ Object
16 17 18 19 20 |
# File 'lib/puppet_x/vulnerability/implementation/severity.rb', line 16 def severity(level) return [] unless closure_scope.include?('cve_list') closure_scope['cve_list'].select { |_c, data| data['severity'] == level }.keys end |