aquasecurity / kube-hunter

Hunt for security weaknesses in Kubernetes clusters
Apache License 2.0
4.75k stars 585 forks source link

Standard build with PyInstaller #301

Closed iyehuda closed 4 years ago

iyehuda commented 4 years ago

What would you like to be added

Add support for PyInstaller build. That is not trivial since there are dynamic imports in kube-hunter code base, which should be treated individually when building \w PyInstaller.

Why is this needed

There are kinds of integrations which cannot have python exists. We can use PyInstaller to "freeze" kube-hunter to a single executable binary. Going further we can use tools such as staticx to generate a standalone statically linked binary, thus being portable to non glibc environments.

Related to #290

itaysk commented 4 years ago

why do we need pyinstaller, when we already distribute kube-hunter as a docker image?

iyehuda commented 4 years ago

There are integrations such as Aqua CSP which embed kube-hunter inside a non python based docker image. Installing python makes the image bigger so they use PyInstaller to bundle kube-hunter as a single binary.