mirror of
https://github.com/cliffe/SecGen.git
synced 2026-02-20 13:50:45 +00:00
vulnerability helper + change to vagrant base
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
require_relative('../constants.rb')
|
||||
|
||||
class Vulnerability
|
||||
attr_accessor :type, :privilege, :access ,:puppets, :details, :ports, :cve, :files, :scripts
|
||||
|
||||
@@ -6,13 +8,15 @@ class Vulnerability
|
||||
other.kind_of?(self.class) && @type == other.type
|
||||
end
|
||||
|
||||
def initialize(type="", privilege="", access="", puppets=[], details="", ports=[], cve="", files=[], scripts=[])
|
||||
def initialize(type='', privilege='', access='', puppets=[], details='', ports=[], platform ='', name='', cve='', files=[], scripts=[])
|
||||
@type = type
|
||||
@privilege = privilege
|
||||
@access = access
|
||||
@puppets = puppets
|
||||
@details = details
|
||||
@ports = ports
|
||||
@platform = platform
|
||||
@name = name
|
||||
@cve = cve
|
||||
@files = files
|
||||
@scripts = scripts
|
||||
@@ -22,4 +26,12 @@ class Vulnerability
|
||||
return @type + @privilege + @access
|
||||
end
|
||||
|
||||
def vulnerability_path
|
||||
return ROOT_DIR + '/modules/' + @type + @name
|
||||
end
|
||||
|
||||
def puppet_path
|
||||
return vulnerability_path + '/puppet/'
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user