aquasecurity / kube-hunter

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

Hunters are not executed from PyInstaller built code #331

Closed iyehuda closed 4 years ago

iyehuda commented 4 years ago

What happened

Tried to run compiled version of kube-hunter (via PyInstaller). kube-hunter did not find anything. Debug logs showed that very few events where subscribed at initialization.

Expected behavior

kube-hunter showing report with findings.

The origin of this bug is dynamic imports (by looking at .py files at runtime). We should avoid this since they are not necessary. We need to find another way to subscribe automatically to events (maybe in a more testable way).

iyehuda commented 4 years ago

Resolved by #335