aquasecurity / kube-hunter

Hunt for security weaknesses in Kubernetes clusters
Apache License 2.0
4.71k stars 581 forks source link

Reduce event count using SubnetDiscovery #306

Open iyehuda opened 4 years ago

iyehuda commented 4 years ago

What would you like to be added

Create a SubnetDiscovery module to scan network subnet and publish HostEvents only for found hosts.

Why is this needed

kube-hunter currently publishes NewHost event for every IP address that is needed to be scanned. This can generate unnecessarily large amount of events (64K in /16 subnets), which can be a problem if we will use an external message queue. Network scanning can be done more efficiently when done as batch and can be delegated to 3rd party tools (such as nmap).