mirror of
https://github.com/aquasecurity/kube-hunter.git
synced 2026-08-23 22:26:23 +00:00
fixed wrong iteration on list when getting random pod
This commit is contained in:
@@ -425,7 +425,7 @@ class SecureKubeletPortHunter(Hunter):
|
||||
pod_data = next(filter(is_kubesystem_pod, pods_data), None)
|
||||
|
||||
if pod_data:
|
||||
container_data = next(pod_data["spec"]["containers"], None)
|
||||
container_data = pod_data["spec"]["containers"][0]
|
||||
if container_data:
|
||||
return {
|
||||
"name": pod_data["metadata"]["name"],
|
||||
|
||||
Reference in New Issue
Block a user