aquasecurity / kube-hunter

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

Improve packages imports/exports #305

Closed iyehuda closed 3 years ago

iyehuda commented 4 years ago

What would you like to be added

Use static, direct imports inside packages. Use packages __init__ files to export nicer import paths. Use __all__ to declare exported values in __init__ files for clarity.

Why is this needed

There are currently dynamic and wildcard imports in kube-hunter packages when they aren't necessary. Dynamic imports are not so good practice and become a burden when using analytic tools (such as PyInstaller analyzer). Wildcard imports are a bad practice since they obscure the source of an imported value and can load unnecessary values.

avats-dev commented 4 years ago

@iYehuda can you elaborate a bit how to implement this? Thanks, I want to work on this.

danielsagi commented 3 years ago

this is outdated. already implemented :)