mirror of
https://github.com/aquasecurity/kube-hunter.git
synced 2026-05-21 08:36:38 +00:00
Finished with the left of the PR comments.
This commit is contained in:
@@ -93,15 +93,11 @@ def list_hunters():
|
||||
|
||||
global hunt_started_lock
|
||||
hunt_started_lock = threading.Lock()
|
||||
hunt_started_lock.acquire()
|
||||
hunt_started = False
|
||||
hunt_started_lock.release()
|
||||
|
||||
|
||||
def main():
|
||||
hunt_started_lock.acquire()
|
||||
global hunt_started
|
||||
hunt_started_lock.release()
|
||||
scan_options = [
|
||||
config.pod,
|
||||
config.cidr,
|
||||
|
||||
@@ -77,9 +77,7 @@ event_id_count_lock.release()
|
||||
|
||||
class NewHostEvent(Event):
|
||||
def __init__(self, host, cloud=None):
|
||||
event_id_count_lock.acquire()
|
||||
global event_id_count
|
||||
event_id_count_lock.release()
|
||||
self.host = host
|
||||
self.cloud = cloud
|
||||
event_id_count_lock.acquire()
|
||||
|
||||
@@ -48,12 +48,8 @@ class Collector(object):
|
||||
|
||||
def execute(self):
|
||||
"""function is called only when collecting data"""
|
||||
services_lock.acquire()
|
||||
global services
|
||||
services_lock.release()
|
||||
vulnerabilities_lock.acquire()
|
||||
global vulnerabilities
|
||||
vulnerabilities_lock.release()
|
||||
bases = self.event.__class__.__mro__
|
||||
if Service in bases:
|
||||
services_lock.acquire()
|
||||
|
||||
@@ -4,7 +4,6 @@ from prettytable import ALL, PrettyTable
|
||||
|
||||
from __main__ import config
|
||||
from collector import services, vulnerabilities,services_lock, vulnerabilities_lock
|
||||
import threading
|
||||
|
||||
EVIDENCE_PREVIEW = 40
|
||||
MAX_TABLE_WIDTH = 20
|
||||
|
||||
Reference in New Issue
Block a user