mirror of
https://github.com/aquasecurity/kube-hunter.git
synced 2026-05-06 01:08:11 +00:00
* Remove __main__ references and create a top-level config module * Move conf module into separate standalone package * Deprecate install_imports.py script * Rename root package to kube_hunter The previous src root package name was too generic and not unique, so it can be used as external name. Change `src` to `kube_hunter` so it can be referenced in a clear way. Addtional changes made on the way: * Make imports absolute * Formatting Relates to #185 * remove todos Co-authored-by: Ryan Lahfa <masterancpp@gmail.com> Co-authored-by: Itay Shakury <itay@itaysk.com>
Plugins
This folder contains modules that will load before any parsing of arguments by kube-hunter main module.
An example for using a plugin to add an argument:
# example.py
from kube_hunter.conf import config
config.parser.add_argument('--exampleflag', action="store_true", help="enables active hunting")
What we did here was just add a file to the plugins/ folder, import the parser, and adding an argument.
All plugins in this folder gets imported right after the main arguments are added, and right before they are getting parsed, so you can add an argument that will later be used in your hunting/discovery module.