Class: Dockscan::Modules::AuditModule

Inherits:
GenericModule show all
Defined in:
lib/dockscan/modules/audit.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from GenericModule

inherited, modules

Instance Attribute Details

#scandataObject

Returns the value of attribute scandata.



5
6
7
# File 'lib/dockscan/modules/audit.rb', line 5

def scandata
  @scandata
end

Instance Method Details

#check(dockercheck) ⇒ Object



26
27
28
# File 'lib/dockscan/modules/audit.rb', line 26

def check(dockercheck)
  raise "#{self.class.name} doesn't implement `handle_command`!"
end

#idcontainer(container) ⇒ Object



11
12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/dockscan/modules/audit.rb', line 11

def idcontainer(container)
  str=''
  str << container.id
  str << " ("
  names = ''
  container.info["Names"].each do |name|
    names << name << " "
  end
  str << names
  str << ")"
  str << " with IP: "
  str << container.json["NetworkSettings"]["IPAddress"]
  return str
end

#infoObject



7
8
9
# File 'lib/dockscan/modules/audit.rb', line 7

def info
  raise "#{self.class.name} doesn't implement `handle_command`!"
end