Skip to content

Commit

Permalink
Added missing HostName#vulnerabilities association (closes #49).
Browse files Browse the repository at this point in the history
  • Loading branch information
postmodern committed May 4, 2023
1 parent 6210720 commit 0db38fc
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lib/ronin/db/host_name.rb
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,14 @@ class HostName < ActiveRecord::Base
# @return [Array<URL>]
has_many :urls, class_name: 'URL'

# @!attribute [rw] vulnerabilities
# The vulnerabilities which reference the host name.
#
# @return [Array<Vulnerability>]
#
# @since 0.2.0
has_many :vulnerabilities, dependent: :destroy

#
# Looks up the host name.
#
Expand Down Expand Up @@ -222,3 +230,4 @@ def to_s

require 'ronin/db/host_name_ip_address'
require 'ronin/db/ip_address'
require 'ronin/db/vulnerability'

0 comments on commit 0db38fc

Please sign in to comment.