* Fix Dockerfile build
The Docker build used a 2-step installation of requirements
and application.
This was broken by #272.
Fixes#300
* Add dependencies cache for docker build
Caching installation requirements saves time when building
* Add PyInstaller build
Use PyInstaller to generate single binary.
Use staticx to generate a single static binary.
Resolves#301
* Add test Makefile target
Add test to Makefile.
Add requests_mock to dev dependencies.
* Inital Commit
Signed-off-by: Vipul Gupta (@vipulgupta2048) <vipulgupta2048@gmail.com>
* Suggestions implemented as suggested
Signed-off-by: Vipul Gupta (@vipulgupta2048) <vipulgupta2048@gmail.com>
* Package with setuptools
Use setuptools to package kube-hunter as redistributable file.
Once packages, it can be pushed to PyPi.
The package version is taken from git tags (using setuptools_scm).
Closes#185
* Ignore __main__.py script in code coverage
The entrypoint script should not be tested but rather be calling
to tested modules.
Ideally, __main__ should only make a call to single function from
another tested module.
* Update requirements files
Use install_requires from setup.cfg file as single source of truth
for dependencies.
Install regular dependencies when installing dev dependencies.
* Symlink kube-hunter.py to entry point
Support the old way to run kube-hunter via the main script by making
a link to the new kube_hunter/__main__.py script.
Co-authored-by: Yehuda Chikvashvili <yehudaac1@gmail.com>
* Fix empty report when active hunting
Running kube-hunter active hunting with plain report
did not show any report.
This commit changes Vulnerability.vid default value
to "None" (previously None)
Closes#280
* Improve debug and exception messages
Debugging hunters execution is hard due to lack of debug
information. No indication is made when a hunter starts.
Exceptions where printed without stack trace, which made
it difficult to follow.
* 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>
* Consider patched versions as not vulnerable by default
Change `--ignore-downstream` to `--ignore-patched-versions` and
invert it's effect.
From now on, kube-hunter will not alert patched components as default
behavior.
Resolves#194
* Rename flag --ignore-patched-versions to --include-patched-versions
/usr/bin/env python generally is defaulted to the version set by the linux flavour. On some distros it's python 2 and 3 on others, changing it to python3 might work
* Update README.md
Added license details(and linked to the license page) and improved the readability of the README file.
* Update README.md
Co-Authored-By: Nikita Titov <nekit94-08@mail.ru>