Class: ProjectReportFinding
- Inherits:
-
Domain::Model
- Object
- Domain::Model
- ProjectReportFinding
- Defined in:
- lib/domain/project/model.rb
Constant Summary collapse
- SEVERITIES =
%w[Critical High Medium Low Info].freeze
Instance Attribute Summary collapse
-
#assets ⇒ Object
Returns the value of attribute assets.
-
#associated_malware ⇒ Object
Returns the value of attribute associated_malware.
-
#associated_malware_types ⇒ Object
Returns the value of attribute associated_malware_types.
-
#cve_or_cwe ⇒ Object
Returns the value of attribute cve_or_cwe.
-
#cvss_score ⇒ Object
Returns the value of attribute cvss_score.
-
#description ⇒ Object
Returns the value of attribute description.
-
#epss_score ⇒ Object
Returns the value of attribute epss_score.
-
#exploit_available ⇒ Object
Returns the value of attribute exploit_available.
-
#exploit_consequence ⇒ Object
Returns the value of attribute exploit_consequence.
-
#exploit_in_wild ⇒ Object
Returns the value of attribute exploit_in_wild.
-
#exploit_rating ⇒ Object
Returns the value of attribute exploit_rating.
-
#iava ⇒ Object
Returns the value of attribute iava.
-
#id ⇒ Object
Returns the value of attribute id.
-
#is_cisa_bod_22_01_vulnerability ⇒ Object
Returns the value of attribute is_cisa_bod_22_01_vulnerability.
-
#mandiant_ease_of_attack ⇒ Object
Returns the value of attribute mandiant_ease_of_attack.
-
#mandiant_risk_rating ⇒ Object
Returns the value of attribute mandiant_risk_rating.
-
#mitigation ⇒ Object
Returns the value of attribute mitigation.
-
#mitigations ⇒ Object
Returns the value of attribute mitigations.
-
#name ⇒ Object
Returns the value of attribute name.
-
#recommendation ⇒ Object
Returns the value of attribute recommendation.
-
#report_id ⇒ Object
Returns the value of attribute report_id.
-
#severity ⇒ Object
Returns the value of attribute severity.
-
#teams ⇒ Object
Returns the value of attribute teams.
-
#threat_actors ⇒ Object
Returns the value of attribute threat_actors.
-
#total_count ⇒ Object
Returns the value of attribute total_count.
-
#zero_day ⇒ Object
Returns the value of attribute zero_day.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ ProjectReportFinding
constructor
A new instance of ProjectReportFinding.
- #table_name ⇒ Object
Methods inherited from Domain::Model
columns, from_csv, from_json, headers, table_name, #to_csv, #to_hash, #to_s, view
Constructor Details
#initialize(attributes = {}) ⇒ ProjectReportFinding
188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 |
# File 'lib/domain/project/model.rb', line 188 def initialize(attributes = {}) remapped_attributes = attributes.transform_keys do |key| case key when 'ID' then 'id' when 'Name' then 'name' when 'Description' then 'description' when 'Recommendation' then 'recommendation' when 'CVE/CWE' then 'cve_or_cwe' when 'CVSS Score' then 'cvss_score' when 'Total Count' then 'total_count' when 'Unique Instance List' then 'assets' when 'Teams' then 'teams' when 'Exploit Available' then 'exploit_available' when 'IAVA' then 'iava' when 'Mitigation' then 'mitigation' when 'Exploit in Wild' then 'exploit_in_wild' when 'Mandiant Ease of Attack' then 'mandiant_ease_of_attack' when 'Zero Day' then 'zero_day' when 'Associated Malware' then 'associated_malware' when 'Associated Malware Types' then 'associated_malware_types' when 'Threat actors' then 'threat actors' when 'EPSS score' then 'epss_score' when 'CISA BOD 22-01 Vulnerability' then 'is_cisa_bod_22_01_vulnerability' else key # For all other keys that do not need remapping end end super(remapped_attributes) # Call the superclass's initialize method end |
Instance Attribute Details
#assets ⇒ Object
Returns the value of attribute assets.
153 154 155 |
# File 'lib/domain/project/model.rb', line 153 def assets @assets end |
#associated_malware ⇒ Object
Returns the value of attribute associated_malware.
153 154 155 |
# File 'lib/domain/project/model.rb', line 153 def associated_malware @associated_malware end |
#associated_malware_types ⇒ Object
Returns the value of attribute associated_malware_types.
153 154 155 |
# File 'lib/domain/project/model.rb', line 153 def associated_malware_types @associated_malware_types end |
#cve_or_cwe ⇒ Object
Returns the value of attribute cve_or_cwe.
153 154 155 |
# File 'lib/domain/project/model.rb', line 153 def cve_or_cwe @cve_or_cwe end |
#cvss_score ⇒ Object
Returns the value of attribute cvss_score.
153 154 155 |
# File 'lib/domain/project/model.rb', line 153 def cvss_score @cvss_score end |
#description ⇒ Object
Returns the value of attribute description.
153 154 155 |
# File 'lib/domain/project/model.rb', line 153 def description @description end |
#epss_score ⇒ Object
Returns the value of attribute epss_score.
153 154 155 |
# File 'lib/domain/project/model.rb', line 153 def epss_score @epss_score end |
#exploit_available ⇒ Object
Returns the value of attribute exploit_available.
153 154 155 |
# File 'lib/domain/project/model.rb', line 153 def exploit_available @exploit_available end |
#exploit_consequence ⇒ Object
Returns the value of attribute exploit_consequence.
153 154 155 |
# File 'lib/domain/project/model.rb', line 153 def exploit_consequence @exploit_consequence end |
#exploit_in_wild ⇒ Object
Returns the value of attribute exploit_in_wild.
153 154 155 |
# File 'lib/domain/project/model.rb', line 153 def exploit_in_wild @exploit_in_wild end |
#exploit_rating ⇒ Object
Returns the value of attribute exploit_rating.
153 154 155 |
# File 'lib/domain/project/model.rb', line 153 def end |
#iava ⇒ Object
Returns the value of attribute iava.
153 154 155 |
# File 'lib/domain/project/model.rb', line 153 def iava @iava end |
#id ⇒ Object
Returns the value of attribute id.
153 154 155 |
# File 'lib/domain/project/model.rb', line 153 def id @id end |
#is_cisa_bod_22_01_vulnerability ⇒ Object
Returns the value of attribute is_cisa_bod_22_01_vulnerability.
153 154 155 |
# File 'lib/domain/project/model.rb', line 153 def is_cisa_bod_22_01_vulnerability @is_cisa_bod_22_01_vulnerability end |
#mandiant_ease_of_attack ⇒ Object
Returns the value of attribute mandiant_ease_of_attack.
153 154 155 |
# File 'lib/domain/project/model.rb', line 153 def mandiant_ease_of_attack @mandiant_ease_of_attack end |
#mandiant_risk_rating ⇒ Object
Returns the value of attribute mandiant_risk_rating.
153 154 155 |
# File 'lib/domain/project/model.rb', line 153 def end |
#mitigation ⇒ Object
Returns the value of attribute mitigation.
153 154 155 |
# File 'lib/domain/project/model.rb', line 153 def mitigation @mitigation end |
#mitigations ⇒ Object
Returns the value of attribute mitigations.
153 154 155 |
# File 'lib/domain/project/model.rb', line 153 def mitigations @mitigations end |
#name ⇒ Object
Returns the value of attribute name.
153 154 155 |
# File 'lib/domain/project/model.rb', line 153 def name @name end |
#recommendation ⇒ Object
Returns the value of attribute recommendation.
153 154 155 |
# File 'lib/domain/project/model.rb', line 153 def recommendation @recommendation end |
#report_id ⇒ Object
Returns the value of attribute report_id.
153 154 155 |
# File 'lib/domain/project/model.rb', line 153 def report_id @report_id end |
#severity ⇒ Object
Returns the value of attribute severity.
153 154 155 |
# File 'lib/domain/project/model.rb', line 153 def severity @severity end |
#teams ⇒ Object
Returns the value of attribute teams.
153 154 155 |
# File 'lib/domain/project/model.rb', line 153 def teams @teams end |
#threat_actors ⇒ Object
Returns the value of attribute threat_actors.
153 154 155 |
# File 'lib/domain/project/model.rb', line 153 def threat_actors @threat_actors end |
#total_count ⇒ Object
Returns the value of attribute total_count.
153 154 155 |
# File 'lib/domain/project/model.rb', line 153 def total_count @total_count end |
#zero_day ⇒ Object
Returns the value of attribute zero_day.
153 154 155 |
# File 'lib/domain/project/model.rb', line 153 def zero_day @zero_day end |
Class Method Details
.primary_key ⇒ Object
184 185 186 |
# File 'lib/domain/project/model.rb', line 184 def self.primary_key %w[id report_id] end |
Instance Method Details
#table_name ⇒ Object
180 181 182 |
# File 'lib/domain/project/model.rb', line 180 def table_name 'project_report_finding' end |