mirror of
https://github.com/aquasecurity/kube-hunter.git
synced 2026-05-11 03:37:52 +00:00
changed evidence of priviledged containers, also added casting to str in reporter
This commit is contained in:
@@ -47,7 +47,7 @@ def print_results(active):
|
||||
for vuln in vulnerabilities:
|
||||
row = ["{}:{}".format(vuln.host, vuln.port), vuln.component.name, vuln.get_name(), vuln.explain()]
|
||||
if active:
|
||||
evidence = vuln.evidence[:EVIDENCE_PREVIEW] + "..." if len(vuln.evidence) > EVIDENCE_PREVIEW else vuln.evidence
|
||||
evidence = str(vuln.evidence)[:EVIDENCE_PREVIEW] + "..." if len(str(vuln.evidence)) > EVIDENCE_PREVIEW else str(vuln.evidence)
|
||||
row.append(evidence)
|
||||
vuln_table.add_row(row)
|
||||
|
||||
|
||||
@@ -60,7 +60,8 @@ class PrivilegedContainers(Vulnerability, Event):
|
||||
"""A priviledged container on a node, can expose the node/cluster to unwanted root operations"""
|
||||
def __init__(self, containers):
|
||||
Vulnerability.__init__(self, KubernetesCluster, "Priviledged Container")
|
||||
self.evidence = containers
|
||||
self.containers = containers
|
||||
self.evidence = "pod: {}, container: {}".format(containers[0][0], containers[0][1])
|
||||
|
||||
|
||||
""" dividing ports for seperate hunters """
|
||||
|
||||
Reference in New Issue
Block a user