Class: ProjectReportDetail

Inherits:
Domain::Model show all
Defined in:
lib/domain/project/model.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Domain::Model

columns, from_csv, from_json, headers, table_name, #to_csv, #to_hash, #to_s, view

Constructor Details

#initialize(attributes = {}) ⇒ ProjectReportDetail

Returns a new instance of ProjectReportDetail.



104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
# File 'lib/domain/project/model.rb', line 104

def initialize(attributes = {})
  remapped_attributes = attributes.transform_keys do |key|
    case key
    when 'Scan Type' then 'scan_type'
    when 'Asset Name' then 'asset_name'
    when 'Asset Owner' then 'asset_owner'
    when 'IP' then 'ip'
    when 'Last Seen' then 'last_seen'
    when 'Operating System' then 'operating_system'
    when 'Finding Discovered' then 'finding_discovered'
    when 'Age' then 'age'
    when 'Plugin Number' then 'plugin_number'
    when 'Name' then 'name'
    when 'Description' then 'description'
    when 'Severity' then 'severity'
    when 'Exploit Available' then 'exploit_available'
    when 'Status' then 'status'
    when 'Request Method' then 'request_method'
    when 'Parameter' then 'parameter'
    when 'Service' then 'service'
    when 'Port' then 'port'
    when 'Path' then 'path'
    when 'Due Date' then 'due_date'
    when 'IAVA' then 'iava'
    when 'CVE/CWE' then 'cve_or_cwe'
    when 'CVSS Score' then 'cvss_score'
    when 'CVSS Temporal' then 'cvss_temporal'
    when 'References' then 'refs'
    when 'Impact' then 'impact'
    when 'Solution' then 'solution'
    when 'Mitigated' then 'mitigated'
    when 'User Comments' then 'user_comments'
    when 'OWASP' then 'owasp'
    when 'WASC' then 'wasc'
    when 'Payload' then 'payload'
    when 'Payload2' then 'payload2'
    when 'Payload3' then 'payload3'
    when 'Payload4' then 'payload4'
    when 'Payload5' then 'payload5'
    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

#ageObject

Returns the value of attribute age.



58
59
60
# File 'lib/domain/project/model.rb', line 58

def age
  @age
end

#asset_nameObject

Returns the value of attribute asset_name.



58
59
60
# File 'lib/domain/project/model.rb', line 58

def asset_name
  @asset_name
end

#asset_ownerObject

Returns the value of attribute asset_owner.



58
59
60
# File 'lib/domain/project/model.rb', line 58

def asset_owner
  @asset_owner
end

#cve_or_cweObject

Returns the value of attribute cve_or_cwe.



58
59
60
# File 'lib/domain/project/model.rb', line 58

def cve_or_cwe
  @cve_or_cwe
end

#cvss_scoreObject

Returns the value of attribute cvss_score.



58
59
60
# File 'lib/domain/project/model.rb', line 58

def cvss_score
  @cvss_score
end

#cvss_temporalObject

Returns the value of attribute cvss_temporal.



58
59
60
# File 'lib/domain/project/model.rb', line 58

def cvss_temporal
  @cvss_temporal
end

#descriptionObject

Returns the value of attribute description.



58
59
60
# File 'lib/domain/project/model.rb', line 58

def description
  @description
end

#due_dateObject

Returns the value of attribute due_date.



58
59
60
# File 'lib/domain/project/model.rb', line 58

def due_date
  @due_date
end

#exploit_availableObject

Returns the value of attribute exploit_available.



58
59
60
# File 'lib/domain/project/model.rb', line 58

def exploit_available
  @exploit_available
end

#finding_discoveredObject

Returns the value of attribute finding_discovered.



58
59
60
# File 'lib/domain/project/model.rb', line 58

def finding_discovered
  @finding_discovered
end

#iavaObject

Returns the value of attribute iava.



58
59
60
# File 'lib/domain/project/model.rb', line 58

def iava
  @iava
end

#impactObject

Returns the value of attribute impact.



58
59
60
# File 'lib/domain/project/model.rb', line 58

def impact
  @impact
end

#ipObject

Returns the value of attribute ip.



58
59
60
# File 'lib/domain/project/model.rb', line 58

def ip
  @ip
end

#last_seenObject

Returns the value of attribute last_seen.



58
59
60
# File 'lib/domain/project/model.rb', line 58

def last_seen
  @last_seen
end

#mitigatedObject

Returns the value of attribute mitigated.



58
59
60
# File 'lib/domain/project/model.rb', line 58

def mitigated
  @mitigated
end

#nameObject

Returns the value of attribute name.



58
59
60
# File 'lib/domain/project/model.rb', line 58

def name
  @name
end

#operating_systemObject

Returns the value of attribute operating_system.



58
59
60
# File 'lib/domain/project/model.rb', line 58

def operating_system
  @operating_system
end

#owaspObject

Returns the value of attribute owasp.



58
59
60
# File 'lib/domain/project/model.rb', line 58

def owasp
  @owasp
end

#parameterObject

Returns the value of attribute parameter.



58
59
60
# File 'lib/domain/project/model.rb', line 58

def parameter
  @parameter
end

#pathObject

Returns the value of attribute path.



58
59
60
# File 'lib/domain/project/model.rb', line 58

def path
  @path
end

#payloadObject

Returns the value of attribute payload.



58
59
60
# File 'lib/domain/project/model.rb', line 58

def payload
  @payload
end

#payload2Object

Returns the value of attribute payload2.



58
59
60
# File 'lib/domain/project/model.rb', line 58

def payload2
  @payload2
end

#payload3Object

Returns the value of attribute payload3.



58
59
60
# File 'lib/domain/project/model.rb', line 58

def payload3
  @payload3
end

#payload4Object

Returns the value of attribute payload4.



58
59
60
# File 'lib/domain/project/model.rb', line 58

def payload4
  @payload4
end

#payload5Object

Returns the value of attribute payload5.



58
59
60
# File 'lib/domain/project/model.rb', line 58

def payload5
  @payload5
end

#plugin_numberObject

Returns the value of attribute plugin_number.



58
59
60
# File 'lib/domain/project/model.rb', line 58

def plugin_number
  @plugin_number
end

#portObject

Returns the value of attribute port.



58
59
60
# File 'lib/domain/project/model.rb', line 58

def port
  @port
end

#refsObject

Returns the value of attribute refs.



58
59
60
# File 'lib/domain/project/model.rb', line 58

def refs
  @refs
end

#report_idObject

Returns the value of attribute report_id.



58
59
60
# File 'lib/domain/project/model.rb', line 58

def report_id
  @report_id
end

#request_methodObject

Returns the value of attribute request_method.



58
59
60
# File 'lib/domain/project/model.rb', line 58

def request_method
  @request_method
end

#row_idObject

Returns the value of attribute row_id.



58
59
60
# File 'lib/domain/project/model.rb', line 58

def row_id
  @row_id
end

#scan_typeObject

Returns the value of attribute scan_type.



58
59
60
# File 'lib/domain/project/model.rb', line 58

def scan_type
  @scan_type
end

#serviceObject

Returns the value of attribute service.



58
59
60
# File 'lib/domain/project/model.rb', line 58

def service
  @service
end

#severityObject

Returns the value of attribute severity.



58
59
60
# File 'lib/domain/project/model.rb', line 58

def severity
  @severity
end

#solutionObject

Returns the value of attribute solution.



58
59
60
# File 'lib/domain/project/model.rb', line 58

def solution
  @solution
end

#statusObject

Returns the value of attribute status.



58
59
60
# File 'lib/domain/project/model.rb', line 58

def status
  @status
end

#user_commentsObject

Returns the value of attribute user_comments.



58
59
60
# File 'lib/domain/project/model.rb', line 58

def user_comments
  @user_comments
end

#wascObject

Returns the value of attribute wasc.



58
59
60
# File 'lib/domain/project/model.rb', line 58

def wasc
  @wasc
end

Class Method Details

.primary_keyObject



100
101
102
# File 'lib/domain/project/model.rb', line 100

def self.primary_key
  %w[report_id row_id]
end

Instance Method Details

#table_nameObject



96
97
98
# File 'lib/domain/project/model.rb', line 96

def table_name
  'project_report_detail'
end