Define a Config data class with all configuration values.
This class should be consumed by hunters and every other usage.
Make the main function instantiate the Config object with values parsed from command line.
Why is this needed
Currently the configuration object is a argparse.Namespace object, which tightly couples
configration handling to argparse.
Another problem is catching bugs like https://github.com/aquasecurity/kube-hunter/issues/336 when referencing invalid configuration properties.
Defining a class for it will help us catch such bugs in linting.
What would you like to be added
Define a
Config
data class with all configuration values. This class should be consumed by hunters and every other usage. Make the main function instantiate the Config object with values parsed from command line.Why is this needed
Currently the configuration object is a
argparse.Namespace
object, which tightly couples configration handling to argparse. Another problem is catching bugs like https://github.com/aquasecurity/kube-hunter/issues/336 when referencing invalid configuration properties. Defining a class for it will help us catch such bugs in linting.