vulnerability helper + change to vagrant base

This commit is contained in:
thomashaw
2016-02-26 18:27:33 +00:00
parent c000404a3a
commit ea573072c8
4 changed files with 39 additions and 17 deletions

View File

@@ -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